- 论坛徽章:
- 0
|
[e25:/]#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0
/dev/vg01
/dev/dsk/c0t4d0-----先创建好一个VG01
[e25:/]#vgdisplay -v /dev/vg01 |more----显示VG01内容
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 4
Total PE 508
Alloc PE 0
Free PE 508
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Physical volumes ---
PV Name /dev/dsk/c0t4d0
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 4
Total PE 508
Alloc PE 0
Free PE 508
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Physical volumes ---
PV Name /dev/dsk/c0t4d0
PV Status available
Total PE 508
Free PE 508
[e25:/]#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0
/dev/vg01
/dev/dsk/c0t4d0
[e25:/]#vgexport -m vg01.map /dev/vg01
Volume group "/dev/vg01" is still active.
vgexport: Couldn't export volume group "/dev/vg01".
[e25:/]#vgchange -a n vg01
Volume group "vg01" has been successfully changed.---去活一下
[e25:/]#vgexport -m vg01.map /dev/vg01----输出卷组信息
[e25:/]#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0----看到,VG01被删除掉
[e25:/]#vgimport -m vg01.map /dev/vg01 \
>; /dev/dsk/c0t4d0
vgimport: Cannot open the control file "/dev/vg01/group":
No such file or directory-------不行,因为/dev/vg01的目录被删除掉
[e25:/]#mkdir /dev/vg01
[e25:/]#mknod /dev/vg01/group c 64 0x010000
[e25:/]#vgimport -m vg01.map /dev/vg01 \
>; /dev/dsk/c0t4d0
Warning: A backup of this volume group may not exist on this machine.
Please remember to take a backup using the vgcfgbackup command after activating
the volume group.----------成功写入map文件
[e25:/]#strings /etc/lvmtab
/dev/vg00
/dev/dsk/c0t6d0
/dev/vg01
/dev/dsk/c0t4d0-------------VG01回来了
[e25:/]#vgdisplay -v vg01 |more
vgdisplay: Volume group not activated.
vgdisplay: Cannot display volume group "vg01".
[e25:/]#vgchange -a y vg01
Activated volume group
Volume group "vg01" has been successfully changed.
[e25:/]#vgdisplay -v vg01 |more
--- Volume groups ---
VG Name /dev/vg01
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 4
Total PE 508
Alloc PE 0
Free PE 508
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Physical volumes ---
PV Name /dev/dsk/c0t4d0
Cur LV 0
Open LV 0
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1016
VGDA 2
PE Size (Mbytes) 4
Total PE 508
Alloc PE 0
Free PE 508
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Physical volumes ---
PV Name /dev/dsk/c0t4d0
PV Status available
Total PE 508
Free PE 508
:END |
|