Re: How to fix two disks with the same Volume Group?




On Thu, 2008-03-20 at 10:22 +0000, Luciano Rocha wrote:
On Thu, Mar 20, 2008 at 08:12:05PM +1000, Da Rock wrote:

On Thu, 2008-03-20 at 08:48 +0000, Chris G wrote:
I have just had Fedora 7 re-installed on my work desktop as the old
disk drive was slowly failing.

I need to access the old disk if I can, it's still in the system and
visible but the person who installed it didn't change volume groups so
I have two disk drives with the same volume group. How do I change the
name of the old disk's volume group so I can mount it and see it?

Running vgscan returns:-

Reading all physical volumes. This may take a while...
WARNING: Duplicate VG name VolGroup00: Existing
P6sqp0-rIos-JYmi-8L32-ymtN-LzB4-g5BdLL (created here) takes precedence
over TdWFKp-H4tw-UrVq-Jmre-26hv-zmyE-IZXQLI
Found volume group "VolGroup00" using metadata type lvm2
Found volume group "VolGroup00" using metadata type lvm2

--
Chris Green


Actually its a real pain the ***. Bee there, done that. For future
reference- when installing change the name of the fs to the machine
name. Saves these sorts of issues, I found this out the hard way and
came across this gem on the net.

Forgive me for going into a taboo area, but the way I fixed it (vgrename
won't work in this case I reckon- please try though) was to throw an
Ubuntu live disk in the cdrom and boot, download lvm2 from the Ubuntu
repo (Debian won't work- although if Debian make a live disk then use
their repo). Run update software and run the vgrename from there. If you
need root password then (it seems a little redundant but anyway... it
works for me...) go to administration and users and change the root
password there.

You can use the install/recovery disc for Fedora. On the command line,
you'll have to prefix the lvm commands with lvm, like this:

lvm pvscan
lvm vgscan
lvm vgchange
...


Good to know- a shortcut. Is this under repair on the install cd?


Seeing you can't have both disks with the same name at the same time,
you'll need to change the name of your current disk. If you reboot it
will fail once you've renamed, so make sure you change your grub, init
file, and mount your main lvm partition and change your inittab file to
match your new name.

You mean:
1. edit grub.conf, change root= to the new name
2. edit etc/fstab, change swap, root, etc. to use new name
3. re-create initrd, as it has the vg name hardcoded:
mkinitrd -f -v /boot/initrd-`uname -r`.img `uname -r`

You can do this while the system is running, and then reboot. No need
for recovery/lice cd (if everything goes fine; you'll need it if the
system no longer boots).


Surely not if you've just changed the name using the repair disk? But
very succinctly put- I've only done this once and it took several hours
following from instructions on a page. I had trouble remembering the
exact steps myself.

This is very involved, I know, so ensure you have an instruction web
page up there to follow from. Run a google search on how to use Ubuntu
to rectify an lvm. If you find the right one, it'll have all the
instructions you need- except for the inittab: found that out the hard
way. If you don't fix that, you get a selinux error and it won't boot
properly.


I think you're confusing inittab with fstab (or initrd). The inittab
file has no reference to the root device.


Yes, I do apologise for the confusion. I rectified that in a later
email.

Good luck

Yeah, that's always needed.

I'd suggest that new Fedora releases create a random name for the VG and
that their initrd/nash support getting the vg from the root= kernel
command line.

Regards,
Luciano Rocha

You don't think setting it to the machine name is any good? Given
current install procedures, what do you suggest to prevent this?
Obviously something manually.

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list



Relevant Pages

  • Re: Install XP Pro
    ... > partitions of the two HD in the PC (Root C+E+F), ... > A pain because many of these applications were downloaded. ... > I copy my second HD onto the third disk ... > I install the cleaned second HD in the bay where the root was. ...
    (microsoft.public.windowsxp.general)
  • Re: ubuntu-users Digest, Vol 56, Issue 402
    ... Play With Ubuntu, Now Mac Won't Boot! ... openoffice3..deb and install it). ... thanks for letting me change the magnetic patterns on your hard disk. ... Play With Ubuntu, Now Mac Won't Boot! ...
    (Ubuntu)
  • Re: lvm re-install strategy
    ... The other machine is just have to be able to see the disk. ... You might find that if you go back and re-read the documentation for LVM ... If that is the case then with the DVD install just create a new logical ... My idea is to devote sda to the system, so one vg on sda2 with logical ...
    (Fedora)
  • Re: Windows Xp crash
    ... The Bios is not showing any hard drives. ... Message came up "Disk Boot failure.: ... I tried about a week ago to install Windows 7 on the second hard ...
    (microsoft.public.windowsxp.hardware)
  • Re: Windows Xp crash
    ... Message came up "Disk Boot failure.: ... indicated that all drives had no disk inserted. ... I tried about a week ago to install Windows 7 on the second hard ...
    (microsoft.public.windowsxp.hardware)