Some doubts about resizing fs's in HP-UX

Hello,

I'm new to HP-UX and I'm not sure about some concepts related to resizing fs's under this OS.

First of all I'm only asking about resizing ONLINE, it means, without having to umount the fs nor rebooting, etc.

Q1. I've read that in order to resize a fs online there are 2 requirements:
1.1 the fs type must be vxfs <- Is that correct or under hp-ux there are more fs types that can be resized online?
1.2 JFSOnline is needed <- What's better to know if I have this feature: /usr/sbin/vxlicrep and see if HP_OnlineJFS = Enabled OR swlist | grep -i onlinejfs ? Is it possible to have the license but not the sw? and viceversa?

Q2. Then, there are 2 types (or more?) of underlying volume managers: LVM and VxVM.
2.2 How do I know if the fs's underlying VM is one or the other?
2.3 Case LVM and jfsonline -> I can resize fs online using lvextend + fsadm. Ok but lvextend and fsadm interpret sizes in powers of 2 or 10?
2.4 Lvextend -L XXX ... <- XXX is the new total size you want to achieve, not the size you want to add to the filesystem?
2.4 Case VxVM and jfsonline -> I can resize fs online using vxresize without having to worry about the underlying lvol?
2.5 if VM is VxVM can I use lvextend + fsadm and if i have LVM can i use vxresize?

Thank you!

First find out what Operating System version you have:

uname -a

The package concerned is known as "Online JFS".
JFS=Journal Filesystem

The presence of a package does not mean that you are using it. We have a system with both LVM and Veritas installed but are only using LVM for legacy reasons. Obviously both could have filesystems mounted as "-F vxfs".

This should give you an idea what's installed and what's running:

swlist -v | egrep -i "lvm|veritas|jfs"
ps -ef|egrep -i "lvm|vx"|grep -v "grep"

If the "ps" only mentions "vx" not "lvm" there is a fair chance that you have pure Veritas ... or vice versa. Take advice from your support agency before deciding.

Once you have the base facts it is advisible to log a call with HP Support before attempting to extend a filesystem (whether online or offline). It would be preferable to attend the appropriate course and then to practice on an expendable test system until you are confident and can pass HP certification exams.

In your example, this is where it gets complicated:

"lvextend" is an LVM command.
XXX is the new size of the Logical Volume (comparable to a disc partition) in Megabytes (i.e. not the filesystem).
Under LVM the "extendfs" command is the command which extends the filesystem after extending the Logical Volume.
See "man extendfs_vxfs".
I have personally had very bad experiences with "Online JFS" and know that every version of every piece of software involved must be the correct patched version before HP say that it is safe. This does not in any way imply that I would say that it will work for you. Make sure that you have a full, verified and tested Disaster Recovery backup before using "Online JFS".

For the Veritas version see man "fsadm_vxfs".

Because of the danger of typing any "vx" or "lv" command on a live system please take professional advice or training and gain HP Certification before typing any commands on a live system. Any advice given is for example purposes only and does not in any way suggest that any particular command should be typed on your system.

First of all, thank you for your reply.

But there are some things I don't understand:

What's the relation between the HP-UX version and onlinejfs? Why do I need the version of the OS in order to know if the system is able to resize online?

I know it, but my question was: how can I be sure my system is able to resize online: by swlist -v | grep -i jfsonline OR vxlicrep and see if HP_OnlineJFS = Enabled? And what happens if i.e. I have the packet installed but I don't have the license, am I able then? and viceversa?

My other question was if vxfs is the only fs type on hp-ux capable of being resized online.

So if I execute the ps and grep shows only vx then ALL my filesystems have the underlying vm VxVM OR is it possible to have a system that i.e has some filesystems with LVM under and other filesystems with VxVM underlying. In that case, how do I know if a fs is using one or the other?

Ok but the size is interpred in powers of 2 or powers of 10? I mean, if i want to put 1 Gigabyte, X=1024 or X=1000?

And finally,

LVM: what's better to use, lvextend (extends lvol) + fsadm (resizes fs) OR lvextend + extendfs_vxfs?

VxVM: Is it the same commands? lvextend + one of {fsadm_vxfs, extendfs_vxfs}?

extendfs_vxfs and fsadm_vxfs are not unix commands. They are the names of unix "man" pages which give the special syntax of the command in context.

See the following "man" pages for the "top of tree" for LVM and Veritas (VxVM) respectively.

man lvm
man vxintro

If you don't have the "man" page then check whether you have the package at all.

It always helps to know what Operating System version you have. There has been a move away from LVM towards Veritas (VxVM) over the last 10 years or so.
We are unclear whether you are looking at an existing mature system or what.

Take a look at the contents of /etc/fstab .

Logical Volume adm Filesystems size parameters are in power of 2 notation. (1024 bytes = one kilobyte). There is however nothing to stop you creating say a 10 Gb filesystem. Hope I understood your question.

Beware that there are overheads in Journalling File Systems and the actual free space in a filesystem will be a fraction lower than you may expect.

I am unwilling to suggest LVM or VxVM commands in this context because we know nothing about your environment.