Operating System - HP-UX
1833178 Members
2630 Online
110051 Solutions
New Discussion

Extend/increase directory space

 
Goh Cheng Chuan
Occasional Advisor

Extend/increase directory space

we r on unix 10.2 running an ERP package which one of the data directory is running out of disk space. The DB is using ingres.
can we use a link, 'ln' command, to path to another directory ?
dir w/o space : /dev/vg00/lvol9/mk
dir to path : /dev/VG01/lvol10/ingres2
if yes, how do we do it? must all users be logged out? do we need to change any log-in script files subsequently?
if no, what other options?
pls advice, thx
Goh CC
3 REPLIES 3
Murray Jones
Advisor

Re: Extend/increase directory space

Sounds like a bit of a mess. Are those the mount points that you have indicated? If so, it seems a peculiar place to have them mounted.

Anyway, without knowing anything about Ingres or your system, there are probably a few ways to approach it - all will most likely require an outage of any product with files open in the directories (fuser -cu will tell you which processes have files open on that mountpoint).

If it's only direcories we're playing with try:

Shutdown anything accessing the area.
If you want to relocate the whole subdirectory, copy the contents to the new area eg:
cp -pR /dev/vg00/lvol9/mk /dev/VG01/lvol10/ingres2
Move the old directory aside:
mv /dev/vg00/lvol9/mk /dev/vg00/lvol9/mk.old
Link the new directory to the old directory name:
ln -s /dev/VG01/lvol10/ingres2/mk /dev/vg00/lvol9/mk

Test.
If it doesn't work, remove the link and move the old directory back.

I'd suggest that you take a look at filesystem sizes and perhaps replan your distribution, mountpoints etc. Temporarily moving bits around a system and chasing links can get very messy, very quickly and can have severe impacts on I/O.

PS. make sure you update your backup routines as they will most probably not follow the new links.

Cheers,

Murray
Manju Kampli
Trusted Contributor

Re: Extend/increase directory space

dir w/o space : /dev/vg00/lvol9/mk
dir to path : /dev/VG01/lvol10/ingres2

move/copy all the files from the current directory where you do not have soace to where you have space.

mv /dev/vg00/lvol9/mk /dev/VG01/lvol10/ingres2
ln -s /dev/VG01/lvol10/ingres2/mk /dev/vg00/lvol9/mk

this will create a link in /dev/vg00/lvol10 with file name mk to /dev/VG01/lvol10/ingres2/mk. so when you refer to vg00 directory it will point you to VG01 directory. no need to change any user files OR profiles
Never stop "LEARNING"
James R. Ferguson
Acclaimed Contributor

Re: Extend/increase directory space

Hi:

If you have online JFS (and the filesystem is a journaled [vxfs] one) then there is no impact whatsoever -- you can extend your file system "on-the-fly".

If the filesystem is HFS or you do not have online JFS, then you will need to be able to unmount the filesystem before you can extend it.

These procedures are described in the HP-UX System Administration Tasks manual:

http://docs.hp.com/hpux/onlinedocs/B2355-90672/B2355-90672.html

...JRF...