mount error

haglo

Member
Jul 24, 2020
16
2
8
63
My Probelm:
When i want mount filesystem, i get the following error:
Code:
mount /dev/sdb1 /data
mount: /data: unknown filesystem type 'LVM2_member'.



----------------------------------------------------------------------------------
1) I have two RAID1 - HDD (sda & sdb):

root@neuro1:/var/log# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 500G 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part /boot/efi
└─sda3 8:3 0 499.5G 0 part
├─pve-swap 253:1 0 8G 0 lvm [SWAP]
├─pve-root 253:2 0 96G 0 lvm /
├─pve-data_tmeta 253:3 0 3.8G 0 lvm
│ └─pve-data-tpool 253:5 0 371.9G 0 lvm
│ ├─pve-data 253:6 0 371.9G 0 lvm
│ ├─pve-vm--100--disk--0 253:7 0 20G 0 lvm
│ └─pve-vm--101--disk--0 253:8 0 40G 0 lvm
└─pve-data_tdata 253:4 0 371.9G 0 lvm
└─pve-data-tpool 253:5 0 371.9G 0 lvm
├─pve-data 253:6 0 371.9G 0 lvm
├─pve-vm--100--disk--0 253:7 0 20G 0 lvm
└─pve-vm--101--disk--0 253:8 0 40G 0 lvm
sdb 8:16 0 5T 0 disk
└─sdb1 8:17 0 5T 0 part
└─HDD5TB-vm--101--disk--0 253:0 0 100G 0 lvm
sr0 11:0 1 1024M 0 rom


----------------------------------------------------------------------------------
2) I want now mount /dev/sdb1 via:

mount /dev/sdb1 /data
mount: /data: unknown filesystem type 'LVM2_member'.


-------------------------------------------------
3) Analysing of /dev/sdb1 via pvs, lvs and vgs:

pvs /dev/sdb1
PV VG Fmt Attr PSize PFree
/dev/sdb1 HDD5TB lvm2 a-- <4.97t 4.87t

lvs /dev/sdb1
Volume group "sdb1" not found
Cannot process volume group sdb1

vgs /dev/sdb1
Volume group "sdb1" not found
Cannot process volume group sdb1


=================================
4) Question
What must i do to mount /dev/sdb1?
 
Last edited:
As far as I can tell: sdb1 is used as PV (physical volume) for VG (volume group) "HDD5TB". This VG holds one logical volume (LV) = disk for vm 101.

A PV can not be mounted as a "normal" file system. If your goal was to mount the disk of the vm in the host, do the following:
  1. make sure the vm is turned off
  2. use losetup --partscan /dev/loop0 /dev/HDD5TB/vm-101-disk-0 to tell the kernel, that this "file" should be treated as a disk
  3. use mount /dev/loop0<partition> /<mountpoint> to mount this partition
  4. do stuff
  5. use umount /dev/loop0<partition> to unmount
  6. use losetup -d /dev/loop0 to detach the disk
Hope, I could help :)
 
Last edited:
Thanks for the reply!!!
how can i get the value for <partition> in
Code:
mount /dev/loop0<partition>


I have tried with the following error:

Code:
mount /dev/loop0 /data
mount: /data: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
 
Last edited:
Either by auto completion (<tab>) or using lsblk
 
Autocomplition give nothing.

Output of lsblk is:
Code:
root@neuro1:/# lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
loop0                          7:0    0   100G  0 loop
sda                            8:0    0   500G  0 disk
├─sda1                         8:1    0  1007K  0 part
├─sda2                         8:2    0   512M  0 part /boot/efi
└─sda3                         8:3    0 499.5G  0 part
  ├─pve-swap                 253:1    0     8G  0 lvm  [SWAP]
  ├─pve-root                 253:2    0    96G  0 lvm  /
  ├─pve-data_tmeta           253:3    0   3.8G  0 lvm
  │ └─pve-data-tpool         253:5    0 371.9G  0 lvm
  │   ├─pve-data             253:6    0 371.9G  0 lvm
  │   ├─pve-vm--100--disk--0 253:7    0    20G  0 lvm
  │   └─pve-vm--101--disk--0 253:8    0    40G  0 lvm
  └─pve-data_tdata           253:4    0 371.9G  0 lvm
    └─pve-data-tpool         253:5    0 371.9G  0 lvm
      ├─pve-data             253:6    0 371.9G  0 lvm
      ├─pve-vm--100--disk--0 253:7    0    20G  0 lvm
      └─pve-vm--101--disk--0 253:8    0    40G  0 lvm
sdb                            8:16   0     5T  0 disk
└─sdb1                         8:17   0     5T  0 part
  └─HDD5TB-vm--101--disk--0  253:0    0   100G  0 lvm
sr0                           11:0    1  1024M  0 rom
 
That's odd...

What is the output of parted /loop0 print?
 
Code:
parted /loop0 print
Error: Could not stat device /loop0 - No such file or directory.
 
Sorry, it should have said parted /dev/loop0 print
 
Code:
parted /dev/loop0 print
Model: Loopback device (loopback)
Disk /dev/loop0: 107GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags:

Number  Start  End    Size   File system  Flags
 1      0.00B  107GB  107GB  ext4
 
Interesting... The partition is there, but the kernel did not find it. Are you sure, you specified --partscan when running losetup? I can't think of any other Problem... I tried it by myself and everything worked fine...
 
Code:
losetup --partscan /dev/loop0 /dev/HDD5TB/vm-101-disk-0
losetup: /dev/HDD5TB/vm-101-disk-0: failed to set up loop device: Device or resource busy

This is the output
 
This is because the device /dev/loop0 is already in use. Try to detach it first (losetup -d /dev/loop0)
 
Now it works

Code:
losetup -d /dev/loop0
losetup --partscan /dev/loop0 /dev/HDD5TB/vm-101-disk-0

No error
 
Can you now see the partitions? This should no work from my point of view :)
 
Hmmmm

I get again the error:

Code:
mount /dev/loop0 /data
mount: /data: wrong fs type, bad option, bad superblock on /dev/loop0, missing codepage or helper program, or other error.
 
There is still no partition? For me, it would be something like /dev/loop0p1
 
Code:
mount /dev/loop0p1 /data
mount: /data: special device /dev/loop0p1 does not exist.

How can i get out the correct name for /dev/loop0p1
 
  • Like
Reactions: abewartech