LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Testing the integrity and checking the data on a hard drive (http://www.linuxquestions.org/questions/linux-hardware-18/testing-the-integrity-and-checking-the-data-on-a-hard-drive-740989/)

Cinematography 07-18-2009 08:01 AM

Testing the integrity and checking the data on a hard drive
 
Is there a way, a command, or a program that can be used to test the integrity and/or to check the data on an external hard drive?

MS3FGX 07-18-2009 08:05 AM

Each filesystem has it's own fsck program that can be used to examine the volume for any corruption or filesystem errors.

But to actually check that the data contained on the drive is valid, you would need to compare it to a known good copy of the files. fsck can tell you if the filessystem is corrupted, but it can't tell you if the files themselves are faithful to the original versions they were copied from.

Cinematography 07-18-2009 11:26 AM

Thank you for the reply.

So a filesystem check will be able to tell me if the files on the drive are at least readable?

J.W. 07-20-2009 01:33 PM

If there's a question as to whether or not the files on the external drive will be readable, I'd think that the simplest thing to do would be to just mount that drive and then attempt to access the files. Is there a particular reason that would create doubt as to whether the files would be accessible?

Cinematography 07-21-2009 03:33 PM

Quote:

Originally Posted by J.W. (Post 3614139)
If there's a question as to whether or not the files on the external drive will be readable, I'd think that the simplest thing to do would be to just mount that drive and then attempt to access the files.

I'm trying to find something a little more automated because I have over 5,000 files on the drive. They're all jpegs; I'm a photographer.

Quote:

Is there a particular reason that would create doubt as to whether the files would be accessible?
Not really. I take good care of the drive, and everything seems to be working fine with it. I'm just paranoid.

J.W. 07-21-2009 05:45 PM

OK, allow me to split my comment into two parts. First, in terms of data integrity, IMHO it normally shouldn't be necessary to manually perform frequent file system check ("fsck") operations unless you start to experience erratic system behavior (eg, the partition won't mount, error messages are being generated, etc) or otherwise suspect that something is seriously misbehaving with that drive. If you're using Ubuntu, your disks most likely were formatted as ext3, which is a journaling file system. At the risk of telling you something you already know, journalled file systems (like ext3) are pretty resistant to corruption, even in a bad scenario such as a power failure. (That is not to say that ext3 partitions are immune to data corruption, but ordinarily, and even in the event of a crash or unclean shutdown, ext3 partitions are usually very stable. In my own experience, over the years my machines have experienced a number of crashes and/or power failures, and luckily for me none of them produced any serious side effects or data loss. I'm sure it'll happen sooner or later, but so far I've been lucky)

Second, and given that your drive is performing as expected, you might also consider burning your important files to a DVD, just for additional peace of mind. Obviously hard drives can and do fail, inevitably at the worst possible time, and although it's a cliche a good set of backups can be invaluable. Personally, every couple of weeks I copy my important data to a DVD, and you might consider doing the same if you aren't already. As a photographer, I suppose it might be useful to have your portfolio be easily portable, and if your files are commercially valuable you could also store that DVD backup in a safe deposit box, etc.

Overall, if the main concern is just to avoid any large scale data loss, make backups :)


All times are GMT -5. The time now is 03:51 PM.