1、HP-UX添加磁盘并扩容到现有目录下

1、查看现有磁盘信息:

modap2$ioscan -fnNC disk
Class     I  H/W Path  Driver S/W State   H/W Type     Description
===================================================================
disk      1  64000/0xfa00/0x1   esdisk   CLAIMED     DEVICE       HP      LOGICAL VOLUME
                      /dev/disk/disk1      /dev/disk/disk1_p1   /dev/disk/disk1_p2   /dev/disk/disk1_p3   /dev/rdisk/disk1     /dev/rdisk/disk1_p1  /dev/rdisk/disk1_p2  /dev/rdisk/disk1_p3
disk     10  64000/0xfa00/0x3   esdisk   CLAIMED     DEVICE       3PARdataVV
                      /dev/disk/disk10   /dev/rdisk/disk10
disk     19  64000/0xfa00/0x1a  esdisk   CLAIMED     DEVICE       3PARdataVV
                      /dev/disk/disk19   /dev/rdisk/disk19

2、查看某个磁盘信息:

modap2$diskinfo /dev/rdisk/disk10
SCSI describe of /dev/rdisk/disk10:
             vendor: 3PARdata
         product id: VV              
               type: direct access
               size: 838860800 Kbytes
   bytes per sector: 512

3、将新加的磁盘创建PV:

modap2$pvcreate /dev/rdisk/disk19
Physical volume "/dev/rdisk/disk19" has been successfully created.

4、将磁盘添加到VG中:

modap2$vgextend vg01  /dev/disk/disk19
 vgextend: Warning: Max_PE_per_PV for the volume group (3199) too small for this PV (4095).
Using only 3199 PEs from this physical volume.
Volume group "vg01" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

5、扩展LV:

1、查看VG信息:
modap2$vgdisplay vg01
--- Volume groups --- VG Name /dev/vg01 VG Write Access read/write VG Status available Max LV 255 Cur LV 1 Open LV 1 Max PV 16 Cur PV 2 Act PV 2 Max PE per PV 3199 VGDA 4 PE Size (Mbytes) 256 Total PE 6398 Alloc PE 3199 Free PE 3199 Total PVG 0 Total Spare PVs 0 Total Spare PVs in use 0 VG Version 1.0 VG Max Size 12796g VG Max Extents 51184

2、扩展LV:

modap2$lvextend -l 6398 /dev/vg01/applog
Logical volume "/dev/vg01/applog" has been successfully extended.
Volume Group configuration for /dev/vg01 has been saved in /etc/lvmconf/vg01.conf

6、扩展文件目录:

1、查看目录可扩展的大小:
modap2$lvdisplay /dev/vg01/applog --- Logical volumes --- LV Name /dev/vg01/applog VG Name /dev/vg01 LV Permission read/write LV Status available/syncd Mirror copies 0 Consistency Recovery MWC Schedule parallel LV Size (Mbytes) 1637888 Current LE 6398 Allocated PE 6398 Stripes 0 Stripe Size (Kbytes) 0 Bad block on Allocation strict IO Timeout (Seconds) default

2、扩展文件目录:

modap1$fsadm -F vxfs -b 1637888M /applog
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg01/rapplog size increased from 838598656 sectors to 1677197312 sectors

猜你喜欢

转载自www.cnblogs.com/CL-learning/p/12197461.html
今日推荐