Score:0

Cannot Mount Old Ubuntu Drive connected via USB: mount unknown filesystem type 'LVM2_member'

gr flag

I am trying to mount a previous Ubuntu 20.04 boot drive (250GB M.2 NVMe SSD in a USB-C adapter) to a Ubuntu 20.04 machine at /mnt/foo.

However, when I try to mount the drive by doing

$ sudo mount /dev/sda3 /mnt/foo

we get the error

mount: /mnt/foo: unknown filesystem type 'LVM2_member'.

What is the correct way to mount the drive?

fdisk -l Output:

$ sudo fdisk -l
Disk /dev/loop0: 29.9 MiB, 31334400 bytes, 61200 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 /dev/loop1: 54.98 MiB, 57626624 bytes, 112552 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 /dev/loop2: 71.28 MiB, 74735616 bytes, 145968 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 /dev/nvme0n1: 1.88 TiB, 2048408248320 bytes, 4000797360 sectors
Disk model: Sabrent                                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4F5505BA-4DC5-4E54-BADB-6CA15134B2FE

Device           Start        End    Sectors  Size Type
/dev/nvme0n1p1    2048    1050623    1048576  512M EFI System
/dev/nvme0n1p2 1050624    3147775    2097152    1G Linux filesystem
/dev/nvme0n1p3 3147776 4000794623 3997646848  1.9T Linux filesystem


Disk /dev/mapper/ubuntu--vg-ubuntu--lv: 100 GiB, 107374182400 bytes, 209715200 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 /dev/sda: 232.91 GiB, 250059350016 bytes, 488397168 sectors
Disk model:                 
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 4EB53D3C-C99A-4591-A7DF-12CF5846048B

Device       Start       End   Sectors   Size Type
/dev/sda1     2048   1050623   1048576   512M EFI System
/dev/sda2  1050624   3147775   2097152     1G Linux filesystem
/dev/sda3  3147776 488394751 485246976 231.4G Linux filesystem

lvmdiskscan Output:

$ sudo lvmdiskscan
  /dev/nvme0n1   [       1.86 TiB] 
  /dev/loop0     [      29.88 MiB] 
  /dev/nvme0n1p1 [     512.00 MiB] 
  /dev/loop1     [     <54.96 MiB] 
  /dev/sda1      [     512.00 MiB] 
  /dev/nvme0n1p2 [       1.00 GiB] 
  /dev/loop2     [      71.27 MiB] 
  /dev/sda2      [       1.00 GiB] 
  /dev/nvme0n1p3 [       1.86 TiB] LVM physical volume
  /dev/sda3      [     231.38 GiB] LVM physical volume
  0 disks
  8 partitions
  0 LVM physical volume whole disks
  2 LVM physical volumes

vgs Output:

  VG            #PV #LV #SN Attr   VSize   VFree
  ubuntu-vg       1   1   0 wz--n-   1.86t    0 
  ubuntu-vg-old   1   1   0 wz--n- 231.38g    0 

vgdisplay Output:

$ sudo vgdisplay
  --- Volume group ---
  VG Name               ubuntu-vg-old
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  4
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               231.38 GiB
  PE Size               4.00 MiB
  Total PE              59234
  Alloc PE / Size       59234 / 231.38 GiB
  Free  PE / Size       0 / 0   
  VG UUID               MUXzXK-TeF2-I723-SjZ5-I8is-s0WJ-DncRZ1
   
  --- Volume group ---
  VG Name               ubuntu-vg
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  6
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               1
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               1.86 TiB
  PE Size               4.00 MiB
  Total PE              487993
  Alloc PE / Size       487993 / 1.86 TiB
  Free  PE / Size       0 / 0   
  VG UUID               l0V9Sg-oVzo-M3bs-dC7A-WVr9-pZig-CX6a9D

After trying random commands, the following worked:

sudo vgrename <UID-of-old-VG> ubuntu-vg-old
sudo vgchange -a y
sudo mount /dev/mapper/ubuntu--vg--old-ubuntu--lv /mnt/foo
ChanganAuto avatar
us flag
The correct way it to use lvm tools, just like the error messages states.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.