免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 15869 | 回复: 6
打印 上一主题 下一主题

vgexport与vgimport的实际应用 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-08-13 11:27 |只看该作者 |倒序浏览
[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

论坛徽章:
0
2 [报告]
发表于 2004-08-13 12:48 |只看该作者

vgexport与vgimport的实际应用

不错,哈哈,VG在你的步骤中就象变戏法一样一下有一下没有,一下没有一下有。厉害啊。呵呵

   虽然这是基本的LVM操作,但也需要鼓励你,希望你爱上HP-UX,因为有很多魔术在等着我们一起去发现它。

论坛徽章:
0
3 [报告]
发表于 2004-08-14 09:54 |只看该作者

vgexport与vgimport的实际应用

哪这样在VG01的数据还在吗?

论坛徽章:
0
4 [报告]
发表于 2004-08-14 11:06 |只看该作者

vgexport与vgimport的实际应用

mknod /dev/vg01/group c 64 0x010000
这句话是什么意思啊

论坛徽章:
0
5 [报告]
发表于 2004-08-14 18:10 |只看该作者

vgexport与vgimport的实际应用

build vg01 device file.

论坛徽章:
0
6 [报告]
发表于 2004-08-14 18:44 |只看该作者

vgexport与vgimport的实际应用

make change follow this you can rename vg01 to vgnew .
when you mkdir mknod,you can:
e25:/]#mkdir /dev/vgnew
[e25:/]#mknod /dev/vgnew/group c 64 0x010000
[e25:/]#vgimport -m vg01.map /dev/vgnew
then vg01 is renameed,the new vg'name is vgnew.

论坛徽章:
0
7 [报告]
发表于 2004-08-14 19:36 |只看该作者

vgexport与vgimport的实际应用

呵呵,这个在mc/sg中用得比较多,
在VG管理这一块,HP已经把LVM嵌入到kernel中了,比sun之类的要来得方便,
AIX这一点也可以
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP