Operating System - HP-UX
1831635 Members
1766 Online
110027 Solutions
New Discussion

Re: more storage space using ln command

 
SOLVED
Go to solution
Sunil Kumar K.U.
Frequent Advisor

more storage space using ln command

Hello all,

One of our customers wanted to keep some data on a filesystem only for some time. But, there is not enough space on it. Since it is temporary and they wanted it at a particular location, I suggested to keep the data at different directory (on another filesystem which has enough free space) and link it to the location (using ln -s command) where they wanted.

Is there any other way to add disk space to a filesystem (not by extending the filesystem) using the ln command or any other command?(Pls note that I am aware of the standard procedure of extending the vg,lv and fs).

Thanks in advance for the help.

Regards/SUNIL KUMAR K.U.
6 REPLIES 6
Michael Tully
Honored Contributor
Solution

Re: more storage space using ln command

A good example of this is having
your omniback database mounted on
a different filesystem. For example
the database must be under /var/opt/omni
which as we know is under /var
If we created a new filesystem like
/omni_db and did
ln -s /omni_db /var/opt/omni
This would have all of the omniback
database under /omni_db and have a link
to /var/opt/omni

There is no way of adding 'real' space
to a filesystem without actually extending
it. You would need to move the files out
of the directory like above and then create
the symbolic link

Michael
Anyone for a Mutiny ?
Shahul
Esteemed Contributor

Re: more storage space using ln command

Hi

Why don't U use mount command for this? I will tell U how to do this with an example.

Suppose U have a directory called /user/programs in /user filesystem. U want to keep this program directory in /user1 filesystem, But U don't have enough space in /user1 for copying this..This is ur current status..right? In this case what U will have to do is

#cd /user1
#mkdir programs
#mount /user/programs /user1/programs

Now ur programs directory is in /user1 filesystem. After the purpuose over unmount the same.

Best of luck


Shahul
Magdi KAMAL
Respected Contributor

Re: more storage space using ln command

Hi Sunil,

You may do the following :

1. Move ( mv ) your data to the free space (free_dir) on the free server(free_server).
2. Logon on the free_server and execute exportfs.
3. From your initial server execute a NFS mount from the initial directory.

By this your initial file system had been reduced it's used space, and your data is still accessible ( via NFS ).

If you choose this solution, let me know for commands.

Magdi
Vincent Fleming
Honored Contributor

Re: more storage space using ln command

If you have some extra disk space, you can always create a new vg and/or lv, make a filesystem on it, and mount it where ever you want. Mount points don't have to be on /, such as /usr; you can use /usr/src (for example) as a mount point. When you're done, unmount it and vgremove it.
No matter where you go, there you are.
leereg_5
Frequent Advisor

Re: more storage space using ln command

1.Find a box which can serve as a NFS server to export filesystem with spare space to store all your datas.
2.Move the datas to the NFS server under certain dir, like: /export/vol/vol1/destinedir
3.export that dir and start the NFS server;
4.Configure the original box as a NFS client and rename the target dir;
5.Make a link:
#ln -s /vol/vol1/destinedir /dir/you/want/to/expend


Hope this meet your request.
Always UNIX!
Sunil Kumar K.U.
Frequent Advisor

Re: more storage space using ln command

Hello all,

Thanks for the timely and accrate replies posted by you all.

Regards/SUNIL KUMAR K.U.