Operating System - HP-UX
1834252 Members
2204 Online
110066 Solutions
New Discussion

How to expand /opt filesystem using OnlineJFS?

 
SOLVED
Go to solution
Gino Castoldi_2
Honored Contributor

How to expand /opt filesystem using OnlineJFS?

Hi,

L3000, VxFS/OnlineJFS, HP-UX 11.11

I need to grow the /opt filesystem.
Can this be done with the /opt filesystem mounted or will OnlineJFS be able to do this
with the filesystem mounted?

10 points to any good answer.
Thank you
Gino

9 REPLIES 9
Pete Randall
Outstanding Contributor
Solution

Re: How to expand /opt filesystem using OnlineJFS?

Hi Gino,

From "man fsadm_vxfs":

/usr/sbin/fsadm [-F vxfs] [-V] [-b newsize] [-r rawdev] mount_point

If the -b option is specified, fsadm resizes the file system whose
mount point is mount_point. If newsize is larger than the current size
of the file system, the file system is expanded to newsize sectors.
Similarly, if newsize is smaller than the current size of the file
system, fsadm shrinks the file system to newsize sectors.


I don't believe you have to unmount the file system, but that should be easy enough to find out - just try it.


Pete

Pete
Armin Feller
Honored Contributor

Re: How to expand /opt filesystem using OnlineJFS?

# lvextend -L [lv_size_MB] /dev/vg0/lvolX (find lvol mounted to /opt)

# fsadm -F vxfs -b [lv_size_MB]M /mountdirectory

NOTE: You need to add M directly to the lv_size_MB.
Jeff Schussele
Honored Contributor

Re: How to expand /opt filesystem using OnlineJFS?

Hi Gino,

Before you can extend the FS you have to:

1) Make sure you have free extents in the VG & if not add a PV to the VG with vgextend
2) lvextend the /opt LV

Then you can extend the FS with fsadm.

HTH,
Jeff
PERSEVERANCE -- Remember, whatever does not kill you only makes you stronger!
Gino Castoldi_2
Honored Contributor

Re: How to expand /opt filesystem using OnlineJFS?

Hi,

Will there be any issues if there are any open files on that (/opt) filesystem?
I ran 'lsof +D /opt' and it does show some open files.

10 points to any good answer.
Thank you
Gino
Armin Feller
Honored Contributor

Re: How to expand /opt filesystem using OnlineJFS?

No, if you have installed an licensed OnlineJFS all should work fine even there are open files on /opt
Pete Randall
Outstanding Contributor

Re: How to expand /opt filesystem using OnlineJFS?

Gino,

The only time you run into issues is when reducing a file system, enlarging should be fine.


Pete

Pete
Gino Castoldi_2
Honored Contributor

Re: How to expand /opt filesystem using OnlineJFS?

Hi,

The boot disk is mirrored (MirrorDisk/UX)
so there should not be a problem, correct?

10 points to any good answer.
Thank you
Gino
Patrick Wallek
Honored Contributor

Re: How to expand /opt filesystem using OnlineJFS?

When you do the lvextend, it will automagically extend the primary as well as the mirror.
Bill Hassell
Honored Contributor

Re: How to expand /opt filesystem using OnlineJFS?

lvextend understands mirroring, so if you have 1 mirror, you'll need 2x the number of free extents. By default, LVM will try to match the current mirroring style by getting the mirror's extents from a separate disk. Once the lvol is extended, fsadm will take care of the filesystem adjustments.


Bill Hassell, sysadmin