[lug] Linking one partition to another for more room

rm at fabula.de rm at fabula.de
Mon Dec 10 08:52:41 MST 2001


On Mon, Dec 10, 2001 at 08:37:11AM -0700, Dhruva B. Reddy wrote:
> Have you tried:
> 
> $ mv /var/cache /usr/local/var-cache # Or whatever you want to call it
> $ ln -s /usr/local/var-cache /var/cache

something i wouldn't do on a running server ...
'mv' over partition boundaries will copy/delete files. Any process
that has a file descriptor of a file in /var/cache ... open will happily
read write to the open file and not to the newly create one in /usr/local/var...

> I've never tried this myself.  Is there any reason this wouldn't work?

It will probably work fine for desktop machines, but i would be rather
carefull with servers (the story behind this: a file will only get deleted
by the OS once the last file descriptor pointing to is closed - hence there
is no 'delete' command/function, only an unlink one. One commom trick, esp.
for server processes, to keep a 'private' file is to open it and the unlink it
without closing the file descriptor. The file will disapear from directory 
listings and will be unaccessible to other processes but is still available for 
access by the creating process).

 Ralf
 
> 
> Dhruva
> 
> On Mon, Dec 10, 2001 at 07:13:09AM -0700, quoth BOF:
> > Hello,
> > 
> > How can I link one partition to another where I have more disk space?
> > 
> > I was trying to download Ximian yesterday and its installation file 
> > insisted on placing the files into /var/cache and its .rpm files into 
> > /var/cache/redcarpet/packages. I had no control over this, as the 
> > installation file was a binary file. My /var partition is very small and 
> > I soon ran out of room.
> > 
> > There is lotsa room on my /usr/local partition. Is there a way to link 
> > /var/cache and its subdirectory /var/cache/redcarpet/packages to a 
> > directory on /usr/local to allow the download and then fake out the 
> > installation program so that it will install?
> > 
> > Thanx.
> > 
> > BOF
> _______________________________________________
> Web Page:  http://lug.boulder.co.us
> Mailing List: http://lists.lug.boulder.co.us/mailman/listinfo/lug



More information about the LUG mailing list