D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Migrating/merging servers...

 

Neil Stone wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
>> On the target machine, I have a nice big harddrive with plenty of data 
>> on it, currently mounted at /mnt/200... ideally, I'd like to have that 
>> remounted as /var (because I'm gonna have /var/www, /var/shared on there 
>> shortly), however there are currently lots of files/directories on the 
>> existing /var directory.
>>
>> So, how can I duplicate the current /var structure onto the 200GB drive, 
>> remove the current /var structure and the remount the 200GB drive as 
>> /var... possibly without having to reboot?
> 
> OK, this is actually easier that you might think...
> 
> in /mnt/200 put 2 directories "www" and "shared"
> 
> $ mkdir /mnt/200/www
> $ mkdir /mnt/200/shared
> 
> then make a symlink in /var to these directories in turn.
> 
> $ ln -fs /mnt/200/www /var/www
> $ ln -fs /mnt/200/shared /var/shared
> 
> Who says GNU/Linux was hard ?? (don't forget the config files in /etc)
> 
> HTH
> 
> Neil

Thanks Neil, but I would rather not use symlinks if I can get away with 
it.  I don't want, in the future say, to have to create more symlinks 
because things default to /var/somethingorother.  I'm trying to keep the 
whole of my /var hierarchy on a single filesystem.

Cheers though.

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html