LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 05-16-2008, 05:12 PM   #1
Magmagal
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Rep: Reputation: 0
Problem running fsck on LVM


Hi all,

I'm trying to manually run fsck on my Fedora 8/Windows XP dual-boot machine (Dell Inspiron 6000), on which the Fedora install is hosed in some mysterious way. I don't think I understand how to do this correctly, since I am running into the following situation:

I insert the F8 rescue CD and boot up. When asked whether I want to mount the filesystem, I choose 'Skip' and go straight to a command line. I want to run

>fsck -c /dev/mapper/VolGroup00-LogVol00 (I believe this is correct.)

However, because I haven't mounted the filesystem, there is no 'VolGroup00-LogVol00' in /dev/mapper.

If I instead boot from the rescue CD and choose to mount the filesystem in /mnt/sysimage, an entry for VolGroup00-LogVol00 appears in /dev/mapper. However, running the above command gives the following warning:

fsck 1.40.2(12-Jul-2007)
WARNING: couldn't open /etc/fstab. No such file or directory.
e2fsck 1.40.2(12-Jul-2007)
/dev/mapper/VolGroup00-LogVol00 is mounted.
WARNING!!! Running e2fsck on a mounted filesystem may cause SEVERE filesystem datage. Do you really want to continue(y/n)?

I of course choose no. I understand that one shouldn't run fsck on a mounted filesystem, but how do I run it on an unmounted filesystem from the rescue CD???

Many thanks in advance for any advice.
 
Old 05-17-2008, 12:36 PM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
you can either a) umount the mounted LVs under /mnt/sysimage
or b) bring up the LVM after saying 'no' to finding and mounting filesystems

if b), then
Code:
lvm pvscan
lvm vgscan
lvm lvchange -ay
lvm lvscan
the lvscan should show the expected LVs and then you should be able to safely fsck the ones you need to run it on since they will not be mounted.

fsck /dev/VolGroup00/LogVol00 (or whatever the device name )

Hope this helps.
 
Old 05-18-2008, 02:42 PM   #3
Magmagal
LQ Newbie
 
Registered: Aug 2004
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks - option b solved my problem nicely.
 
Old 05-19-2008, 04:21 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
As a simple workaround for those weary of picking the right PVs:
As root (or user allowed to shut down the box) type at a console "shutdown -r -F now". That'll perform an immediate reboot with a forced file system check (-F option) for all partitions and you can watch the results during boot...
 
  


Reply

Tags
fsck, lvm, lvm2, rescue, solution



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Non-destructively running fsck LinuxGeek Linux - Hardware 3 04-30-2007 09:36 AM
Assistance using fsck to recover ext3 LVM partition fiberfarm Fedora 1 11-01-2006 08:49 PM
Running fsck clinton Linux - Software 2 01-25-2005 07:12 PM
mount -r while fsck is running? aaccomazzi Linux - Hardware 1 10-20-2004 04:00 PM
running fsck rbrooks Linux - Newbie 1 05-16-2002 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 07:22 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration