File System Rebuild in Raid5

1) File system must be unmounted, you cannot repair it while it is running. Depending on the file system, eventually you should take the system down to runlevel one:

# init 1

2)Unmount file system, for example if it is /home (/dev/sda3) file system then type command:

# umount /fsname or # umount /dev/sdaX

3) Now run fsck on the partition. Be sure to specify the file system type using -t option. (Recenly one of our sys admin run the command on ext3 file system without specifying file system. Result was more corruption as fsck by default assumes ext2 file system.)

# fsck -t ext3 /dev/sdaX or # fsck.ext3 /dev/sdaX

Tip: if you don't know your file system type then typing mount command will display file system type. fsck will check the file system and ask which problems should be fixed or corrected. If you don't want to type y every time then you can use pass -y option to fsck.

# fsck -y /dev/sdaX

Please note if any files are recovered then they are placed in /fsname/lost+found directory by fsck command. Be sure to check it when fsck finishes.

4) Once fsck finished, remount the file system:

# mount /fsname

5) Go to multiuser mode (if that's the case):

# init 3

Read man page of fsck for more information.

-- SergioNovaes - 08 Apr 2007

Topic revision: r1 - 2007-04-08 - SergioNovaes

This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2020 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback

antalya escort bursa escort eskisehir escort istanbul escort izmir escort