LVM and VxVM

Re: Impact of extending file system

 
John J Burke
Occasional Advisor

Impact of extending file system

Hi,

I want to extend a databases file system on

root@dbnhpu01:/esahome/root >uname -a
HP-UX dbnhpu01 B.11.00 U 9000/800 1602339393 unlimited-user license

I dont have online jfs. So was planning to do it when the offline database backup is running(Data protector). Is there any possible impact on the backup if I extend the file system during the backup.

Sorry possibly a stupid question, but just want to be sure prior to extending fs.
2 REPLIES 2
Doug Burton
Respected Contributor

Re: Impact of extending file system

Yes, it will affect the backup. Without onlineJFS you need to unmount the filesystem in order to extend it. With OnlineJFS the filesystem can be "live".

With OnlineJFS:
fsadm -F hfs (or vxfs) -b new_size /mounted_filesystem

Without OnlineJFS:
Unmount filesystem
lvextend -L 400 /dev/vg00/lvol3 extendfs /dev/vg00/rlvol3
Mount filesystem

Bill Hassell
Honored Contributor

Re: Impact of extending file system

There arer two parts to extending a filesystem. The first can be done anytime: lvextend -L /dev/vgWW/lvolZZ. All this does is to define the size of the lvol. The fielsystem doesn't know about the change and doesn't care as long as it isn't smaller (ie, lvreduce will destroy the filesystem).

The second part requires 3 steps: umount (all processes using this lvol must be terminated), extendfs (to make the filesystem aware of the additional space) and mount. The first part is generally the most difficult. If you stop your applications and database, that should close any open files and directories. If umount gives you the error: Device busy, then something is still keeping the volume open. Use fuser to see if it can find the process(es) that still has open files.

fuser is only about 50% successful in tracking down open files and directories though. The freeware program lsof can do this for you. You can get a copy from http://hpux.connect.org.uk/hppd/hpux/Sysadmin/lsof-4.74/

Otherwise, you'll have to reboot, interrupt the boot process and go into single user mode. Then mount /usr and run the extendfsogram pointing to the larger lvol. When done, you can reboot and the filesystem will have been extended.


Bill Hassell, sysadmin