일단 아래 기록들을 참조했다.
9장. LVM 장치 가시성 및 사용 제한 Red Hat Enterprise Linux 9 | Red Hat Customer Portal
Access Red Hat’s knowledge, guidance, and support through your subscription.

Nutanix Support & Insights

My virtual machine running RHEL 9 enters emergency mode. What can I do? - Synology Knowledge Center
Synology Knowledge Center offers comprehensive support, providing answers to frequently asked questions, troubleshooting steps, software tutorials, and all the technical documentation you may need.

dd 명령어를 이용해서 LVM으로 구성된 RHEL9 시스템을 마이그레이션 했다.
[root@fedora live]# dd if=/dev/sda of=/dev/sdb bs=512k
LVM을 제대로 인식 못해서 rhel 볼륨그룹을 제대로 인식 못해서 rhel/data와 rhel/log를 인식할 수 없는 상황이었다.
[root@vm-main lana]# pvdisplay
Devices file sys_wwid naa.500080d910085af1 PVID fLsA6Mr8zZJesnTpfF83jVy4FELdhvrt last seen on /dev/sdb3 not found.
[root@vm-main lana]# vgdisplay
Devices file sys_wwid naa.500080d910085af1 PVID fLsA6Mr8zZJesnTpfF83jVy4FELdhvrt last seen on /dev/sdb3 not found.
[root@vm-main lana]# lvdisplay
Devices file sys_wwid naa.500080d910085af1 PVID fLsA6Mr8zZJesnTpfF83jVy4FELdhvrt last seen on /dev/sdb3 not found.
[root@vm-main lana]#
이렇게 나올땐 일단 /etc/lvm/devices/system.devices
를 점검해본다.
[root@vm-main lana]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command vgscan pid 1270 at Tue Mar 7 03:04:10 2023
VERSION=1.1.18
IDTYPE=sys_wwid IDNAME=naa.500080d910085af1 DEVNAME=/dev/sdb3 PVID=fLsA6Mr8zZJesnTpfF83jVy4FELdhvrt PART=3
저 PVID 장치명을 제대로 못찾는다. 치워버리자.
[root@vm-main lana]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command vgscan pid 1270 at Tue Mar 7 03:04:10 2023
VERSION=1.1.18
IDTYPE=sys_wwid IDNAME=naa.500080d910085af1 DEVNAME=/dev/sdb3 PVID=fLsA6Mr8zZJesnTpfF83jVy4FELdhvrt PART=3
[root@vm-main lana]# mv /etc/lvm/devices/system.devices system.backup
[root@vm-main lana]# ll
total 4
-rw------- 1 root root 445 Mar 7 03:09 system.backup
그리고 vgimportdevices
명령어를 이용해서 장치를 다시 가져온다
[root@vm-main lana]# vgimportdevices -a
Added 1 devices to devices file.
[root@vm-main lana]# cat /etc/lvm/devices/system.devices
# LVM uses devices listed in this file.
# Created by LVM command vgimportdevices pid 4512 at Tue Mar 7 03:17:51 2023
VERSION=1.1.1
IDTYPE=sys_wwid IDNAME=naa.538f60161045f640 DEVNAME=/dev/sdb3 PVID=fLsA6Mr8zZJesnTpfF83jVy4FELdhvrt PART=3
vgimportdevices -a
로 모든 장치 파일을 다시 만들수도 있고 vgimport /dev/mapper/<VG>
로 특정 장치파일만 다시 가져올 수 있다.
만약 저 파일에서 문제되는 부분을 주석처리하지 않는다면 중복된 부분이 있는데 그래도 진행할거냐고 물어본다.
어쨌든
[root@vm-main lana]# pvdisplay
--- Physical volume ---
PV Name /dev/sdb3
VG Name rhel
PV Size <117.66 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 30119
Free PE 0
Allocated PE 30119
PV UUID fLsA6M-r8zZ-Jesn-TpfF-83jV-y4FE-Ldhvrt
[root@vm-main lana]# vgdisplay
--- Volume group ---
VG Name rhel
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 10
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 4
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 117.65 GiB
PE Size 4.00 MiB
Total PE 30119
Alloc PE / Size 30119 / 117.65 GiB
Free PE / Size 0 / 0
VG UUID REZGOO-tqms-8rN7-1Qjo-lB0o-m3GQ-QdI7x9
[root@vm-main lana]# lvdisplay
--- Logical volume ---
LV Path /dev/rhel/root
LV Name root
VG Name rhel
LV UUID sP2Q0l-9EeX-JXoz-oK6x-2MFB-sAVI-Uk4Nfv
LV Write Access read/write
LV Creation host, time VM-Main.weing.asdf, 2023-03-01 13:46:31 +0900
LV Status available
# open 1
LV Size 32.00 GiB
Current LE 8192
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Path /dev/rhel/data
LV Name data
VG Name rhel
LV UUID 0eeNc3-0fJX-rGEn-7Gng-PdvG-03jM-eDzggy
LV Write Access read/write
LV Creation host, time VM-Main.weing.asdf, 2023-03-01 13:46:32 +0900
LV Status NOT available
LV Size <73.80 GiB
Current LE 18892
Segments 1
Allocation inherit
Read ahead sectors auto
--- Logical volume ---
LV Path /dev/rhel/swap
LV Name swap
VG Name rhel
LV UUID QA4sm0-qG8H-1SLp-eunf-GhtD-iROf-y12FwM
LV Write Access read/write
LV Creation host, time VM-Main.weing.asdf, 2023-03-01 13:46:34 +0900
LV Status available
# open 2
LV Size <7.86 GiB
Current LE 2011
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
--- Logical volume ---
LV Path /dev/rhel/log
LV Name log
VG Name rhel
LV UUID wlMtW1-nctl-W8sn-Jwed-bB95-wsQD-r2l0X3
LV Write Access read/write
LV Creation host, time VM-Main.weing.asdf, 2023-03-01 13:46:34 +0900
LV Status NOT available
LV Size 4.00 GiB
Current LE 1024
Segments 1
Allocation inherit
Read ahead sectors auto
[root@vm-main lana]#
이제 fstab에서 비활성화했던 파티션을 다시 활성화하고 마운트하면 된다.


이런 일이 일어난 이유로, RHEL 9.0부터는 use_devicesfile 옵션이 기본적으로 활성화되어서 그렇다.
4.11. 파일 시스템 및 스토리지 Red Hat Enterprise Linux 9 | Red Hat Customer Portal
Access Red Hat’s knowledge, guidance, and support through your subscription.

RHEL 9.0 스토리지 주요 변경 사항에 있는 내용인데, RHEL 9부터는 LVM이 사용하기로 지정한 장치만 인식한다. 그 외의 장치들은 무시한다.
Uploaded by N2T
'리눅스 > 기초' 카테고리의 다른 글
mpt3sas 같은 서드파티 모듈 추가하기 (0) | 2023.04.10 |
---|---|
LVM 부팅 볼륨그룹 이름 바꾸기 (0) | 2023.02.22 |
LVM 볼륨 확장하기 (0) | 2023.02.22 |