免费注册 查看新帖 |

Chinaunix

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

[新手入门] 关于lv的几个命令和实验 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-05-24 09:53 |只看该作者 |倒序浏览
建立lv ;  删除lv ; 增加lv中的lp ;  关于“严格分配策略” ; 拷贝lv ; 增加镜像拷贝
1。
root@delux_/#mklv -y testlvcb1 -c 2 rootvg
1
0516-404 allocp: This system cannot fulfill
the allocation request.
       
There are not enough free partitions or not enough physical volumes
       
to keep strictness and satisfy allocation requests.  The command
       
should be retried with different allocation characteristics.
0516-822 mklv: Unable to create logical
volume.
root@delux_/#mklv -y testlvcb1 -c 2 -s n
rootvg 1
testlvcb1
 
root@delux_/#mklv -y testlvcb2 rootvg 1
testlvcb2
 
rootvg中只有一个pv,如果不指定 -s
n  参数,新建lv尝试将copies分布在不同磁盘上从而导致失败。
 
 
2。删除lv
root@delux_/#rmlv testlvcb1
Warning, all data contained on logical volume testlvcb1
will be destroyed.
rmlv: Do you wish to continue? y(es) n(o)? y
rmlv: Logical volume testlvcb1 is removed.
 
加 –f 参数不出现确认提示
 
3。增加lv中的lp
 
root@delux_/#lslv testlvcb2
LOGICAL VOLUME:    
testlvcb2              VOLUME
GROUP:   rootvg
LV IDENTIFIER:      001553c500004c0000000103c0ec8994.23 PERMISSION:     read/write
VG STATE:          
active/complete        LV STATE:       closed/syncd
TYPE:              
jfs                    WRITE
VERIFY:   off
MAX LPs:           
512                    PP
SIZE:        16 megabyte(s)
COPIES:            
1                      SCHED
POLICY:   parallel
LPs:                1                      PPs:            1
STALE PPs:         
0                      BB
POLICY:      relocatable
INTER-POLICY:      
minimum               
RELOCATABLE:    yes
INTRA-POLICY:      
middle                 UPPER
BOUND:    32
MOUNT POINT:       
N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
root@delux_/#extendlv testlvcb2 3
root@delux_/#lslv testlvcb2
LOGICAL VOLUME:    
testlvcb2              VOLUME
GROUP:   rootvg
LV IDENTIFIER:      001553c500004c0000000103c0ec8994.23 PERMISSION:     read/write
VG STATE:          
active/complete        LV
STATE:       closed/syncd
TYPE:              
jfs                    WRITE
VERIFY:   off
MAX LPs:           
512                    PP
SIZE:        16 megabyte(s)
COPIES:            
1                      SCHED
POLICY:   parallel
LPs:              
 4                      PPs:            4
STALE PPs:         
0                      BB
POLICY:      relocatable
INTER-POLICY:      
minimum                RELOCATABLE:    yes
INTRA-POLICY:      
middle                 UPPER
BOUND:    32
MOUNT POINT:       
N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
 
 
4。关闭“严格分配策略”即lv的拷贝可以分布在同一个pv上
root@delux_/#chlv -s n testlvcb2
root@delux_/#lslv testlvcb2
LOGICAL VOLUME:    
testlvcb2              VOLUME
GROUP:   rootvg
LV IDENTIFIER:      001553c500004c0000000103c0ec8994.23 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:              
jfs                    WRITE
VERIFY:   off
MAX LPs:           
512                    PP
SIZE:        16 megabyte(s)
COPIES:            
1                      SCHED
POLICY:   parallel
LPs:               
4                      PPs:            4
STALE PPs:         
0                      BB
POLICY:      relocatable
INTER-POLICY:      
minimum               
RELOCATABLE:    yes
INTRA-POLICY:      
middle                 UPPER
BOUND:    32
MOUNT POINT:       
N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: no
 
 
6。拷贝lv
这里指的拷贝不是lv的镜像,而是创建一个新的lv或者覆盖一个旧的lv,原来的lv没有改变,新的lv的内容与旧的相同。经常用于换盘的时候,将原来的盘的内容拷贝到新盘上。
#cplv –v rootvg –y newlv oldlv
或者
#cplv –e exitinglv oldlv
注意,当目的lv小于旧lv时,数据会丢失。
7。增加lv中lp的镜像拷贝
mklvcopy -s n testlvcb 2
注意-s n 参数的使用


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/2284/showart_27449.html
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP