FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Redhat > Fedora User

 
 
LinkBack Thread Tools
 
Old 03-20-2008, 07:48 AM
Chris G
 
Default How to fix two disks with the same Volume Group?

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

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 08:53 AM
"Anoop Chandran"
 
Default How to fix two disks with the same Volume Group?

On Thu, Mar 20, 2008 at 2:18 PM, Chris G <cl@isbd.net> 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


Could you try vgrename? "man vgrename" for more info.
From man page - vgrename /dev/vg02 /dev/my_volume_group* renames existing volume group "vg02" to "my_volume_group".




--

Chris Green



--

fedora-list mailing list

fedora-list@redhat.com

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



--
- Anoop
<>_<>
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 09:12 AM
Da Rock
 
Default How to fix two disks with the same Volume Group?

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.

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.

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.

Good luck

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 09:22 AM
Luciano Rocha
 
Default How to fix two disks with the same Volume Group?

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
...

>
> 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).

> 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.

> 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

--
lfr
0/0
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 09:27 AM
Da Rock
 
Default How to fix two disks with the same Volume Group?

On Thu, 2008-03-20 at 20:12 +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.
>
> 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.
>
> 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.
>
> Good luck
>

Excuse me - fstab, not inittab.

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 09:58 AM
Da Rock
 
Default 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@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 10:16 AM
Chris G
 
Default How to fix two disks with the same Volume Group?

On Thu, Mar 20, 2008 at 03:23:08PM +0530, Anoop Chandran wrote:
>
> On Thu, Mar 20, 2008 at 2:18 PM, Chris G <[1]cl@isbd.net> 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
>
> Could you try vgrename? "man vgrename" for more info.
> From man page - vgrename /dev/vg02 /dev/my_volume_group renames existing
> volume group "vg02" to "my_volume_group".
>
Ah, but they're *both* called /dev/vg02 so that's no help.

However it turns out that vgrename understands UUIDs so the following
works:-

vgrename TdWFKp-H4tw-UrVq-Jmre-26hv-zmyE-IZXQLI MyVolGroup

It's not immediately clear from the man page that this works, but it
does - phew!

--
Chris Green

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 10:38 AM
Luciano Rocha
 
Default How to fix two disks with the same Volume Group?

On Thu, Mar 20, 2008 at 08:58:04PM +1000, Da Rock wrote:
>
> On Thu, 2008-03-20 at 10:22 +0000, Luciano Rocha wrote:
> > 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?

Yes, or you can boot to the installation screen, then switch to the 2nd
console (ctrl+alt+f2), where you'll find a command prompt.

> > 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.

Yes, if the change was made in the repair disk, the kernel version will
probably be different, and the paths are relative to the system's root.

But the rename can be done while the system is running, so only the
followin pass is missing:
0. vgrename ...

> > 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.

Currently the filesystem is defined before the network (and, thus, the
hostname). Also, you might have two different installations with the
same hostname (like a new install to a new set of hard disks).

But I do use the hostname as the VG, so I think that's best, probably
with current date appended (like: hostname080320).

Regards,
Luciano Rocha

--
lfr
0/0
--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 11:02 AM
Da Rock
 
Default How to fix two disks with the same Volume Group?

On Thu, 2008-03-20 at 11:38 +0000, Luciano Rocha wrote:
> On Thu, Mar 20, 2008 at 08:58:04PM +1000, Da Rock wrote:
> >
> > On Thu, 2008-03-20 at 10:22 +0000, Luciano Rocha wrote:
> > > 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?
>
> Yes, or you can boot to the installation screen, then switch to the 2nd
> console (ctrl+alt+f2), where you'll find a command prompt.
>
> > > 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.
>
> Yes, if the change was made in the repair disk, the kernel version will
> probably be different, and the paths are relative to the system's root.
>
> But the rename can be done while the system is running, so only the
> followin pass is missing:
> 0. vgrename ...
>
> > > 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.
>
> Currently the filesystem is defined before the network (and, thus, the
> hostname). Also, you might have two different installations with the
> same hostname (like a new install to a new set of hard disks).
>
> But I do use the hostname as the VG, so I think that's best, probably
> with current date appended (like: hostname080320).
>
> Regards,
> Luciano Rocha

Good to know. Thanks

--
fedora-list mailing list
fedora-list@redhat.com
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list
 
Old 03-20-2008, 12:46 PM
Les Mikesell
 
Default How to fix two disks with the same Volume Group?

Luciano Rocha wrote:


But I do use the hostname as the VG, so I think that's best, probably
with current date appended (like: hostname080320).


That doesn't sound particularly unique to me. If you set up a
dual/multi boot machine you'll probably want it to have the same
hostname regardless of the boot choice, and you are likely to install
the whole thing in the same day.


--
Les Mikesell
lesmikesell@gmail.com

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

Thread Tools




All times are GMT. The time now is 10:10 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org