Regarding Manual FSCK

ajo

Verified User
Joined
Sep 18, 2009
Messages
25
Location
India
Hi,

One of our servers is having a problem. The server is becoming off line many a times. So I want to run a manual fsck for the backup drive [/dev/sdb1] as the NOC updated that there are some disk failures.

------------------------------------------------------------------------
[root@neon ~]# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda5 446G 295G 129G 70% /
/dev/sda3 1.9G 43M 1.8G 3% /tmp
/dev/sda1 99M 12M 83M 12% /boot
tmpfs 4.0G 0 4.0G 0% /dev/shm
/dev/sdb1 459G 382G 54G 88% /backup
----------------------------------------------------------------------------

Can I run an fsck from the remote shell, with out rebooting the machine for the backup drive [ /dev/sdb1] only. Could you please help with this issue.
 
You have to unmount any drive on which you want to run fsck.

However with that being said, if you have drive errors replace the drive ASAP.
 
Hi,

One of our servers is having a problem. The server is becoming off line many a times. So I want to run a manual fsck for the backup drive [/dev/sdb1] as the NOC updated that there are some disk failures.

------------------------------------------------------------------------
[root@neon ~]# df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda5 446G 295G 129G 70% /
/dev/sda3 1.9G 43M 1.8G 3% /tmp
/dev/sda1 99M 12M 83M 12% /boot
tmpfs 4.0G 0 4.0G 0% /dev/shm
/dev/sdb1 459G 382G 54G 88% /backup
----------------------------------------------------------------------------

Can I run an fsck from the remote shell, with out rebooting the machine for the backup drive [ /dev/sdb1] only. Could you please help with this issue.
How about checking the logs? :)
 
Hi,

I have run an fsck on the backup drive after unmounting it.

[root@neon ~]#umount /dev/sdb1

[root@neon ~]## fsck -yvf /dev/sdb1

The server seems to be working fine after completing the process.
 
Might be dangerous but sometimes its needed. Especially if you have no direct access to the server and no kvm.
 
best way to a production server (im sad ive to say but is true.. i did fsck on a live machine without umount and lost many /etc/ sys files) is to force on update and restart the box in the night...
 
Back
Top