Hi all!
I'm new to this list. I wanted to have an opinion of the situation i'm
facing now (i'm no expert in LVM). Last week, i had to re-install a
system which had a system hard drive crash (it was clunking before it
definitely died!). It was running on SuSE 9.0 before. I just finished
to install a fresh copy of CentOS 4.4 on a new hard disk.
I want to know if it's possible to "import" the old LVM array into the
fresh CentOS install.
We have 1 volume group (LVM1) that contains 3 whole hard drives. I had
the time to save some informations before the system hard drive crashed
definitely: I have vgcfgrestore info, i have volgroups_001.conf, i have
the full /etc directory and pvdata.
Here is a part of the info i have:
PVDATA:
=======
--- Physical volume ---
PV Name /dev/sda
VG Name volgroup_001
PV Size 298.09 GB [625142448 secs] / NOT usable 32.19 MB
[LVM: 165 KB]
PV# 1
PV Status available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 32768
Total PE 9537
Free PE 0
Allocated PE 9537
PV UUID 5nc71v-D2mv-RpBX-3c3f-17tI-9ChT-mYctTg
--- Volume group ---
VG Name
VG Access read/write
VG Status NOT available/resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 0
MAX LV Size 2 TB
Max PV 256
Cur PV 3
Act PV 3
VG Size 670.53 GB
PE Size 32 MB
Total PE 21457
Alloc PE / Size 21457 / 670.53 GB
Free PE / Size 0 / 0
VG UUID hf074V-P9DA-AmCU-F2pr-nfdD-QTaA-Ic0lH5
--- List of logical volumes ---
pvdata -- logical volume "/dev/volgroup_001/loggroup_001" at offset 0
pvdata -- logical volume struct at offset 1 is empty
pvdata -- logical volume struct at offset 2 is empty
....
pvdata -- logical volume struct at offset 254 is empty
pvdata -- logical volume struct at offset 255 is empty
--- List of physical extents ---
PE: 00000 LV: 001 LE: 00000
PE: 00001 LV: 001 LE: 00001
....
PE: 09535 LV: 001 LE: 09535
PE: 09536 LV: 001 LE: 09536
--- List of physical volume UUIDs ---
001: 5nc71v-D2mv-RpBX-3c3f-17tI-9ChT-mYctTg
002: 8bsBQR-bTiI-Zky5-Qvpu-oMtp-x62p-0uWwha
003: 6xAILO-KhgO-0U0c-Ir88-xZ8y-AIlc-JtPjDg
--- NEW Physical volume ---
PV Name /dev/hdc
VG Name volgroup_001
PV Size 30.21 MB [61872 secs]
PV# 2
PV Status NOT available
Allocatable NO
Cur LV 0
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID 8bsBQR-bTiI-Zky5-Qvpu-oMtp-x62p-0uWwha
--- Volume group ---
VG Name
VG Access read/write
VG Status NOT available/resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 0
MAX LV Size 2 TB
Max PV 256
Cur PV 3
Act PV 3
VG Size 670.53 GB
PE Size 32 MB
Total PE 21457
Alloc PE / Size 21457 / 670.53 GB
Free PE / Size 0 / 0
VG UUID hf074V-P9DA-AmCU-F2pr-nfdD-QTaA-Ic0lH5
--- List of logical volumes ---
pvdata -- logical volume "/dev/volgroup_001/loggroup_001" at offset 0
pvdata -- logical volume struct at offset 1 is empty
....
pvdata -- logical volume struct at offset 254 is empty
pvdata -- logical volume struct at offset 255 is empty
--- List of physical extents ---
--- List of physical volume UUIDs ---
001: 5nc71v-D2mv-RpBX-3c3f-17tI-9ChT-mYctTg
002: 8bsBQR-bTiI-Zky5-Qvpu-oMtp-x62p-0uWwha
003: 6xAILO-KhgO-0U0c-Ir88-xZ8y-AIlc-JtPjDg
--- Physical volume ---
PV Name /dev/hdd
VG Name volgroup_001
PV Size 186.31 GB [390721968 secs] / NOT usable 32.19 MB
[LVM: 151 KB]
PV# 3
PV Status NOT available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 32768
Total PE 5960
Free PE 0
Allocated PE 5960
PV UUID 6xAILO-KhgO-0U0c-Ir88-xZ8y-AIlc-JtPjDg
--- Volume group ---
VG Name
VG Access read/write
VG Status NOT available/resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 0
MAX LV Size 2 TB
Max PV 256
Cur PV 3
Act PV 3
VG Size 670.53 GB
PE Size 32 MB
Total PE 21457
Alloc PE / Size 21457 / 670.53 GB
Free PE / Size 0 / 0
VG UUID hf074V-P9DA-AmCU-F2pr-nfdD-QTaA-Ic0lH5
--- List of logical volumes ---
pvdata -- logical volume "/dev/volgroup_001/loggroup_001" at offset 0
pvdata -- logical volume struct at offset 1 is empty
pvdata -- logical volume struct at offset 2 is empty
....
pvdata -- logical volume struct at offset 254 is empty
pvdata -- logical volume struct at offset 255 is empty
--- List of physical extents ---
PE: 00000 LV: 001 LE: 15497
PE: 00001 LV: 001 LE: 15498
....
PE: 05958 LV: 001 LE: 21455
PE: 05959 LV: 001 LE: 21456
--- List of physical volume UUIDs ---
001: 5nc71v-D2mv-RpBX-3c3f-17tI-9ChT-mYctTg
002: 8bsBQR-bTiI-Zky5-Qvpu-oMtp-x62p-0uWwha
003: 6xAILO-KhgO-0U0c-Ir88-xZ8y-AIlc-JtPjDg
lvmdiskscan -- reading all disks / partitions (this may take a while...)
lvmdiskscan -- /dev/sda [ 298.09 GB] USED LVM whole disk
lvmdiskscan -- /dev/hdc [ 186.31 GB] USED LVM whole disk
lvmdiskscan -- /dev/hdd [ 186.31 GB] USED LVM whole disk
lvmdiskscan -- /dev/hda1 [ 1004.03 MB] Primary LINUX swap
partition [0x82]
lvmdiskscan -- /dev/hda2 [ 27.59 GB] Primary LINUX native
partition [0x83]
lvmdiskscan -- /dev/hda3 [ 45.95 GB] Primary LINUX native
partition [0x83]
lvmdiskscan -- 4 disks
lvmdiskscan -- 3 whole disks
lvmdiskscan -- 0 loop devices
lvmdiskscan -- 0 multiple devices
lvmdiskscan -- 0 network block devices
lvmdiskscan -- 3 partitions
lvmdiskscan -- 0 LVM physical volume partitions
VGCFGRESTORE
============
vgcfgrestore -- INFO: using backup file "/etc/lvmconf/volgroup_001.conf"
--- Volume group ---
VG Name volgroup_001
VG Access read/write
VG Status NOT available/resizable
VG # 0
MAX LV 256
Cur LV 1
Open LV 0
MAX LV Size 2 TB
Max PV 256
Cur PV 3
Act PV 3
VG Size 670.53 GB
PE Size 32 MB
Total PE 21457
Alloc PE / Size 21457 / 670.53 GB
Free PE / Size 0 / 0
VG UUID hf074V-P9DA-AmCU-F2pr-nfdD-QTaA-Ic0lH5
--- Logical volume ---
LV Name /dev/volgroup_001/loggroup_001
VG Name volgroup_001
LV Write Access read/write
LV Status NOT available
LV # 1
# open 0
LV Size 670.53 GB
Current LE 21457
Allocated LE 21457
Allocation next free
Read ahead sectors 1024
Block device 58:0
--- Physical volume ---
PV Name /dev/sda
VG Name volgroup_001
PV Size 298.09 GB [625142448 secs] / NOT usable 32.19 MB
[LVM: 165 KB]
PV# 1
PV Status available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 32768
Total PE 9537
Free PE 0
Allocated PE 9537
PV UUID 5nc71v-D2mv-RpBX-3c3f-17tI-9ChT-mYctTg
--- Physical volume ---
PV Name /dev/hdc
VG Name volgroup_001
PV Size 186.31 GB [390721968 secs] / NOT usable 32.19 MB
[LVM: 151 KB]
PV# 2
PV Status NOT available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 32768
Total PE 5960
Free PE 0
Allocated PE 5960
PV UUID 8bsBQR-bTiI-Zky5-Qvpu-oMtp-x62p-0uWwha
--- Physical volume ---
PV Name /dev/hdd
VG Name volgroup_001
PV Size 186.31 GB [390721968 secs] / NOT usable 32.19 MB
[LVM: 151 KB]
PV# 3
PV Status NOT available
Allocatable yes (but full)
Cur LV 1
PE Size (KByte) 32768
Total PE 5960
Free PE 0
Allocated PE 5960
PV UUID 6xAILO-KhgO-0U0c-Ir88-xZ8y-AIlc-JtPjDg
Thanks if advance and long live to CentOS!
Guy Boisvert