hp-ux 创建lv 实例

hp-ux 创建lv
1. vgdisplay 查看卷组
[root@jcsrv2:/]# vgdisplay
--- Volume groups ---
VG Name /dev/vg00
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 8
Open LV 8
Max PV 16
Cur PV 3
Act PV 3
Max PE per PV 4350
VGDA 6
PE Size (Mbytes) 8
Total PE 13020
Alloc PE 12825
Free PE 195
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Name /dev/vg_jc
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 24
Open LV 24
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 1600
VGDA 4
PE Size (Mbytes) 128
Total PE 2398
Alloc PE 1929
Free PE 469
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
2. 在vg00卷组中 创建 一个10M的 名字 为xyy的逻辑卷
[root@jcsrv2:/]# lvcreate -L 10 -n xyy /dev/vg00/xyy
lvcreate: Volume group "/dev/vg00/xyy" does not exist in the "/etc/lvmtab" file.
[root@jcsrv2:/]# lvcreate -L 10 -n xyy /dev/vg00
Warning: rounding up logical volume size to extent boundary at size "16" MB.
Logical volume "/dev/vg00/xyy" has been successfully created with
character device "/dev/vg00/rxyy".
Logical volume "/dev/vg00/xyy" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
3.查看是否存在 xyy 逻辑卷
[root@jcsrv2:/]# lvdisplay /dev/vg00/xyy
--- Logical volumes ---
LV Name /dev/vg00/xyy
VG Name /dev/vg00
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 16
Current LE 2
Allocated PE 2
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
4.为 /dev/vg00/xyy 逻辑卷 创建文件系统
newfs -F vxfs /dev/vg00/rxyy
5. mkdir /xyy //创建一个挂载点
6. mount /dev/vg00/xyy /xyy//挂载新创建的文件系统
7.bdf //进行查看
[root@jcsrv2:/]# bdf
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol3 2048000 513552 1522760 25% /
/dev/vg00/lvol1 497584 74360 373464 17% /stand
/dev/vg00/lvol8 3072000 1020760 2035576 33% /var
/dev/vg00/lvol7 5120000 1685792 3407448 33% /usr
/dev/vg00/lvol6 3072000 406376 2645760 13% /tmp
/dev/vg00/lvol5 12288000 7919968 4343296 65% /opt
/dev/vg00/lvol4 516096 15544 496712 3% /home
/dev/vg00/xyy 16384 1117 14320 7% /xyy
[root@jcsrv2:/]#
8.umount /xyy //取消挂载
9. lvremove /dev/vg00/xyy //删除 /dev/vg00/xyy 逻辑卷
[root@jcsrv2:/]# lvremove /dev/vg00/xyy
The logical volume "/dev/vg00/xyy" is not empty;
do you really want to delete the logical volume (y/n) : y
Logical volume "/dev/vg00/xyy" has been successfully removed.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
10. [root@jcsrv2:/]# lvdisplay /dev/vg00/xyy
lvdisplay: "/dev/vg00/xyy": No such file or directory
//发现已经不存在了
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值