Here's the procedure on extending a file system in an HP-UX box.
Initial commands :
bdf - gives the device file, mount point and its sizes (allocated, used, free)# bdf /u/PROD/NEXDAY
Filesystem kbytes used avail %used Mounted on
/dev/vg03/lvol1 20185088 16571560 3613528 82% /u/PROD/NEXDAY
vgdisplay - gives the properties of the volume group where the logical volume belongs# vgdisplay vg03
--- Volume groups ---
VG Name /dev/vg03
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 6
Open LV 6
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 1599
VGDA 2
PE Size (Mbytes) 32 <---- gives us the PE size
Total PE 1599
Alloc PE 1073
Free PE 526
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
lvdisplay - gives the properties of the logical volume# lvdisplay /dev/vg03/lvol1
--- Logical volumes ---
LV Name /dev/vg03/lvol1
VG Name /dev/vg03
LV Permission read/write
LV Status available/syncd
Mirror copies 0
Consistency Recovery MWC
Schedule parallel
LV Size (Mbytes) 19712
Current LE 616
Allocated PE 616 <--- gives us the allocated PE
Stripes 0
Stripe Size (Kbytes) 0
Bad block on
Allocation strict
IO Timeout (Seconds) default
So from there, we know the current file system size is
32MB x 616 = 19712MB or 20185088KB
Let's say we want to add another 2GB to the file system,
2048MB/32MB = 64 PE
So 64 + 616 = 680,
Therefore the new file system size will be 32MB x 680 = 21760MB
1. Extend the Logical Volume
From the current 616 PE (19712MB), we will extend it to 680 PE (21760MB)
Using the PEs# lvextend -l 680 /dev/vg03/lvol1
Using the Size in MB# lvextend -L 21760 /dev/vg03/lvol1
2. Extend the File System
(a) with Online JFS, no need to unmount# fsadm -F vxfs -b 21760M /u/PROD/NEXDAY
(b) without Online JFS
(i) The partition has to be unmounted, so there should be no process accessing the partition (db, application, even user in the current directory, etc…)# umount /dev/vg03/lvol1 or# umount /u/PROD/NEXDAY
(ii) Extend ## extendfs -F vxfs /dev/vg03/rlvol1
Take note of the "r" in rlovl1, extending or creating file system needs a raw device file.
(iii) Mount# mount /dev/vg03/lvol1 /u/PROD/NEXDAY
NOTE:
To check if the system have Online JFS enabled,# vxlicrep
VERITAS License Manager vxlicrep utility version 3.00.007
Copyright (C) VERITAS Software Corp 2002. All Rights reserved.
Creating a report on all VERITAS products installed on this system
-----------------***********************-----------------
License Key = 010449565812345615946529
Product Name = VERITAS File System
License Type = PERMANENT
Site License = YES
Features :=
HP_OnlineJFS = Enabled
OR# swlist | grep -i online
B3929CA B.11.11.03.03 HP OnLineJFS
OnlineDiag B.11.11.16.09 HPUX 11.11 Support Tools Bundle, Sep 2005
EMC training
1 day ago
0 comments:
Post a Comment