Showing results for 
Search instead for 
Do you mean 

enlarge partition

enlarge partition

Hi,

I'm trying to extend the size of /var and /usr. I have an hp-ux 11.0 , vxfs file sys, without jfs online. Unfortunatelly, I can't unmount /var and /usr even in sigle mod. Tried fuser -ku /dev/vg00/lvolx, umount /dev/vg00/lvolx, but I get the message busy, so I can't use extendfs -F vxfs /usr. The funny thing is that after command lvextend -L size /dev... SAM's LVD indicates that the size of partitions have changed, which of course, have not, confirmed also by bdf, bf, du.

QUESTION: How can I eventually unmount these partitions ? Could be done by changing the entries in /etc/fstab and than rebooting in single mod?

Thanks, Adrian
?
9 REPLIES
Honored Contributor

Re: enlarge partition

First, I am not sure if that was a funny thing! If you really want to check if the LV size has extended, then check it with:

# lvdisplay -v lv_name

The bdf, df and du will tell you the size of the *file system* only and NOT the logical volume. To answer your questions:

1) You need to reboot the system, interact with ISL, and boot in single user mode (hpux -is).

2) You don't need to do any changes on /etc/fstab. All you have to do is boot in single user mode. The LVs will be in unmounted stage, then you can extend it, extend the FS and restart in multi user mode
Life is a promise, fulfill it!
Honored Contributor

Re: enlarge partition

Do NOT shutdown into single-user mode, rather reboot the system, stop the boot process when prompted, boot the system, interact with IPL, and at the prompt type 'hpux -is' to boot into single user mode. This will bring the system up into single user mode with NO file systems mounted.

This is your best bet. You will then be able to do the extendfs, etc. on the filesystems.

FYI, the fuser command works according the filesystem name, not the LVOL. So...

# fuser -cu /var

# fuser -cu /usr

will work where 'fuser -cu /dev/vg00/lvol?' will not. Note the -cu will just list the processes accessing the filesystem, if you must, you can use 'fuser -ku /var' to kill them.

My recommendation would still be to reboot and boot up into single-user mode.
Honored Contributor

Re: enlarge partition

Hi Adrian,

Unfortunately, if you don't have Online JFS, the only way you can enlarge those file systems is to boot single-user.

It is true that your logical Volume will show you an enlarged Volume, but your file system, in turn, hasn't been extended yet, and therefore that's why you don't see it in bdf.

I'm surprised that you cannot boot in single-user mode to extendfs those two file systems. Usually, when you boot in single-user mode, you should have close to nothing mounted. / and /stand but that's about it. /var and /opt should not be mounted automatically when you boot in single user mode.
Cooperation is doing with a smile what you have to do anyhow.
Honored Contributor

Re: enlarge partition

Single user mode is the only way (without using OnlineJFS) to handle this. Once you are in single user mode you need to umount the filesystems and run "extendfs" on it so that the FS size will be equal to its logical volume. For example ..
# /sbin/extendfs -F vxfs /dev/vg00/rlvolX
then mount the filesystem back and you should see the "increased" size in bdf output.
Acclaimed Contributor

Re: enlarge partition

Hi Adrian:

In the absence of OnlineJFS, you need to boot into single-user mode (where '/usr' and '/var' are not mounted). Use the LVM commands in '/sbin' to enlarge the logical volume ('lvextend') and then use 'extendfs' to enlarge the filesystem. See the man pages for more information. The resize of the filesystem does not occur until you 'extendfs' it. The 'lvextend' only enlarges the "container" (logical vlume) in which it sits. 'bdf' queries the *filesystem* size not the logical volume size.

Regards!

...JRF...

Re: enlarge partition

Thanks to all of you to answer in such a sort time.
Marco said that in single user, /var and /usr should not be mounted. But they were mounted. In previous attempts, I have entered in sigle user using command shutdown 0, which I found it on this forum, and then I used mount command to see the mounted partitions. Now I have entered in single mode normally, and extendfs -F vxfs /usr.. worked just fine. /sbin/init 3 and it's done.

Adrian
?
Outstanding Contributor

Re: enlarge partition

There are differences between doing a shutdown 0 and interrupting the reboot to get to single user mode. *True* single user mode can only be achieved via reboot.

Pete

Pete
Honored Contributor

Re: enlarge partition

Hi Adrian,

Looks like your step "fuser -ku /dev/vg00/lvolxx" was not paid much attention in the previous messages. For future reference, do not ever run fuser -k on /usr, /var filesystems. As a matter of good practice, not on any of the OS filesystems.

Rebooting the box into single user mode after interacting with ISL is the cleanway of extending /usr, /var. You will need to use /sbin commands to achive this as you do not want to mount /usr in single user mode.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
Honored Contributor

Re: enlarge partition

/var and /usr were still mounted because you did a 'shutdown 0'. Getting into single user mode that way does not kill all processes and does not unmount filesystems. Only rebooting and coming UP into single user mode will you truly have a clean single-user mode.
//Add this to "OnDomLoad" event