Ive been tearing my hair out for about a week now trying to figure out how to do this.
I have two HDD's in my server, both 250gig. They both have ubuntu installed, one is currently booted. I want to mount the second (old) drive to /mnt/external
If I mount through /dev/disk/by-uuid
It just mounts the boot partition, and not my actual data.
I also tried vgs-v
to determine, but the names are the same, and don't know where to go from here.
root@onlinelabtests:~# vgs -v
Finding all volume groups
Finding volume group "SysVolGroup"
Archiving volume group "SysVolGroup" metadata (seqno 3).
Archiving volume group "SysVolGroup" metadata (seqno 3).
Creating volume group backup "/etc/lvm/backup/SysVolGroup" (seqno 3).
Finding volume group "SysVolGroup"
Archiving volume group "SysVolGroup" metadata (seqno 3).
Archiving volume group "SysVolGroup" metadata (seqno 3).`
Creating volume group backup "/etc/lvm/backup/SysVolGroup" (seqno 3).
VG Attr Ext #PV #LV #SN VSize VFree VG UUID
SysVolGroup wz--n- 4.00m 1 2 0 233.72g 0 812dMv-qSf3-xnpP-khlB-mkIf-q64l-Z2Rawf
SysVolGroup wz--n- 4.00m 1 2 0 233.72g 0 Z3IbWM-FEvq-n6fs-lhm9-5uQq-mdxj-QNfDLJ
and this
root@onlinelabtests:~# vgchange -a y
2 logical volume(s) in volume group "SysVolGroup" now active
2 logical volume(s) in volume group "SysVolGroup" now active
But /dev/disk/by-uuid
still doesnt show anything else.
Any help appreciated.
I had a similar issue on my system. I just renamed the external logical volume group.
Beware that this probably makes the renamed drive unbootable! I don't know which files you have to change so you can boot again afterwards.
First get UUID of group to rename. I used
I want to rename the first one. Because this is my thumb drive.
Now I know the UUID and can execute a rename. Maybe a mount could also work with the UUID but I didn't care about it.
To mount an external hard-disk (LVM2 and EXT4 partitions):
Check the UID number of the hard-disk
Mount your hard-disk:
Activate the mount volume:
Take a look at
/dev/SysVolGroup
and/ordev/mapper
Now mount the partitions listed there
Please take care, Volume groups with the same name can cause problems, I would change the name of one of the two.