Logical volumes does not get automounted after activating the LVM.
Environment
Red Hat Enterprise Linux 9
Red Hat Enterprise Linux 10
Issue
-
Logical volumes does not gets automatically mounted after activating the volume group .
-
In the RHEL 7 and RHEL 8 system the filesystem automounts after activating the volume group. RHEL 9 and higher version doesn't appear to perform this way.
Resolution
-
It is expected behavior in RHEL 9 and RHEL 10, that logical volumes (LVs) do not automatically mount after activating Logical Volume Management (LVM).
-
Manually mount the logical volumes.
Root Cause
- This is a normal behaviour in RHEL 9 and higher version.
Diagnostic Steps
- Unmounted the filesystem and manually deactivated the LVM or volume group, then reactivated volume group without running any mount commands manually:
- RHEL 8
[root@localhost ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvdata vgdata -wi-ao---- 2.00g /dev/vdb(0)
[root@localhost ~]# umount /test
[root@localhost ~]# vgchange -an vgdata
0 logical volume(s) in volume group "vgdata" now active
[root@localhost ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvdata vgdata -wi------- 2.00g /dev/vdb(0)
[root@localhost ~]# vgchange -ay vgdata
1 logical volume(s) in volume group "vgdata" now active
[root@localhost ~]# lvs
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvdata vgdata -wi-ao---- 2.00g /dev/vdb(0)
[root@localhost ~]# uname -r
4.18.0-553.33.1.el8_10.x86_64
- RHEL 9
[root@localhost ~]# lvs -ao +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvdata vgdata -wi-ao---- 19.99g /dev/sdb(0)
lvdata vgdata -wi-ao---- 19.99g /dev/sda(0)
[root@localhost ~]# umount /test
[root@localhost ~]# vgchange -an vgdata
0 logical volume(s) in volume group "vgdata" now active
[root@localhost ~]# lvs -ao +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvdata vgdata -wi------- 19.99g /dev/sdb(0)
lvdata vgdata -wi------- 19.99g /dev/sda(0)
[root@localhost ~]# vgchange -ay vgdata
1 logical volume(s) in volume group "vgdata" now active
[root@localhost ~]# mount -a
[root@localhost ~]# lvs -ao +devices
LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert Devices
lvdata vgdata -wi-ao---- 19.99g /dev/sdb(0)
lvdata vgdata -wi-ao---- 19.99g /dev/sda(0)
[root@localhost ~]# uname -r
5.14.0-503.19.1.el9_5.x86_64
- In RHEL 7 and 8, the filesystem automounts after activating the volume group. However, in RHEL 9 and higher versions, this behaviour does not occur, and the filesystem does not automount after activating the volume group.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments