You are here

Extend root / File System online 11.31

Extending root fs /, in hpux 11.31, you need online jfs, this is example is with only 1 disk no mirror, but with a mirror it's just the same, the only difference is that you have to move the extents from the lvol behind lvol3 on both disks that form the mirror and then extend the lvol

we have our disk with 21 PEs free, and we want to extend our root fs, with 10PEs(80 megs), for example:

--- Physical volumes ---
PV Name /dev/disk/disk21_p2
PV Status available
Total PE 2709
Free PE 21
Autoswitch On
Proactive Polling On

We check the layout of our disk, so we now where the PE's start for lvol4

root@Dog_food:/> pvdisplay -v /dev/disk/disk21_p2 | grep -E 'current.*0000 $'
00000 current /dev/vg00/lvol1 00000
00224 current /dev/vg00/lvol2 00000
00410 current /dev/vg00/lvol3 00000
00585 current /dev/vg00/lvol4 00000
00649 current /dev/vg00/lvol5 00000
01591 current /dev/vg00/lvol6 00000
02275 current /dev/vg00/lvol_var 00000

We check where the free PEs start

root@Dog_food:/> lvdisplay -v /dev/vg00/lvol_var | tail -4
00409 /dev/disk/disk21_p2 02684 current
00410 /dev/disk/disk21_p2 02685 current
00411 /dev/disk/disk21_p2 02686 current
00412 /dev/disk/disk21_p2 02687 current

So we are going to move the first 11 PEs from lvol4 (585 to 595) to the end of the disk PEs (2688)

root@Dog_food:/> pvmove /dev/disk/disk21_p2:585-595 /dev/disk/disk21_p2:2688
Transferring logical extents of logical volume "/dev/vg00/lvol4"...
Physical volume "/dev/disk/disk21_p2" has been successfully moved.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf

Now we have 10 contigous free PEs to extend lvol3:

root@Dog_food:/> pvdisplay -v /dev/disk/disk21_p2 | more
00583 current /dev/vg00/lvol3 00173
00584 current /dev/vg00/lvol3 00174
00585 free 00000
00586 free 00000
00587 free 00000
00588 free 00000
00589 free 00000
00590 free 00000
00591 free 00000
00592 free 00000
00593 free 00000
00594 free 00000
00595 free 00000
00596 current /dev/vg00/lvol4 00011
00597 current /dev/vg00/lvol4 00012

So we are ready to extend lvol3:

root@Dog_food:/> lvextend -l 185 /dev/vg00/lvol3
Logical volume "/dev/vg00/lvol3" has been successfully extended.
Volume Group configuration for /dev/vg00 has been saved in /etc/lvmconf/vg00.conf
root@Dog_food:/> fsadm -F vxfs -b 1480M /
UX:vxfs fsadm: INFO: V-3-25942: /dev/vg00/rlvol3 size increased from 1433600 sectors to 1515520 sectors

And that's it, really simple way to extend our root fs, it you have enough space, it's allways better to move the full lvol that's behind lvol3 to the end of the disk so it's better organized

Unix Systems: 


Works as a charm :)
Fantastic posts - thank you

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.
Error | HP-UX Tips & Tricks Site


Error message

  • Warning: Cannot modify header information - headers already sent by (output started at /homepages/37/d228974590/htdocs/includes/ in drupal_send_headers() (line 1207 of /homepages/37/d228974590/htdocs/includes/
  • PDOException: SQLSTATE[42000]: Syntax error or access violation: 1142 INSERT command denied to user 'dbo229817041'@'' for table 'watchdog': INSERT INTO {watchdog} (uid, type, message, variables, severity, link, location, referer, hostname, timestamp) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5, :db_insert_placeholder_6, :db_insert_placeholder_7, :db_insert_placeholder_8, :db_insert_placeholder_9); Array ( [:db_insert_placeholder_0] => 0 [:db_insert_placeholder_1] => cron [:db_insert_placeholder_2] => Attempting to re-run cron while it is already running. [:db_insert_placeholder_3] => a:0:{} [:db_insert_placeholder_4] => 4 [:db_insert_placeholder_5] => [:db_insert_placeholder_6] => [:db_insert_placeholder_7] => [:db_insert_placeholder_8] => [:db_insert_placeholder_9] => 1503351513 ) in dblog_watchdog() (line 157 of /homepages/37/d228974590/htdocs/modules/dblog/dblog.module).
The website encountered an unexpected error. Please try again later.