Tar oddity...

Pietro "m0nt0" Montorfano monto84 at gmail.com
Wed Dec 23 09:58:54 UTC 2009


Il giorno mer, 23/12/2009 alle 20.23 +1100, Chris Smart ha scritto:
> 2009/12/23 Pietro "m0nt0" Montorfano <monto84 at gmail.com>:
> >
> > The umount command does the "sync" so if you run
> > "umount /media/My_External_HDD" and then you get back to the shell, you
> > are safe to remove the HDD.
> 
> My point was to run the sync command and then run the checksum before
> unmounting This ensures that the data is written to the disk so that
> it can be read off the physical device.

Well that's not totally true, the data could be in cache (for read) so
with the sync command you are sure that all the bits are written to the
physical device, but when you read the data may comes from the OS cache,
may be that you can do a large copy (eg. copy 10-12Gb of data depending
on your RAM/SWAP configuration) and then make a checksum of the data.
you can umount the device, run fsck on it, reboot, remount the device
and then issue an md5.
If everything is right you should have the same checksum.

Pietro




More information about the fedora-list mailing list