Monday 30 September 2013

Linux FSCK options

Many time we face the “read only partition” problem on the Linux Server at that time while rebooting the server from KVM,  its stuck at maintenance mode and some time auto fsck completed the fsck successfully but after that server ge auto rebooted . We can use the following commands to run the fsck manually.

For example the /dev/sda2  partition having the read only partition error message then run the following command, it will take time as per partiton size

fsck -y -p -v /dev/sda1

or

e2fsck -y -v -f /dev/sda1

Many time due to big partition size ,we have to wait for the long time at that time we think fsck process is stuck at that time we can use the following fsck command because its showing the % for the fsck process, so that we are able to see how much % fsck is completed and remaining.

fsck -y -p -C0 /dev/sda2

or

e2fsck -y  -C0 /dev/sda2

Now reboot the server in he init 3 run levele

root@server[~]# init 3

Note : Make sure that partition is not mounted while running fsck.

No comments:

Post a Comment