Running fsck on root file system
Walters, Mark
Mark.Walters at mckesson.com
Wed May 13 15:28:51 UTC 2009
-----Original Message-----
From: Kenneth Holter [mailto:kenneho.ndu at gmail.com]
Sent: Wednesday, May 13, 2009 3:15 AM
To: redhat-list at redhat.com
Subject: Running fsck on root file system
Hi all.
I need to run fsck.ext3 on a root partition that live in a logical
volume (lvm).
I know how to boot the installation CD into rescue mode, and run for
example
"fsck.ext3 /dev/sda2" to check a partition. But when /dev/sda2 is a
logical volume I guess I first need to activate the volume before I can
check it for errors. Does anyone have a link to a walkthrough on how to
do this?
Regards,
Kenneth Holter
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
______________________________________________________________________
This should work for you:
# lvm pvscan (!!RHEL 4 or later rescue disk req'd)
# lvm vgscan
# lvm vgs
# lvm vgchange -a y VolGroup00
# lvm vgdisplay -v VolGroup00 | more
# fsck /dev/VolGroup00/LogvolX
Can't find a good superblock backup? To display:
# mke2fs -n /dev/VolGroup00/LogVolX
Other thoughts:
1. Clean bit could be set - to force an fsck:
# fsck -f /dev/vgname/lvolname
# sync; sync (to clear buffers) then run again.
# fsck
2. in emergency mode, root will mount read-only, to make
read/write:
# mount /dev/hdaX -o rw,remount /
Good Luck!
Mark Walters
More information about the redhat-list
mailing list