On Tue, Sep 13, 2011 at 8:39 PM, Matt Garman <matthew.garman@xxxxxxxxx> wrote:
My question is more along the lines of "best
practices"---what are most people doing with regards to regular fsck's
of ext2/3/4 filesystems? Do you just take the defaults, and let it
delay the boot process by however long it takes? Disable it
completely? Or do something like taking the filesystem offline on a
running system? Something else?
If you are running on LVM and have (enough) free space available then there is a very easy way to check the filesystem for errors. If this finds errors then you can run it on the real filesystem when you can schedule downtime to fix them. It also will give you a good estimate about the amount of time you will need to schedule.
- Create an LVM snapshot of the volume you want to check
- Preen the filesystem to fix and minor in-progress stuff the snapshot caused
- Force a full filesystem check and watch for any errors
lvcreate -s -L 50G -n fsck_snapshot vg_name/lv_name
e2fsck -p -C0 /dev/vg_name/fsck_snapshot
e2fsck -fy -C0 /dev/vg_name/fsck_snapshot
lvremove -f vg_name/fsck_snapshot
Make sure the 50G above gives you enough room for all the writes that will take place during the fsck operation.
-Shad
_______________________________________________ CentOS mailing list CentOS@xxxxxxxxxx http://lists.centos.org/mailman/listinfo/centos