After upgrading from 14.04 to 16.06 my system failed.
I have done a fresh install on a new drive, but that failed too...
I have done another install but now when trying to mount my original drive with all my files on I get this message:
pst007x@Home-Server:~$ sudo mount /dev/sdb5 /media/newhd
[sudo] password for pst007x:
mount: unknown filesystem type 'LVM2_member'
pst007x@Home-Server:~$
I have installed 'lvm2' from the repos and gparted sees the drive, however Nautilus does not see the drive and therefore not mounted.
Any advise?
EDIT:
I tried this:
pst007x@Home-Server:~$ sudo apt-get install lvm2
Reading package lists... Done
Building dependency tree
Reading state information... Done
lvm2 is already the newest version (2.02.133-1ubuntu10).
0 to upgrade, 0 to newly install, 0 to remove and 0 not to upgrade.
pst007x@Home-Server:~$ sudo vgs
VG #PV #LV #SN Attr VSize VFree
ubuntu-vg 1 2 0 wz--n- 465.28g 0
ubuntu-vg 1 2 0 wz--n- 465.52g 52.00m
pst007x@Home-Server:~$ sudo 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
pst007x@Home-Server:~$ sudo lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
root ubuntu-vg -wi-ao---- 461.28g
root ubuntu-vg -wi------- 461.47g
swap_1 ubuntu-vg -wi------- 4.00g
swap_1 ubuntu-vg -wi-ao---- 4.00g
pst007x@Home-Server:~$ sudo modprobe dm-mod
pst007x@Home-Server:~$ sudo 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
pst007x@Home-Server:~$ sudo vgchange -ay ubuntu-vg
device-mapper: create ioctl on ubuntu--vg-rootLVM-xhGIrhlZUAJeJA3fWJOOSvuTUO3vZOH9tqZgBj8dGOLHoYzCStcE02NcX8UGpglD failed: Device or resource busy
1 logical volume(s) in volume group "ubuntu-vg" now active
pst007x@Home-Server:~$ ls /mnt/
fcroot
pst007x@Home-Server:~$ ls /dev/mapper
control ubuntu--vg-root ubuntu--vg-swap_1
pst007x@Home-Server:~$ sudo 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
pst007x@Home-Server:~$ sudo lvscan
ACTIVE '/dev/ubuntu-vg/root' [461.28 GiB] inherit
inactive '/dev/ubuntu-vg/swap_1' [4.00 GiB] inherit
inactive '/dev/ubuntu-vg/root' [461.47 GiB] inherit
ACTIVE '/dev/ubuntu-vg/swap_1' [4.00 GiB] inherit
pst007x@Home-Server:~$
Not to detract from the accepted answer, but wanted to offer a more complete solution that hasn't failed me yet.
run into
mount: unknown filesystem type 'LVM2_member'
do the commands belowYou used the exact same name (ubuntu-vg) for your new volume group as the old volume group. You must give them unique names. You can rename one of the groups using
vgrename
and its UUID.Find the UUID with
vgdisplay
and then rename the volume group:I just recently installed Ubuntu 16.04 using LVM. I have just done this once, so I won't claim to be an authority on this. My quick take, you are using incorrect syntax. Below is a copy of my "fstab" file. Note the syntax for mounting a logical volume.
I would also suggest obtaining "Logical Volume Management" from the Ubuntu Software Center" and studying the graphical image display. Use that image to ascertain your mount points with VLM. You can also see your disk drive layout under LVM by using the command below:
I also wrote a short tutorial (based on my one and only experience), which may be of some use: Create Logical "Home" Volume When Using Logical Volume Management (VLM)
PS: If you do a clean install of Ubuntu, there is a checkbox for using LVM (in my case), so there is no need to actually install LVM should you see that checkbox and check it.
Here is a solution that also works for cloned disks, unlike the accepted answer.
This happens because both your old and new installation use LVM, probably because you enabled hard disk encryption. Ubuntu will use
ubuntu-vg
as the volume group name (similar to a disk name) for the installation, and this causes a problem because LVM can only access one of the volume groups in case two or more have the same volume group name. In your case, one is already in use since booting the system, so trying to access the other installation fails.This is pretty identical to the issue when you want to use LVM to access both a disk and its clone. The LVM system provides the
vgimportclone
command for this purpose. Compared to the currently accepted answer, this has the advantage that it allows renaming the inaccessible volume group, which is not possible withvgrename
for cases where you cannot find out the VG UUID, for example because it is the same as an existing one, as in cases of cloned disks.Instructions:
If the LVM volume group is on an encrypted partition, first open the encrypted partition to make it visible to LVM commands:
Then use
vgimportclone
to rename the volume group:In case of an unencrypted LVM volume group, use
/dev/sdb5
in place of/dev/mapper/sdb5_crypt
as the device identifier.The devices in the volume group now named
ubuntu-vg-old
should now be available for mounting by clicking on the corresponding device in a file manager, or for manual mounting with:If mounting does not yet work, you might have to disconnect and reconnect the encrypted partition to let Ubuntu recognize the changed volume group name:
Try the following steps from the shell:
sudo bash vgdisplay vgrename new_name modprobe dm-mod vgchange -ay lvscan mount /dev/new_name/root /mnt
After renaming will I be lost any data. (As we have migrated disk from one server to another and we are getting same error. Just to make sure before making changes prod environment )
That's not the way LV's are mounted, you're missing some important parts.
After creating the Logical Volume (LV) that belongs to a Volume Group (VG) that's part of one or more Physical Volume/s (PV), you need to find the path to the volume.
You can do that by
lvdisplay
and you'll see something likeLV Path /dev/books-vg/books_volume
You're going to copy this path, and create a Filesystem (because it's not a Filesystem yet, it's just a Partition - and that's why you can't mount it). So you need to format this Partition and create the Filesystem:
the output will look something like
And now, finally, you can mount the volume: