[linux-lvm] lvm mirroring
Roman Gavrilov
romio at netvision.net.il
Sat Feb 22 10:41:04 UTC 2003
Hello,
I have 2 physical discs.
I have 4 partitions on the first disk.
I created a volume group "lvmhd" from all of the partitions and later created logical volumes.
this is the result from the vgdisplay
--- Volume group ---
VG Name lvmhd
VG Access read/write
VG Status available/resizable
VG # 0
MAX LV 256
Cur LV 3
Open LV 3
MAX LV Size 2 TB
Max PV 256
Cur PV 4
Act PV 4
VG Size 35.59 GB
PE Size 32 MB
Total PE 1139
Alloc PE / Size 1131 / 35.34 GB
Free PE / Size 8 / 256 MB
VG UUID xqamqE-9gSs-Xy3O-2tVQ-wYzy-Cp3u-0Wivbd
and those are the logical volumes
/dev/lvmhd/lvm_usr 3.0G 980M 1.8G 35% /usr
/dev/lvmhd/lvm_var 4.9G 65M 4.6G 2% /var
/dev/lvmhd/lvm_home 27G 33M 25G 1% /home
later I mirrored the first disk to the second disk with dd if=/dev/hda of=/dev/hdb so if the first disk breaks I can remove it and replace it with the second disk and get the server up in minutes.
Now I want to be able to use the second disk while I am running from the first. But the volume groups are the same and I am afraid that if I will recreate the logical volumes I'll ruin some thing on the second disk.
Is there anything I can do about it so I could use the second disk for backups but still have the same architecture as the primary disk ?
is there any way to mount those logical volumes which are mirrors of the primary disk ?
for example I can do
pvdisplay /dev/hdb3 (this is the slave disk which is the mirror of the primary and its not mounted)
--- Physical volume ---
PV Name /dev/hdb3
VG Name lvmhd
PV Size 13.67 GB [28676025 secs] / NOT usable 32.19 MB [LVM: 129 KB]
PV# 1
PV Status available
Allocatable yes (but full)
Cur LV 3
PE Size (KByte) 32768
Total PE 436
Free PE 0
Allocated PE 436
PV UUID 5XenPH-2NLb-cmN0-qEBb-QGuJ-zWxv-otMr7i
thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listman.redhat.com/archives/linux-lvm/attachments/20030222/80c78417/attachment.htm>
More information about the linux-lvm
mailing list