How to add disk to a VPAR and Extend a FileSystem online on HP-UX?


At this post, we perform filesystem extend operation for  HP-UX  VPAR node. So basically we get answers about these questions for HP-UX.

  • How to scan a newly added device?
  • How to check storage device?
  • How to add and view storage device on  VSP  for  VPAR?
  • How to extend  Volume  Group?
  • How to resize  Logical Volume?
  • How to perform online extend on HP-UX?

Step 1: Check Luns 
Get LUN ID from storege side.

Step 2: Scan for the new  device 

Run ioscan on vsp node. If the server doesn't show new added Lun, you should run "insf"  and also check this a knowledge base about how to remove dead luns.

#ioscan

Step 3: Get Information

Check newly added lun with "ioscan" command.

#ioscan -kfNC disk
#ioscan -funC disk

Step 4: Add a new added disk to the existing vpar node.

When you finish add disk operation and run  "hpvmdevinfo" command, it"  shows  "Virtual Machine Device  Name"  state unknown. It's normal situation. You should wait until VSP agent gets all the information  from the client. But if you already know disk id on vpar node you can continue to the next step.
 
New Added Lun: /dev/rdisk/disk232

#vparmodify -p VPARNNODE1 -a disk:avio_stor::disk:/dev/rdisk/disk232
#hpvmdevinfo |grep VPARNNODE1
VPARNNODE1 disk [0,1,0] disk /dev/rdisk/disk232 Unknown
VPARNNODE1 disk [0,1,2] disk /dev/rdisk/disk101 /dev/rdisk/disk7
VPARNNODE1 disk [0,1,3] disk /dev/rdisk/disk139 /dev/rdisk/disk9


Step 5:  Connect Vpar Node to check new added disk

# ioscan -kfNC disk
Class I H/W Path Driver S/W State H/W Type Description
===================================================================
disk 7 64000/0xfa00/0x5d esdisk CLAIMED DEVICE HP Virtual Disk
disk 9 64000/0xfa00/0x5e esdisk CLAIMED DEVICE HP Virtual Disk
disk 10 64000/0xfa00/0x63 esdisk CLAIMED DEVICE HP Virtual Disk
# diskinfo /dev/rdisk/disk10
SCSI describe of /dev/rdisk/disk10:
vendor: HP
product id: Virtual Disk
type: direct access
size: 314572800 Kbytes
bytes per sector: 512

Step 6: PV operation

Check newly added disk if is there any configuration about VG. I strongly recommend performing this step. Because you need to be sure about newly added device doesn't use at any server.
 

# pvdisplay /dev/disk/disk10
pvdisplay: Couldn't find the volume group to which
physical volume "/dev/disk/disk10" belongs.
pvdisplay: Cannot display physical volume "/dev/disk/disk10".

After control operation now you can create PV for the new added disk.
 

# pvcreate /dev/rdisk/disk10
Physical volume "/dev/rdisk/disk10" has been successfully created.

Step 7: Extend VG

# vgextend vgoracle /dev/disk/disk10
Volume group "vgoracle" has been successfully extended.
Volume Group configuration for /dev/vgoracle has been saved in /etc/lvmconf/vgoracle.conf

Step 8: Extend LVM

We performed extend operation for "oragg" logical volume(LVM). Before start operation, we check that oragg LVM's Physical Extend (PE) size 320. Every PE's size is 64 MB. So our LV size is almost "20480 MB". We extend our LV's PE size from 320 to 5320. It means we extend LVM's size from "20480 MB" to "340480 MB"

#vgdisplay vgoracle
--- Volume groups ---
VG Name /dev/vgoracle
VG Write Access read/write
VG Status available
Max LV 511
Cur LV 6
Open LV 6
Max PV 511
Cur PV 2
Act PV 2
Max PE per PV 262144
VGDA 4
PE Size (Mbytes) 64
Total PE 19190
Alloc PE 13456
Free PE 5734
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.0
VG Max Size 1p
VG Max Extents 16777216

# lvdisplay /dev/vgoracle/oragg
--- Logical volumes ---
LV Name /dev/vgoracle/oragg
VG Name /dev/vgoracle
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 20480
Current LE 320
Allocated PE 320
Stripes 0
Stripe Size (Kbytes) 0
Bad block NONE
Allocation strict
IO Timeout (Seconds) default
# lvextend -l 5320 /dev/vgoracle/oragg
Logical volume "/dev/vgoracle/oragg" has been successfully extended.
Volume Group configuration for /dev/vgoracle has been saved in /etc/lvmconf/vgoracle.conf

# lvdisplay /dev/vgoracle/oragg
--- Logical volumes ---
LV Name /dev/vgoracle/oragg
VG Name /dev/vgoracle
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 340480
Current LE 5320
Allocated PE 5320
Stripes 0
Stripe Size (Kbytes) 0
Bad block NONE
Allocation strict
IO Timeout (Seconds) default


Step 9: Online Extend 

To perform an online filesystem extend you should install OnlineJFS package. You can get OnlineJFS package from HPE.
 

# swlist -l product |grep -i online
AONLINEJFS B.05.01.03 OnlineJFS 5.0.1 Integration Product
OnlineJFS01 5.0.31.7 Online features of the VxFS File System

This is another critical step that you need to be careful. First, check your lvdisplay output. You should write your LVM's  size (MB) after -b option. And also add your mount point to. In my case, my LVM's size (340480M) and also mount point is (/oragg)

# fsadm -F vxfs -b 340480M /oragg
UX:vxfs fsadm: INFO: V-3-25942: /dev/vgoracle/roragg size increased from 20971520 sectors to 348651520 sectors

#bdf /oragg
Filesystem kbytes used avail %used Mounted on
/dev/vgoracle/oragg
348651520 10923410 316620632 3% /oragg

 

 

I'm a IT Infrastructure and Operations Architect with extensive experience and administration skills and works for Turk Telekom. I provide hardware and software support for the IT Infrastructure and Operations tasks.

205 Total Posts
Follow Me

Related Post