New user's registration have been closed due to high spamming and low trafic on this forum. Please contact forum admins directly if you need an account. Thanks !

Mount LVM "bubba" volumes in new B3

Got problems with your B2 or B3? Share and get helped!
Post Reply
yooakim
Posts: 43
Joined: 08 May 2007, 08:58

Mount LVM "bubba" volumes in new B3

Post by yooakim »

I'm not very experienced with LVM and have a hopefully simple question.

I recently upgraded my B3 by getting a new 3TB disk. I mounted this new disk and did a clean install of the B3. It is now up and working fine.

Next step was that I took the original hard disk from my B3 and attached it to the B3 via e-sata.

When I do a sudo pvs I get this:

Code: Select all

root@b3:/home/joakim# sudo pvs
  PV         VG    Fmt  Attr PSize PFree
  /dev/sda2  bubba lvm2 a-   2.72t    0
  /dev/sdb2  bubba lvm2 a-   1.81t    0
As you can see I have the two physical disk attached to my system. What I want to do is to mount the smaller disk /dev/sdb2/ so that I can copy the files off from this disk onto the new larger internal disk /dev/sda2/

I guess the problem is that the volume groups use the same name ("bubba")? if so, how can I fix this? It would be so nice if I can simply mount the old disk and just copy everything off of it.

I have tried to understand the LVM man pages but am not sure... and I don't want to risk damaging the disk. Can anyone more experienced with LVMs help me?

I'd be very grateful for any advice!
RandomUsername
Posts: 904
Joined: 09 Oct 2009, 18:49

Re: Mount LVM "bubba" volumes in new B3

Post by RandomUsername »

I encountered a similar problem (the lvm groups being the same) and ended up mounting the B2 lvm on a different machine and copying the files across the network.
Last edited by RandomUsername on 29 Sep 2011, 13:43, edited 1 time in total.
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: Mount LVM "bubba" volumes in new B3

Post by ryz »

I think this is what you want http://linux.die.net/man/8/vgrename.
I have not used it myself but I did find it trough some quick googeling.
yooakim
Posts: 43
Joined: 08 May 2007, 08:58

vgrename did it

Post by yooakim »

I solved this by attaching the disk to antoher Debian system which did not have a LVM volume group named "bubba". On that machine I simply renamed the volume group to "bubbaold".

I then re-attached the disk to the B3 box and was then able to mount the disk/volumes.

So now rsync is copying all the data, I uess it will take a while but it will be great when it's done. A 3TB B3 with a 3TB Bubba storage next to it. Feels secure!
ryz
Posts: 183
Joined: 12 Feb 2009, 06:03

Re: Mount LVM "bubba" volumes in new B3

Post by ryz »

Since I always wants to find solutions to problems I do know about even if I am not the one with the problem I just had to google a little bit more.

What I did find was that you should not need to put the disk in an other computer to change the LVM volume group name as long as the discs are not exact clones.

First you have to find out the LVM volumes UUID this can be found with the command

Code: Select all

vgs -v
Then you change the name of the LVM volume group with the command

Code: Select all

"vgrename <UUID> <new_group_name>
Where <UUID> is the UUID of the right LVM volume group and <>new_group_name> is the new name you want the group to have.

Sine I do not have two disk in my Bubba 2 I cant test if it works but if some one else has this problem it might solve the problem.
Post Reply