RE: Running fsck on root file system






-----Original Message-----
From: Kenneth Holter [mailto:kenneho.ndu@xxxxxxxxx]
Sent: Wednesday, May 13, 2009 3:15 AM
To: redhat-list@xxxxxxxxxx
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@xxxxxxxxxx?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

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • Re: Problem with "kdeglobals" and "kickerrc"
    ... Booting up - keeps telling me to run fsck ... ... If I log on as root, I can start X with no apparent problems. ... After following a few suggestions given I try logging into my user account ... Slackware 11 installed (I added a 160 gig disk later and re-installed ...
    (comp.windows.x.kde)
  • Re: [SLE] Need HELP with fsck on root partition
    ... is I can't boot all ... > can't seem to fsck on the command line. ... exception is the root partition, and it should be mounted read-only. ... Reiserfs will not perform other than minor repairs on a mounted ...
    (SuSE)
  • Re: Safe to bypass fsck?
    ... "Type control-d to proceed with normal startup, ... I would login as root and run fsck on the partition to fix ... you will definitely want to do an fsck. ... Breaking and rebooting will cause more problems, not fix them. ...
    (comp.unix.solaris)
  • Re: [SLE] How do I use fsck????
    ... >> it couldn't fsck and that I would have to do it manually. ... > in single user mode to fsck root, AND the root file system must be ... > root or mounted file system, ... So, at this point, how do I unmount, or set ...
    (SuSE)
  • fsck Fails On Reboot After Partially Completed Testing Upgrade
    ... Checking root file system ... fsck failed. ... Please repair MANUALLY and reboot. ...
    (Debian-User)