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.