Page 1 of 1

Hard disk errors -- how to fsck

Posted: 02 Nov 2012, 10:09
by pindakoe
Today I noted in the output of my PC's daily backup that my B2 is suffering from HD errors (B2 pulls a backup using rsnapshot and then sends me a summary of what it has done). Extended test using smartmontools confirms 1457 bad sectors in /home. I then tried to do an fsck but was not able to unmount the /home partition ("device is busy"). Both lsof and fuser fail to identify any open files on that partition. For good measure I have manually stopped all services (after SSHing into root@bubba) but the issue remains. I am now running a fsck -n to see the extent of the damage, but would like advise on how unmount /home so that I can run a proper scan.

And secondly -- how hard is it to replace the B2 HD?

Thanks.

Re: Hard disk errors -- how to fsck

Posted: 02 Nov 2012, 15:36
by nobody
The trick is to log in directly as root. You may need to alter /etc/ssh/sshd_conf fir this.

Re: Hard disk errors -- how to fsck

Posted: 02 Nov 2012, 16:28
by pindakoe
Thanks. I got there, but it aint pretty. Fsck exists after two dozen bad blocks with a "signal 7". From that point onwards bubba only says "Bus Error" irrespective which command I give (halt, shutdown, ls, top, free). The only commands that executed normally are sshd (I could SSH into it), cd and pwd (bash internals I guess). Also the prompt continues to work, i.e. time (part of my PS1 definition) changes every time I hit enter. Switching it off by means of on/off results in (slow) blinking LED, say 1 HZ. I do hear activity of the harddisk so it may be working on the fsck from hell.

Re: Hard disk errors -- how to fsck

Posted: 02 Nov 2012, 18:09
by nobody
Try logging in from a rescue usb disk to bypass the disk entirely, but it does seem the drive is fried