Operating System - HP-UX
1753890 Members
7586 Online
108809 Solutions
New Discussion юеВ

Re: Filesystem Extension on /usr

 
Cliff Lim Kok Hwee
Regular Advisor

Filesystem Extension on /usr

Gd Day Forum,

Currently, I would like to increase fileystem /usr online in volume group vg00 having PE size of 8MB from size of 1GB (1024000KB) to 1105920KB. That is to increase by 80MB.

The filesystem /usr is currently mirrored in the following 2 harddisks /dev/dsk/c4t6d0 (primary) and /dev/dsk/c7t6d0 (secondary)

Query: How do I proceed with it?

Thanks/cliff
8 REPLIES 8
Camel_1
Valued Contributor

Re: Filesystem Extension on /usr

if you have on-line JFS installed, run lvextend and fsadm to extend the file system. If no, you have to boot into single user mode to extend the file system.

Simon
Cliff Lim Kok Hwee
Regular Advisor

Re: Filesystem Extension on /usr

Hi Forum,

I do have that. Just wondering how to take care of the mirroring portion.

Thanks/cliff
A. Clay Stephenson
Acclaimed Contributor

Re: Filesystem Extension on /usr

If you have OnlineJFS then it is very easy to do this online -- asumming that you have the additional free space. The fact that you know the physical disk location for the filesystems does not matter; all that matters is the logical volume and because these are mirrored when you increase the size of the LVOL, it implicitly extends both mirror regions at the same time.

All you have to do is an lvextend and specify the total new size of the LVOL and then an fsadm -F vxfs -b to grow the filesystem. Because you have to ask, by far, the easiest and most foolproof way to do this is with SAM -> Disks and Filesystems -> Logical Volumes ->Actions -> Increase Size. It will do all the steps for you.


If you do not have OnlineJFS then you must bring the system up in single-user mode and run the commands lvextend and extendfs (located in /sbin).

Man lvextend, fsadm_vxfs, extendfs_vxfs (assuming /usr is a vxfs filesystem) for details. Even if you use SAM, you should understand the underlying commands.

Finally, it seems a little silly to extend a 1GB filesystems by a mere 80MB. If you have to figure that closely, you are probably already in trouble.
If it ain't broke, I can fix that.
Patrick Wallek
Honored Contributor

Re: Filesystem Extension on /usr

No need to worry about the mirroring. LVM will take care of that for you when you do the lvextend and fsadm commands.

I agree with Clay in that increasing 1000MB to 1080 MB does seem kind of silly, but if that's what you want......
Cliff Lim Kok Hwee
Regular Advisor

Re: Filesystem Extension on /usr

Hi Guys,

Just performed the following,

#lvextend -L 1080 /dev/vg00/lvol8 /dev/dsk/c4t6d0 /dev/dsk/c7t6d0
#fsadm -b 1105920 -F vxfs /usr

Query: Correct me if wrong, from your replies the following works as well?
#lvextend -L 1080 /dev/vg00/lvol8 /dev/dsk/c4t6d0
#fsadm -b 1105920 -F vxfs /usr

thanks/cliff
Nguyen Anh Tien
Honored Contributor

Re: Filesystem Extension on /usr

for example
#lvextend -L 26000 /dev/vg00/lvol7
#fsadm -F vxfs -b 26000 /usr

let try.
tienna
HP is simple
Sunil Sharma_1
Honored Contributor

Re: Filesystem Extension on /usr

In case of mirroring either you have to specify both disks or none with lvextend command.In default situation...

If you have volume group with strict allocation policy off then the command you wrote will create both copy in same disk.

Sunil

*** Dream as if you'll live forever. Live as if you'll die today ***
Trond Haugen
Honored Contributor

Re: Filesystem Extension on /usr

Spacify both or noe of the disks. (None works only if your mirroring allacation policy is strict (default))
Also you can use 'M' in fsadm to keep it simpler.
#lvextend -L 1080 /dev/vg00/lvol8
#fsadm -b 1080M -F vxfs /usr

Regards,
Trond
Regards,
Trond Haugen
LinkedIn