1825756 Members
2324 Online
109687 Solutions
New Discussion

ln help

 
SOLVED
Go to solution
Steven Chen_1
Super Advisor

ln help

Hi,

I would like to know if ln two directories could gain some space.

I have one dir that is 200M left, but I have another dir that is 4G left. I would need 500M and the installation must be on 1st dir.

Can I ln then so that installation can continue to 2nd dir? and how?

very appreciated if get help .

Steve

Steve
3 REPLIES 3
S.K. Chan
Honored Contributor
Solution

Re: ln help

It depends on whether the "installation" allow you to create a directory and tell it to install to that directory or not. If the answer is yes you would simple do this
Eg:
/d1 200MB
/d2 4000MB

# mkdir /d2/app
# cd /d1
# ln -s /d2/app app

You now have a symbolic link from /d1/app to /d2/app. All of the installation will reside on /d2/app.
Michael Tully
Honored Contributor

Re: ln help

Hi,

There are two ways to fix this. One is to
create a symbolic link as already suggested
or re-create the filesystems to the
appropriate sizing.

Backup existing data to another filesystem
or to tape.
Remove the filesystems and logical volumes.
Recreate the logical volumes and filesystems
with the new sizes.
Restore the data from disk or tape.

So that there is no outage for your
filesystems creating a symbolic link is the
obvious choice.

-Michael
Anyone for a Mutiny ?
Roger Baptiste
Honored Contributor

Re: ln help



I presume that these two directories on different filesystems and you are actually referring the Filesystem free space here.
(to confirm do bdf $dir1 ; bdf $dir2 )



Take a tar backup (or similar ) of dir1 ;
then remove the dir1 (rm -r dir1 ).
Next, create a link with dir1 pointing to a subdir under dir2. Now, you will be using the space under dir2.

Or a better tack would be to (if you have free space in the VG) create a new filesystem and mount it as dir1 !


HTH
raj
Take it easy.