Trouble in LVM land

Tim Writer tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org
Thu Feb 8 07:56:35 UTC 2007


John Van Ostrand <john-Da48MpWaEp0CzWx7n4ubxQ at public.gmane.org> writes:

> On Wed, 2007-02-07 at 19:30 -0500, Merv Curley wrote:
> > I guess I wasn't clear enough.  The booting procedure reaches the point where 
> > udev starts and it first reports
> > 
> >   /dev/rootvg/rootlv01 clean    xxx  files   xxxx blocks
> >   /boot  clean     xxx files   xxxblocks
> > 
> >   the next group of lines report
> > 
> > no such device or file  /dev/videovg/videolv01      etc etc 
> > 
> >    the  videovg group  is just data for mythtv.  The boot procedure stops as 
> > usual and there is the usual ' Type Control-D to continue' but when the mtce 
> > shell is exited, the computer reboots.
> > 
> > I have found that the new Ubuntu finds errors with every drive I have on 4 
> > systems and I see this error regularly.  Suse 10.2, FC-6, Debian, Mepis, and 
> > Kanotix (Debian) never seem to see a problem. I am used to this Control-D 
> > message and exiting the shell.
> > 
> > I can issue no commands,  since booting never finishes.  This has been running 
> > just fine, and had rebooted a number of times with no problems.  There are no 
> > other distro's on the system which is FC-5 based incidentally.
> > 
> > I could use a liveCD to look at the drive, 'cept I have no clue what to look 
> > for.
> > 
> > Does that help, or do I just re-install?     Which might be quicker and less 
> > edifying.
> 
> At the Ctrl-D prompt you should be typing the root user's password and
> pressing enter. This will log you into a shell where you will be able to
> type commands.
> 
> While in this shell you should be able to run commands like:
> 
> vgscan
> vgdisplay
> 
> On some rescue shells you would prefix the command with lvm, e.g.:
> 
> lvm vgdisplay
> 
> >From the error you mention, "No such device or file", indicates that
> device file is not there. This could be because the volume group is not
> active or it was misspelled.
> 
> Here are the steps that you need to do and before you do them MAKE SURE
> YOU KNOW WHICH DEVICES ARE USED FOR FILE SYSTEMS AND WHICH ARE IN VOLUME
> GROUPS. These commands may delete data from your disks if you use them
> incorrectly.
> 
> 1. Make sure that the physical devices are visible. Use 'sfdisk -l' to
> list disks and partitions. If that's not there try 'fdisk -l'. If you
> can see the disks then that's your problem. Check disk connections,

You meant "can't".

> controllers, etc and replace the disk if needed.
> 
> 2. Ensure that each device is properly setup as an LVM physical volume
> (PV). Use 'pvdisplay /dev/hda1', 'pvdisplay /dev/hda2', etc to make sure
> each disk looks good.  If pvdisplay gives an error it's possible that a)
> a file system was created directly on the partition (like a /boot
> partition) or the physical volume was created on the whole disk device
> (e.g. hdb instead of hdb1.) NOTE: You almost certanly didn't create a PV
> on /dev/hda.

You can also try pvscan. You should see all your PVs.

> 3. Make sure that the volume groups are active. Run 'vgdisplay videovg'.
> You should see interesting output. If you don't then the volume group is
> not active. If steps 1 and 2 work then this step should work. If you
> can't see the VG then try to activate it 'vgchange -a y videovg'.
> Alternatively, maybe it was misspelled. Try 'vgdisplay' and see if it is
> displayed.
> 
> 4. The file system may simply need to be checked. I'm going to assume
> you are using an ext3 file system. IF YOU AREN'T then don't use this
> command. Run 'e2fsck /dev/videovg/videolv01' answer 'y' to all
> questions. If you are willing to abandon this file system and re-create.
> You could also choose to recreate the LV or even the VG.
> 
> 5. Finally try to mount the file system. It may be that /etc/fstab has
> the wrong file system type listed and refuses to mount it. Run
> "mount /dev/videovg/videolv01 /mnt". The command should run without
> error and your file system should be mounted on /mnt. Run 'ls /mnt' to
> see if you can see your files. Then run 'umount /mnt' to unmount it.

If you think you've lost a PV (i.e. step 2 above didn't work), see the
instructions REPLACING PHYSICAL VOLUMES in the vgcfgrestore man page.

If all else fails, you can try restoring your volume group descriptor area
using vgcfgrestore.

You should run these commands with the --test option first.

Good luck.

-- 
tim writer <tim-s/rLXaiAEBtBDgjK7y7TUQ at public.gmane.org>                                  starnix inc.
647.722.5301                                      toronto, ontario, canada
http://www.starnix.com              professional linux services & products
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list