[plug] Add HDD question ..

Christian christian at amnet.net.au
Sat Apr 21 12:20:41 WST 2001


On Sat, Apr 21, 2001 at 12:10:00PM +0800, Brian Tombleson wrote:
> I'm looking to add another HDD to my linux system.
> 
> Current setup is simple,  one / partition
> 
> I would like to mount the new drive as a partition for /var
> 
> How do I get it to move with all the current info and not kill the system?
> (ie. I don't want to have to re-install).
> 
> Anyone got a methodology for this?

0. Insert disk into machine.
1. Make a partition on the new disk (cfdisk/fdisk).
2. Make a filesystem on the new disk (mke2fs) 
3. Go into single-user mode and shut down as many daemons as you can
find.  Make sure there are only the very basic processes running.
4. Mount the new disk somewhere like /mnt
5. Copy everything from /var/ to /mnt/.  You can use tar for this but if
you use 'cp -dpR' it does just as good a job.
6. Edit /etc/fstab so that it will mount /var from the new disk.
7. Delete everything under /var.
8. Reboot or bring the machine back to normal manually (I recommend
rebooting).

I've done this a few times before without any problems and I'm pretty
sure the above is what I did.  It's pretty simple assuming you know how
everything works so if you don't, now would be a good time to ask. :-)
-- 
DSA 0x0EC1D28C: BBCB 0D79 4EBB 078A A066  7267 8BED E9D6 0EC1 D28C



More information about the plug mailing list