[plug] Migrate HDD on headless server
Weirdo
linuxalien at optusnet.com.au
Sun Jun 29 08:49:55 WST 2003
Thanks for all the advice. The only partions I have on the Headless server
is root and swap. I don't need swap as the load is never very high. What
partions do I need to create on the new disk? Just swap and a /proc
directory? I think dd across sounds easiest. I don't have a spare machine
to put the drives in as my box is locked into a cabinet takes time to
unlock it.
I will try the suggestions when I know I have enough time for problem solving.
My main reason for a new disk is I need to install gcc so that the windows
users can have their linux without needing to install heaps on their own box.
Thanks
Tim
At 12:58 28/06/2003 +1000, you wrote:
> > The ssh requirement makes it hard. The usual method
> > I use is to boot "linux init=/bin/bash" and DD the
> > root filesystem over to the new partition while it's
> > in RO mode. I then DD all the other partitons and
> > "resize2fs" or "reiserfs_resize" them up to the size
> > of the new host partition. Then I shutdown, swap
> > disks, boot up off a GRUB floppy and install GRUB on
> > the new primary disk. It's easy and fuss free IMHO.
>
>
>Alternatively rather than copy the partition with dd,
>you could copy the files to a newly-created filesystem
>on the new disk. Something like:
>
>* Create the new partitions with fdisk (whatever size
>you want) and format with mke2fs/mkreiser?/foo. Mount
>to wherever.
>
>* Stop everything that you can, so there's as little
>writing to the disk as needs to be. This includes
>samba, apache, syslog, and definitely cron. You should
>be able to get a "ps ax" list down to init, various
>other kernel-type processes (k*, also bdflush maybe),
>a few getty/mingetty/foo processes (don't matter), and
>sshd. (If you're feeling lucky you could even stop
>sshd, and hope your currently-logged-in session
>doesn't die... :)
>
>* Use something like cp -ar?, tar, or my personal
>choice (mc) to copy everything from / to /mntpoint.
>Make sure you exclude lost+found/, proc/, and
>mntpoint/, but don't forget to create a proc/
>directory on the new filesystem. Other requirements
>may differ if you have a separate /boot partition,
>etc.
>
>* You'll have to play around with lilo/grub to make
>sure you write the correct info to the correct disk.
>You should be able to confirm the latter with dd
>(check the start of the new disk to make sure one of
>them is mentioned), and the former with probably the
>Verbose mode of whichever one you use. I know lilo has
>a "-r /mntpoint" option for specifying the root
>filesystem to use (the distro installation uses this),
>grub may have similar.
>
>* If you're fairly sure it's got everything, shut
>down, swap the new drive in as primary master, and
>cross your fingers :)
>
>
>Yes, I have done this before (on production servers
>with software RAID1), but no, I haven't done it
>headless. It shouldn't be a problem as long as you
>check everything.
>
>Oh, and I assume that you _are_ actually doing it on a
>local machine (LAN), and not actually over the Net?
>Because the ssh output from mc will send your traffic
>count fairly high (draws nice bar graphs).
>
>CraigR did make a good point, putting the drives in
>another machine would make things _much_ easier...
>
>HTH
>Andrew
>
>
>=====
>Linux supports the notion of a command line or a shell for the same
>reason that only children read books with only pictures in them.
>Language, be it English or something else, is the only tool flexible
>enough to accomplish a sufficiently broad range of tasks.
> -- Bill Garrett
>
>http://mobile.yahoo.com.au - Yahoo! Mobile
>- Check & compose your email via SMS on your Telstra or Vodafone mobile.
weirdo at linuxalien.tk
Dot TK ambassador #24084 - For a free .tk domain please contact me
ICQ# 255176389
MSN weirdo at linuxalien.tk
Riverton, Perth, WA
More information about the plug
mailing list