Koozali.org: home of the SME Server

Moving entire server to new drive

rk

Moving entire server to new drive
« on: March 01, 2001, 09:46:52 PM »
Hi,
Is there any documentation on moving he entire contents of a server from one drive to another?  I am replacing my 2 Gig drive with a nice roomy 40 Gig drive.  Rather than add the drive as a #2 drive and mounting it, I wanted to just move the contents of the smaller drive to the larger one.  What is the best approach?  Should I rebuild the server from scratch on the new drive?  Can I use something like ghost to copy the partitions?  If I do that is there a util to resize the partitions?  Any advice, or other threads would be helpful.

rk

Dan Brown

Re: Moving entire server to new drive
« Reply #1 on: March 01, 2001, 11:05:48 PM »
The best bet is probably to do a backup through the e-smith-manager, install e-smith on the new drive, and then restore.  That way, you're sure the partitions are created correctly, boot block is set, etc.  Another possibility, which would do about the same thing, would be to back up to tape, then install on the new drive and restore.

rk

Re: Moving entire server to new drive
« Reply #2 on: March 02, 2001, 12:07:38 AM »
Thanks, but I don't have a backup device on this machine.  It is a home box I am playing with, so no backup capability.  Does the backup program back up to a file?  Does the backup program also backup any programs I have installed on the machine?

rk

peter

Re: Moving entire server to new drive
« Reply #3 on: March 02, 2001, 12:55:39 AM »
You DO have a backup device, its one of the workstations connected to your E-Smith server.
Go to the E-Smith manager and backup/restore is one of the options listed at the left (look under "administration")

Charlie Brady

Re: Moving entire server to new drive
« Reply #4 on: March 02, 2001, 01:17:43 AM »
peter wrote:
>
> You DO have a backup device, its one of the workstations
> connected to your E-Smith server.

You do need to be aware that there are a number of limitations to using the networked workstation backup/restore.

- The size of the backup is limited to the filesystem of the workstation - a limit of 2GB should be assumed.
- The network restore process creates a temporary file on the server. This means that you should not attempts a network restore unless the backup size is less than 50% of the free space on the server.

Regards

Charlie

Clifford Ilkay

Re: Moving entire server to new drive
« Reply #5 on: March 02, 2001, 09:00:30 AM »
Hi,

I suggest you copy whatever you want to keep to another machine and do a fresh install using the 2GB drive for everything but /home and /var and you 40GB drive for /home and /var. A 2GB drive is perfect for a boot device, swap, temp files, and /usr. The default kickstart file will not allow you to do this but a custom boot disk with your own kickstart file will. Here is a copy of a message I sent to the devinfo list last week that should help.

I was able to install e-smith onto multiple drives without using RAID. I really did not like the default values chosen by e-smith of a small /boot partition and everything else thrown into one big / partition. This is not considered to be good practice but I understand why it was done since the objective was to have a generic server and gateway installation.

I have two SCSI drives, /dev/sda is 4.5GB and /dev/sdb is 18.2GB. I wanted to put /var and /home on the larger drive and reserve the smaller drive for all the other stuff. I know the 4.5GB is overkill for the job but finding small drives these days is tough. So, here is how I did it.

1. created a boot floppy using boot.img from /images on the CD
2. modified ks.cfg as shown between the dashed lines
3. booted from the floppy and let the installer run as usual

Modifying the kickstart file allows one to have the flexibility of doing an NFS or hard disk based install or upgrade. I will be trying a hard disk install of 4.1.1 soon.

---------------------------------------------------------------
# language
lang en_US

# install method
cdrom

# keyboard
keyboard us

# networking
network --bootproto static --ip 192.168.1.1 --netmask 255.255.255.0 --gateway 192.168.1.2 --nameserver 127.0.0.1

# partitioning parameters
zerombr yes
clearpart --all
part /boot --size 100 --ondisk sda
part / --size 500 --ondisk sda
part /usr --size 2800 --ondisk sda
part /tmp --size 200 --grow --ondisk sda
part swap --size 512 --ondisk sda
part /var --size 3000 --ondisk sdb
part /home --size 10000 --grow --ondisk sdb

# install
install

# mouse
mouse none

# time zone
timezone --utc US/Eastern

# root password
rootpw default
auth --useshadow --enablemd5

# boot loader
lilo --location mbr

%packages
@ Base

%post
# set up initial configuration
/sbin/e-smith/signal-event post-install
# add comment to /etc/motd
echo "Welcome to the e-smith server and gateway." > /etc/motd
---------------------------------------------------------------

Regards,

Clifford Ilkay
Dinamis Corporation

rk

Re: Moving entire server to new drive
« Reply #6 on: March 02, 2001, 10:58:11 PM »
Thanks Clifford.  Unfortunately It is a space limited box (no extra bays inside).  If it was feasible, I would do exactly what you said, except I would do the base install on drive one, and make the /home partition like 10 meg, then create a new paration of the new drive, copy /home over there, and remount it.  The would give the maximum amount of space for the webservers.

My plan is to figure out everything I have done to the box over the last few weeks, and rebuild the drive from scratch.

rk

David

Re: Moving entire server to new drive
« Reply #7 on: March 03, 2001, 12:10:51 AM »
I migrated my 4.01 server via partition magic software in DOS mode. The whole exercise took 10 to 15minutes to move 2G of data from a 4G disk to a new 20G one, and selectively resize the partitions.
Unless you want to make lots of revisions to your configuration it is a simple solution.