0

I’ve had a bit of a hunt around, and tried LOTS of things for the following problem. I feel like I’m near the end of it.

I run Ubuntu Studio 18.04 on a few PCs, with LVM. I pulled the Hard Drive from an old 32 bit based machine, and I am trying to mount it as an external drive via USB to another PC - Ubuntu 18.04, 64 Bit.

I just want to read the contents and copy files and folders to the new PC and another external backup HDD.

In Windows and Macs, pulling an OS disk and plugging it into another PC via USB -- normally reads and mounts the disk straight away, and I am able to go ahead and copy / read write files.

On Linux / Ubuntu Studio - after reading several articles,
and trial and error, here is where I am up to :

I have installed some kind of “LVM2” drivers (I think) - I believe I used :

sudo apt-get install lvm2

I have read this article

https://ixnfo.com/en/solving-the-error-mount-unknown-filesystem-type-lvm2_member.html

Which, among another couple of articles, pointed me to use lvdisplay to get the name of the LVM.

As my logical volumes have the same name - (My PC and Ext HDD / former PC which both ran ubuntu studio)

These are the lvdisplay outputs - (removing all the other unnecessary info and swap partitions from lvdisplay output - and I have obviously changed the name of the UUIDs)

  --- Logical volume ---

LV Path /dev/ubuntu-studio-vg/root

VG Name ubuntu-studio-vg

LV Size 464.80 GiB

LV UUID 1234abc-1234-abc

--- Logical volume ---

LV Path /dev/ubuntu-studio-vg/root

VG Name ubuntu-studio-vg

LV Size <930.37 GiB

LV UUID 789xyz-789xyz-789xyz

I then try the info in this article

how to mount by UUID without using /etc/fstab

Using Thomas’s answers near the top as follows :

From the manpage of mount. -U, --uuid uuid

Mount the partition that has the specified uuid.

So your mount command should look like as follows.

mount -U 1234-SOME-UUID /some/mount/folder

or mount --uuid 1234-SOME-UUID /some/mount/folder

A third possibility would be mount UUID=1234-SOME-UUID /some/mount/folder

I have tried the one with the syntax in bold

mount -U 1234-SOME-UUID /some/mount/folder

It doesn’t work. I get :

mount: /media: can't find UUID=1234-SOME-UUID

Now, I feel a bit stuck.

I seek help from the wizards.

Help! (:

Thanks so much for any answers.

Additional data:

:~$ lsblk -f 
NAME FSTYPE LABEL UUID MOUNTPOINT
sda 
└─sda1 LVM2_member Lmc6Lt-lBPY-Xdwg-mjLb-lf0B-########      
   ├─ubuntu--studio--vg-root ext4 6e198faf-7911-4ce4-8008-######## 
   └─ubuntu--studio--vg-swap_1 swap 877d70a6-8422-4c2d-bb99-######## 
:~$ sudo mount -U leUvLc-DuXM-vvcl-vBPr-2thG-####### /media 
mount: /media: unknown filesystem type 'LVM2_member'. 
:~$ blkid /dev/sdb1
UUID="leUvLc-DuXM-vvcl-vBPr-2thG-#######"  TYPE="LVM2_member" PARTUUID="8f065194-01" 
:~$ sudo mount -U leUvLc-DuXM-vvcl-vBPr-2thG-####### /media 
mount: /media: unknown filesystem type 'LVM2_member'.
berndbausch
  • 3,557
spaz
  • 1
  • The disk doesn't have that UUID. I suspect the filesystem is not recognized. Use lsblk -f or blkid to list all storage UUIDs that your computer is aware of. Feel free to add the output to the question if you need more help. – berndbausch Apr 10 '21 at 08:46
  • Thanks very much for your help berndbausch . Unfortunately I seem to be in the same position. Here is the outputs -- I tried mounting the UUID they both output -- all outputs and inputs tried are as follows -- I have modified the last digits of my UUIDs though - EDIT -- I don't know how to post it all with the char limit of this post, I'll edit it and post in following comments. – spaz Apr 11 '21 at 04:32
  • :~$ lsblk -f

    NAME FSTYPE LABEL UUID MOUNTPOINT

    sda

    └─sda1 LVM2_member Lmc6Lt-lBPY-Xdwg-mjLb-lf0B-########

    ├─ubuntu--studio--vg-root ext4 6e198faf-7911-4ce4-8008-########

    └─ubuntu--studio--vg-swap_1 swap 877d70a6-8422-4c2d-bb99-########

    :~$ sudo mount -U leUvLc-DuXM-vvcl-vBPr-2thG-####### /media

    mount: /media: unknown filesystem type 'LVM2_member'.

    – spaz Apr 11 '21 at 04:35
  • :~$ blkid

    /dev/sdb1: UUID="leUvLc-DuXM-vvcl-vBPr-2thG-#######" TYPE="LVM2_member" PARTUUID="8f065194-01"

    :~$ sudo mount -U leUvLc-DuXM-vvcl-vBPr-2thG-####### /media mount: /media: unknown filesystem type 'LVM2_member'.

    – spaz Apr 11 '21 at 04:36
  • Next time, add data to the question, not comments. – berndbausch Apr 11 '21 at 10:58
  • 1
    I am a bit surprised that lsblk doesn't discover sdb. In any case, sdb1 is formatted as a physical volume, which you are trying to mount. This doesn't work. You need to mount filesystems. However, the volume group that sdb1 was a member of is not recognized. Can you perform the pvscan /dev/sdb1 and pvs commands to see what is on that physical volume? – berndbausch Apr 11 '21 at 11:20
  • Note that the regular filesystem and partition UUIDs are hexadecimal, while LVM "UUIDs" contain all kinds of letters - or in other words, LVM uses a non-standard representation for its UUIDs. A filesystem with type "LVM2_member" is a LVM physical volume: a container for one or more logical volumes, or pieces of them. You must first activate the logical volume before you can mount it. If all the pieces of a logical volume are present, the activation can be automatic - but if a piece of a LV is on another disk that's not present, it can only be activated manually in partial mode. – telcoM Apr 11 '21 at 12:32
  • Thanks berndbausch (and mods for your formatting of my poorly formatted comments). Your suggestions returned the following - //==================// :~$ sudo pvscan /dev/sdb1 Command does not accept argument: /dev/sdb1.

    //==================//

    :~$ sudo pvscan /dev/sdb Command does not accept argument: /dev/sdb.

    //==================//

    ~$ sudo pvs PV VG Fmt Attr PSize PFree
    /dev/sda1 ubuntu-studio-vg lvm2 a-- <465.76g 4.00m /dev/sdb1 ubuntu-studio-vg lvm2 a-- <931.51g 192.00m

    //==================//

    – spaz Apr 13 '21 at 08:49
  • ~$ sudo pvscan PV /dev/sda1 VG ubuntu-studio-vg lvm2 [<465.76 GiB / 4.00 MiB free] PV /dev/sdb1 VG ubuntu-studio-vg lvm2 [<931.51 GiB / 192.00 MiB free] Total: 2 [1.36 TiB] / in use: 2 [1.36 TiB] / in no VG: 0 [0 ] – spaz Apr 13 '21 at 08:50
  • @ telcoM : thanks for that information. I did read what you mentioned about the non-hex “UUID” for LVMs in a separate stack-ex thread (perhaps LinuxUnix forums, possibly ubuntu forums) - But I was unsure what the crux of that explanation was or how it would help. The disk in question and LVM are entirely self contained. The LVM exists only on the one HDD. It is an Ubuntu Studio (xubuntu) install on which I selected LVM during the installation.

    I like your suggestion, and I suppose it is what I am asking : How do I activate the LVM, since it is not automatically activating? Thanks.

    – spaz Apr 13 '21 at 09:01
  • Hopefully my previous comments were not incoherent - I tried formatting in markdown (which I'm not familiar with) using > for blockquotes etc. but it didn't seem to work. Hopefully the terminal inputs I tried and their returns were understandable. Would still love to know how to mount an LVM if anybody out there knows. Thanks. – spaz Apr 20 '21 at 23:15
  • Dear community : I am still wondering the answer to this question. – spaz May 08 '21 at 09:51
  • Dear super smart linux experts - I'm still stuck on this problem! If anyone can figure it out it would be awesome. – spaz Jun 02 '21 at 08:31

1 Answers1

0

I had a similar issue with disks being moved to a server with the same VG and LV names. I also tried to manually mount via command line and got the same error:

"mount: /media: can't find UUID=1234-SOME-UUID"

I was able to look inside the disk with the pvdisplay "-m" flag and confirm we were able to see the LVs, names were intact:

pvdisplay /dev/xvdf -m

Give this a try. I start off by looking to see if the FSTYPE shows in lsblk:

lsblk -f

Get UUIDs of the VGs:

pvs -o +vg_uuid

Rename the VG by using the UUID from above command (since both have the same vgname).

vgrename <UUID> <NewVGname>

Check/make sure the LVs are showing ACTIVE in lvscan. If they're not, run:

modprobe dm-mod
vgchange -ay

They should now be ACTIVE and mountable:

lvscan
mount /dev/mapper/newname /mnt/mntpoint
lsblk -f

You can now edit /etc/fstab to make the mounts persist through reboots.