tag:blogger.com,1999:blog-6006114617625504970.post2429275312927154794..comments2024-03-29T00:58:29.857-04:00Comments on Linux Blog: Howto check disk drive for errors and badblocksDevOpshttp://www.blogger.com/profile/02331067901785181627noreply@blogger.comBlogger11125tag:blogger.com,1999:blog-6006114617625504970.post-77078981856061556982012-10-24T17:36:56.152-04:002012-10-24T17:36:56.152-04:00No, he's recommending:
$ sudo fsck -t ext3 -c...No, he's recommending:<br /><br />$ sudo fsck -t ext3 -c /dev/hda1 <br /><br />The '-c' flag doesn't take a file name argument, from the man page:<br /><br />"This option causes e2fsck to use badblocks(8) program to do a read-only scan of the device in order to find any bad blocks.<br />If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or directory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test."<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-64925275118014241672012-09-26T13:57:51.255-04:002012-09-26T13:57:51.255-04:00@Anonymous
So in this article in recommends:
$ s...@Anonymous<br /><br />So in this article in recommends:<br /><br />$ sudo badblocks -v /dev/hda1 > bad-blocks<br />$ sudo fsck -t ext3 -l bad-blocks /dev/hda1<br /><br />But you are recommending:<br /><br />$ sudo badblocks -v /dev/hda1 > bad-blocks<br />$ sudo fsck -t ext3 -c bad-blocks /dev/hda1 <br /><br />?<br /><br />thanks.<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-20194081785961483902012-09-13T14:41:10.914-04:002012-09-13T14:41:10.914-04:00Okay, here's the much simpler Windows-style ve...Okay, here's the much simpler Windows-style version.<br /><br />Your drive is bad. Buy a new one.<br /><br />That's the option you'd have on Windows. Actually, it's the option you should take, really. But if you have no choice but to use the drive for now, and want to make your situation slightly safer, you can do this.<br /><br />Or you can buy a new drive.<br /><br />Or you can whine.<br /><br />Preferably somewhere else.<br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-58712839671793556772012-09-01T09:12:24.394-04:002012-09-01T09:12:24.394-04:00Why does everything in Linux have to be so complic...Why does everything in Linux have to be so complicated?!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-85856114415797868802012-07-21T14:46:51.354-04:002012-07-21T14:46:51.354-04:00For e2fsck (yes you can use e2fsck on ext3)
-c
Thi...For e2fsck (yes you can use e2fsck on ext3)<br />-c<br />This option causes e2fsck to use badblocks(8) program to do a read-only scan of the device in order to find any bad blocks. If any bad blocks are found, they are added to the bad block inode to prevent them from being allocated to a file or directory. If this option is specified twice, then the bad block scan will be done using a non-destructive read-write test.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-42650180781498061882012-02-04T22:47:58.723-05:002012-02-04T22:47:58.723-05:00pretty interesting tips. thanks for sharing inform...pretty interesting tips. thanks for sharing information.Javin @ grep command in unixhttp://javarevisited.blogspot.com/2011/06/10-examples-of-grep-command-in-unix-and.htmlnoreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-56312348551104931032011-12-19T16:33:06.729-05:002011-12-19T16:33:06.729-05:00its for ext3 filesystem
-l filename
...its for ext3 filesystem<br /><br />-l filename<br /> Add the block numbers listed in the file specified by filename to the list of bad blocks. The<br /> format of this file is the same as the one generated by the badblocks(8) program. Note that<br /> the block numbers are based on the blocksize of the filesystem. Hence, badblocks(8) must be<br /> given the blocksize of the filesystem in order to obtain correct results. As a result, it is<br /> much simpler and safer to use the -c option to e2fsck, since it will assure that the correct<br /> parameters are passed to the badblocks program.DevOpshttps://www.blogger.com/profile/02331067901785181627noreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-6362076165324710842011-06-24T19:56:24.775-04:002011-06-24T19:56:24.775-04:00Do you mean e2fsck -l bad-blocks-list?
fsck -l co...Do you mean <b>e2fsck -l </b>bad-blocks-list?<br /><br /><b>fsck -l</b> command is used for locking threads, not for feeding lists and I don't think if it will understand this as a command to pass over e2fsck.<br /><br />Thanks for the tip anyway. Combining e2fs utilities and badblocks is very useful for me now that my 640Gb portable disk is dying on me ;)Puppo Michaelsonhttps://www.blogger.com/profile/00545684309348128629noreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-85566497998948322452010-06-10T19:54:51.416-04:002010-06-10T19:54:51.416-04:00abubin, i suggest you load a livecd to run badbloc...abubin, i suggest you load a livecd to run badblocks on '/var'Eddyhttps://www.blogger.com/profile/02997709257563218959noreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-91852645056980531292008-11-12T06:01:00.000-05:002008-11-12T06:01:00.000-05:00Moreover, the badblocks man page states that it mu...Moreover, the badblocks man page states that it must know the correct block size, otherwise it will go bad; and it is recommended to rather use fsck -c [mount point] then the fsck will pass correct block size to badblocks.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6006114617625504970.post-76453254874377565892008-09-16T05:35:00.000-04:002008-09-16T05:35:00.000-04:00can I run this command without unmounting the part...can I run this command without unmounting the partition? Cause I have problems unmounting /var. Lots of services running that is using this partition.Anonymousnoreply@blogger.com