Hi everyone,
I have an LVM comprising 2 partitions on a drive I wish to read data from, and
I have a 'main'
file from somewhere in /etc/lvm from that old drive:
main {
id = "em7z2K-GhvB-mpW4-YNjE-SiZ7-zia2-PIObh2"
[...]
physical_volumes {
pv0 {
id = "6oVVgd-WIVK-qB0y-PXk2-Acu5-ZxcI-gMj5JD"
device = "/dev/md2" # Hint only
status = ["ALLOCATABLE"] # 74.4062 Gigabytes
}
}
logical_volumes {
root {
id = "Cu9udo-QFcL-72XW-G1OU-1sQA-giBa-WASzs2"
status = ["READ", "WRITE", "VISIBLE"] # 74.125Gigabytes
}
}
swap {
id = "aM7Jm4-QfMW-4y2c-zCv3-0O6f-CVzz-P3Ebg4"
status = ["READ", "WRITE", "VISIBLE"] #256
Megabytes
}
some bits snipped, obviously.
Anyway so the lone disk is in a separate box now:
Device Boot Start End Blocks Id System
/dev/hdd1 * 1 13 104391 fd Linux raid
autodetect
/dev/hdd2 14 9729 78043770 fd Linux raid
autodetect
So...
sudo pvcreate -u 6oVVgd-WIVK-qB0y-PXk2-Acu5-ZxcI-gMj5JD /dev/hdd2
Software RAID md superblock detected on /dev/hdd2. Wipe it? [y/n] n
Physical volume "/dev/hdd2" successfully created
Then....
pvdisplay
--- NEW Physical volume ---
PV Name /dev/hdd2
VG Name
PV Size 74.43 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID 6oVVgd-WIVK-qB0y-PXk2-Acu5-ZxcI-gMj5JD
Then....
sudo vgcreate -v main /dev/hdd2
Wiping cache of LVM-capable devices
Adding physical volume '/dev/hdd2' to volume group 'main'
/dev/hdd2 not identified as an existing physical volume
Unable to add physical volume '/dev/hdd2' to volume group 'main'.
oh dear.
As it turns out, I can run pvcreate and pvdisplay ok, but a second run
of pvdisplay... and it's gone. vgcreate always fails.
Any ideas anyone? I'm a little startled at how hard it seems to be to mount a
'foreign' LVM drive in Linux.
--
[EMAIL PROTECTED] mailing list