Operating System - HP-UX
1753788 Members
7754 Online
108799 Solutions
New Discussion юеВ

Extending /usr using Veritas Enterprise Manager.

 
Russ Hancock_1
Frequent Advisor

Extending /usr using Veritas Enterprise Manager.

I need to increase the space of the /usr volume from 2Gb to 4Gb, of a Veritas filesystem.. Is this best done through the gui or a command line?

And as this is the /usr volume can this be done whilst mounted or do I need to go into some sorted of single user mode?

All help greatly appreciated.... and rewarded!
Russ
Russ
11 REPLIES 11
Devender Khatana
Honored Contributor

Re: Extending /usr using Veritas Enterprise Manager.

Hi,

It can be done both ways but always recomended is the command line. Before starting insure that your rootdg has this much free space. ( I suppose you are using VxVM for os as you mentioned increasing it using VEA.

It can be done online if you have Online JFS installed. To see if you have that

#swlist -l product |grep Online
OnlineJFS B.11.11 Online features of the VxFS File System

HTH,
Devender
Impossible itself mentions "I m possible"
Florian Heigl (new acc)
Honored Contributor

Re: Extending /usr using Veritas Enterprise Manager.

vxresize -g rootdg -F vxfs usrvol 4194304

(*IF* Your root volumes are under VxVm control)

lvextend -L 4096 /dev/vg00/lvol &&
fsadm -Fvxfs -b 4096m /usr

(*IF* Your root disks are under LVM control and OnlineJFS is installed)

otherwise at least single user will be needed for extending /usr, but as You appear to have a full vxvm license installed, You should be fine.
yesterday I stood at the edge. Today I'm one step ahead.
Russ Hancock_1
Frequent Advisor

Re: Extending /usr using Veritas Enterprise Manager.

As I appear to have OnlineJFS what is the easiest way for me to get this volume extended? I like the sound on the GUI method, is there any reason why I shouldn't use it. If not I guess I just use the resize option ?!

(node03) / > swlist -l product | grep Online
OnlineJFS B.11.11 Online features of the VxFS File System

Thanks
Russ
Russ
Devender Khatana
Honored Contributor

Re: Extending /usr using Veritas Enterprise Manager.

HI,

You can no doubt use the GUI option for convenience.

HTH,
Devender
Impossible itself mentions "I m possible"
Ralph Grothe
Honored Contributor

Re: Extending /usr using Veritas Enterprise Manager.

Hi Russ,

it hasn't been clear to me whether you are using VxVM or LVM.
Because you mentioned the Veritas Enterprise Manager I assume your volume is under VxVM control.

First check if the Disk Group (DG)
has enough chunks in the DG's free space pool.

n.b. I can only run this on a Solaris box as we are solely using LVM on our HP-UX boxes.
So my output may be different.

# vxdg -g rootdg free
DISK DEVICE TAG OFFSET LENGTH FLAGS
rootdsk0 c0t0d0s2 c0t0d0 143420200 100232 -
rootdsk1 c0t1d0s2 c0t1d0 143420200 100232 -


Here I am a bit in a catch.
To my knowing (at least under Solaris) it isn't possible to change the size of any VxVM volume of your root disks without reencapsulating (which requires two reboots at least, and a change of the underlying BSD slices).
This however only applies to rootable made root/boot disks for VxVM under Solaris.
It may be completely different under HP-UX.

Nevertheless, it is possible for any other non rootable DG's volumes to change their sizes any time at random.

Let's assume for now my rootdg held disks that weren't made rootable.

You then could use the vxassist command to increase the underlying volume's size for wich you need to extend the filesystem.

It usually boils down to something like

vxassist -g rootdg growby 2048m

Replace with the volume name that holds the VxFS and gets displayed on
vxprint -vg rootdg
and some other size if you don't want to extend by 2 GB.
There's also a "growto" if you want to relate to the end size
(this is like LVM's lvextend works)
See man vxassist.

I can't remember but it could well be that the vxassist command as well extends the filesystem if it is VxFS automagically.
A bdf or df -k will show.
If not use the fsadm command to extend the filesystem after the volume was grown,
just like the others replied.




Madness, thy name is system administration
Florian Heigl (new acc)
Honored Contributor

Re: Extending /usr using Veritas Enterprise Manager.

Russ:

If You have OnlineJFS or vxvm, see the commands I wrote in the first posting.

To find out if You're using VxVM or LVM, just type
bdf /usr and look at the output:
For vxvm it looks like this:
root@lala:/>bdf /usr
Filesystem kbytes used avail %used Mounted on
/dev/vx/dsk/rootdg/usrvol
2129920 1342854 737893 65% /usr


For LVM it looks like this:
root@lala:/>bdf /usr
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol16 1343488 1124598 206358 84% /usr



Ralph:

I extended one volume (/home) in my rootdg yesterday during testing after migrating from lvm to vxvm yesterday, it worked.

On the other hand, things don't look really right (as in 'completely mirrored') now...:
vxdg -g rootdg free
DISK DEVICE TAG OFFSET LENGTH FLAGS
rootdisk01 c3t15d0 c3t15d0 15171584 2605762 -
rootdisk02 c1t15d0 c1t15d0 7421952 10355394 -
yesterday I stood at the edge. Today I'm one step ahead.
Russ Hancock_1
Frequent Advisor

Re: Extending /usr using Veritas Enterprise Manager.

Call me stupid, but...
I used
vxassist -g rootdg growby usrvol 2000M

Sat and waited a while.... Then when complete tried to run,

fsadm -F vxfs -b 4000M /usr
OR
fsadm -F vxfs -b 4000000 /usr
OR
fsadm -F vxfs -b 4000M -r /dev/vx/dsk/rootdg/usrvol /usr

None of which extended the file system into the new volume.
I get:
vxfs fsadm: /dev/vx/rdsk/rootdg/usrvol is currently 2097152 sectors - size will be increased
vxfs fsadm: attempt to resize /dev/vx/rdsk/rootdg/usrvol failed with errno 28

What am I doing wrong now !!

How can I confirm that the volume actaully extended?

Thanks.
Russ
Sreedhar Nathani
Valued Contributor

Re: Extending /usr using Veritas Enterprise Manager.


Hello Russ,

If you want to extend only volume (under vxvm) then you have to use vxassist. Normally incase if you don't have OnlineJFS

Incase if you want to increase both volume and its underlaying filesystem then you have to use vxresize. Works only with OnlineJFS

Since you have OnlineJFS you can use this single command which will increase both volume and filesystem size.

Now check the size of the volume
#vxprint -v -g rootdg

Notedown the "length"
#fsadm -F vxfs -b "length" /usr

Note: If the /usr filesystem is full i.e 100% previously then you can not increase the fileysstem with fsadm. If that is the case you needs to use extendfs

ERR:28 means /* No space left on device */

Hope this helps.
Florian Heigl (new acc)
Honored Contributor

Re: Extending /usr using Veritas Enterprise Manager.

Russ, walkthrough as I'm short on time and nerve tissue today.

vxassist is a one-step command!

please issue:
vxassist -g rootdg growto usrvol 4194304

and let me know the results ;)

bdf /usr should show increased size.
yesterday I stood at the edge. Today I'm one step ahead.