When I try to mount a partition, I get the following error
[root@sysresccd ~]# mount /dev/nvme0n1p3 /mnt mount: /mnt: unknown filesystem type 'LVM2_member'. [root@sysresccd ~]#
This is because the disk is LVM. First of all identify the name of the volume group and logical volume.
vgs lvs
Example
[root@sysresccd ~]# vgs VG #PV #LV #SN Attr VSize VFree vg 2 3 0 wz--n- <1.82t 0 [root@sysresccd ~]# lvs LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert root vg -wi-a----- 1.80t swap vg -wi-a----- <15.69g tmp vg -wi-a----- 1.00g [root@sysresccd ~]#
From the above result, we found the server has 3 logical volumes. The biggest volume is root. Other volumes swap and tmp we can ignore. So the device name is
/dev/vg/root
Next run
modprobe dm-mod lvscan vgchange -ay
Example
[root@sysresccd ~]# lvscan ACTIVE '/dev/vg/swap' [<15.69 GiB] inherit ACTIVE '/dev/vg/tmp' [1.00 GiB] inherit ACTIVE '/dev/vg/root' [1.80 TiB] inherit [root@sysresccd ~]# vgchange -ay 3 logical volume(s) in volume group "vg" now active [root@sysresccd ~]#
Now you should be able to mount with disk using command
mount /dev/vg/root /mnt/
Leave a Reply