Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I had Ubuntu 13.04 installed on my laptop.

Rather than upgrading, I decided to install 14.04 fresh on a new SSD.

So, I have two drives. One with 13.04 and my old data, and one with 14.04. Both Ubuntu instances were installed using the default "Erase disk and install Ubuntu" option with LVM checked.

I'm trying to mount my old drive, now, to migrate data over. However, the name for the name for the LVM partition is the same and thus not allowing it to appear.

How can I get around this? Can I rename it?

Some diagnostics...

root@computer:/# fdisk -lu

Disk /dev/sda: 240.1 GB, 240057409536 bytes
255 heads, 63 sectors/track, 29185 cylinders, total 468862128 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00087708

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048      499711      248832   83  Linux
/dev/sda2          501758   468860927   234179585    5  Extended
/dev/sda5          501760   468860927   234179584   8e  Linux LVM

Disk /dev/mapper/ubuntu--vg-root: 222.7 GB, 222746902528 bytes
255 heads, 63 sectors/track, 27080 cylinders, total 435052544 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-root doesn't contain a valid partition table

Disk /dev/mapper/ubuntu--vg-swap_1: 17.0 GB, 17049845760 bytes
255 heads, 63 sectors/track, 2072 cylinders, total 33300480 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/mapper/ubuntu--vg-swap_1 doesn't contain a valid partition table

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x000903b4

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1   *        2048      499711      248832   83  Linux
/dev/sdb2          501758   976771071   488134657    5  Extended
Partition 2 does not start on physical sector boundary.
/dev/sdb5          501760   976771071   488134656   8e  Linux LVM

root@computer:/# pvscan
  PV /dev/sdb5   VG ubuntu-vg   lvm2 [465.52 GiB / 48.00 MiB free]
  PV /dev/sda5   VG ubuntu-vg   lvm2 [223.33 GiB / 0    free]
  Total: 2 [688.85 GiB] / in use: 2 [688.85 GiB] / in no VG: 0 [0   ]

root@computer:/# vgscan
  Reading all physical volumes.  This may take a while...
  Found volume group "ubuntu-vg" using metadata type lvm2
  Found volume group "ubuntu-vg" using metadata type lvm2

root@computer:/# lvscan 
  inactive          '/dev/ubuntu-vg/root' [449.60 GiB] inherit
  inactive          '/dev/ubuntu-vg/swap_1' [15.88 GiB] inherit
share|improve this question
    
Just a guess, but you could try temporarily mounting the old LV via its UUID (obtained from sudo blkid -c /dev/null) using mount -U? You probably could simply use lvrename however this may cause difficulties if you ever need to reboot the old system. –  steeldriver Jul 23 at 18:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.