Help : mount LVM issue
KK CHN
kkchn.in at gmail.com
Wed Jul 28 12:44:31 UTC 2021
List,
I am in the process of uploading OS and data LVM disk image from
ovirt(KVM) files fo our OpenStack Ussuri setup with KVM and glance.
I am able to upload the disk ( qcow2 images and profile the VM image). But
I could not able to get the logical volume visible to the populated VM.
Here the data volume is LVM partition as another disk image handed over to
us by our service provider.
here the steps I followed to get the LVM partition (/dev/vdc2) in question
to get visible to our VM without success.
Kindly help to solve this issue.
##################################################
[root at ma-app ~]# fdisk -l
Disk /dev/vda: 64.4 GB, 64424509440 bytes, 125829120 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 label type: dos
Disk identifier: 0x0009e4d7
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 125829086 62913519+ 83 Linux
Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 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/vdc: 53.7 GB, 53687091200 bytes, 104857600 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 label type: dos
Disk identifier: 0x000ac064
Device Boot Start End Blocks Id System
/dev/vdc1 * 2048 2099199 1048576 83 Linux
/dev/vdc2 2099200 104857599 51379200 8e Linux LVM
[root at ma-app ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rhel 1 2 0 wz--n- <49.00g 0
[root at ma-app ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rhel 1 2 0 wz--n- <49.00g 0
[root at ma-app ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 59G 1.5G 56G 3% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.5M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 783M 0 783M 0% /run/user/0
[root at ma-app ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rhel 1 2 0 wz--n- <49.00g 0
[root at ma-app ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync
Convert
root rhel -wi------- <44.00g
swap rhel -wi------- 5.00g
[root at ma-app ~]# vgs
VG #PV #LV #SN Attr VSize VFree
rhel 1 2 0 wz--n- <49.00g 0
[root at ma-app ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 59G 1.5G 56G 3% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.5M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 783M 0 783M 0% /run/user/0
[root at ma-app ~]# lvdisplay
--- Logical volume ---
LV Path /dev/rhel/swap
LV Name swap
VG Name rhel
LV UUID Q2X9BK-7VXr-g9BB-JA5v-K7yR-yRBf-G61vZV
LV Write Access read/write
LV Creation host, time localhost, 2018-04-19 12:01:04 -0400
LV Status NOT available
LV Size 5.00 GiB
Current LE 1280
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/rhel/root
LV Name root
VG Name rhel
LV UUID laUf04-Ecwg-OHDc-vr1s-SB85-yN8O-Us116d
LV Write Access read/write
LV Creation host, time localhost, 2018-04-19 12:01:05 -0400
LV Status NOT available
LV Size <44.00 GiB
Current LE 11263
Segments 1
Allocation inherit
Read ahead sectors auto
[root at ma-app ~]# lvscan
inactive '/dev/rhel/swap' [5.00 GiB] inherit
inactive '/dev/rhel/root' [<44.00 GiB] inherit
[root at ma-app ~]# pvscan
PV /dev/vdc2 VG rhel lvm2 [<49.00 GiB / 0 free]
Total: 1 [<49.00 GiB] / in use: 1 [<49.00 GiB] / in no VG: 0 [0 ]
[root at ma-app ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 59G 1.5G 56G 3% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.5M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 783M 0 783M 0% /run/user/0
[root at ma-app ~]# lvscan
inactive '/dev/rhel/swap' [5.00 GiB] inherit
inactive '/dev/rhel/root' [<44.00 GiB] inherit
[root at ma-app ~]# vgchange -ay rhel
2 logical volume(s) in volume group "rhel" now active
[root at ma-app ~]# lvscan
ACTIVE '/dev/rhel/swap' [5.00 GiB] inherit
ACTIVE '/dev/rhel/root' [<44.00 GiB] inherit
[root at ma-app ~]# fdisk -l
Disk /dev/vda: 64.4 GB, 64424509440 bytes, 125829120 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 label type: dos
Disk identifier: 0x0009e4d7
Device Boot Start End Blocks Id System
/dev/vda1 * 2048 125829086 62913519+ 83 Linux
Disk /dev/vdb: 10.7 GB, 10737418240 bytes, 20971520 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/vdc: 53.7 GB, 53687091200 bytes, 104857600 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 label type: dos
Disk identifier: 0x000ac064
Device Boot Start End Blocks Id System
/dev/vdc1 * 2048 2099199 1048576 83 Linux
/dev/vdc2 2099200 104857599 51379200 8e Linux LVM
Disk /dev/mapper/rhel-swap: 5368 MB, 5368709120 bytes, 10485760 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/mapper/rhel-root: 47.2 GB, 47240445952 bytes, 92266496 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
[root at ma-app ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 59G 1.5G 56G 3% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.5M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 783M 0 783M 0% /run/user/0
[root at ma-app ~]# mount /dev/vdc1 /mnt
[root at ma-app ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 59G 1.5G 56G 3% /
devtmpfs 3.9G 0 3.9G 0% /dev
tmpfs 3.9G 0 3.9G 0% /dev/shm
tmpfs 3.9G 8.5M 3.9G 1% /run
tmpfs 3.9G 0 3.9G 0% /sys/fs/cgroup
tmpfs 783M 0 783M 0% /run/user/0
/dev/vdc1 1014M 178M 836M 18% /mnt
[root at ma-app ~]# umount /mnt
[root at ma-app ~]# mount /dev/vdc2 /mnt
mount: unknown filesystem type 'LVM2_member'
[root at ma-app ~]#
How to make this /dev/vdc2(LVM partiton) attached to the VM. ?
Thank you,
Kris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstack.org/pipermail/openstack-discuss/attachments/20210728/3caa0b6c/attachment.html>
More information about the openstack-discuss
mailing list