SCIENTIFIC-LINUX-USERS Archives

May 2008

SCIENTIFIC-LINUX-USERS@LISTSERV.FNAL.GOV

Options: Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Jon Peatfield <[log in to unmask]>
Reply To:
Jon Peatfield <[log in to unmask]>
Date:
Fri, 23 May 2008 19:59:34 +0100
Content-Type:
TEXT/PLAIN
Parts/Attachments:
TEXT/PLAIN (74 lines)
> Thanks for the reply. I ran the SL rescue disk and it found my home
> directory. This was encouraging so I removed the Fedora installation
> (overwrote with Ubuntu) in order to put things back to how they were
> originally and to remove the name clash. No boot and no more home
> directory in /mnt/sysimage with the SL rescue disk. It would seem that
> Fedora modified information on the SL disk.
>
> I will have a play with lvm on the ubuntu installation (learning about
> ubuntu will help take the pain out of the exercise) but if SL can no
> longer "mount" (or whatever lvm does) the "partitions" this may not be
> fruitful. Suggestions gratefully received.

When using anaconda (both SL and Fedora) it offers a default LVM VG name 
which is always the same (though you can change it!).

Two VGs with the same name can't exist at the same time so what gets used 
depends on which of them is found first.

Note that this is no worse than using ext3 on partitions directly and 
mounting stuff with LABEL=... in grub/fstab - but is no better either!

I would always suggest changing the name for the VG you are offered during 
a manual install (and set in kickstart etc), to something which is unique 
for the machine/instance.

The LVM LVs created within a particular VG do not need to be globally 
unique since they are always referred to by a string which includes the 
VG-name.  Personally I choose descriptive names, so I'm typing this on a 
machine where lvscan reports:

$ lvscan
   ACTIVE            '/dev/ZexSys00/root' [2.00 GB] inherit
   ACTIVE            '/dev/ZexSys00/scratch' [107.41 GB] inherit
   ACTIVE            '/dev/ZexSys00/tmp' [10.00 GB] inherit
   ACTIVE            '/dev/ZexSys00/usr' [10.00 GB] inherit
   ACTIVE            '/dev/ZexSys00/var' [2.00 GB] inherit
   ACTIVE            '/dev/ZexSys00/swap' [5.00 GB] inherit

Another fly for the ointment is that /boot isn't part of the LVM setup 
(grub can't boot from LVM volumes as far as I know), so you can't have two 
boot partitions both with the ext3 label being /boot and expect fstab to 
distinguish them.

Anyway as to recovery, boot from the sl installer/rescue and you should be 
able to check the state of the LVM setup.

   lvm pvscan

looks for pysical volumes

   lvm vgscan

looks for VGs

   lvm vgchance -ay

activate the VGs that are known about.

   lvm lvscan

look for LVs in active VGs.

Once you have a list of current LVs you should be able to fsck the devices 
it mentions and mount them by hand...

Of course you may have lost more than you expected.

Note that you can avoid the LABEL=... fstab stuff by referring to the 
device by using UUID= (or the raw device name), but the machine can really 
only have one grub config so maybe sharing /boot would be better (but who 
owns the files in there?)

  -- Jon

ATOM RSS1 RSS2