Different HD size
Cloning the 40 GB Master HD (/dev/hda) to a bigger HD (/dev/hdb).
The example assumes a 160 GB IDE HD.
For this task you need to boot from a USB stick, because our server mainboards (AMD64) only have two IDE ports left. Detach CDROM drive and attach 160 GB harddrive jumpered as slave. If you don't have a bootable Linux stick, visit Knoppix or GRML website for details.
Install
hda(source) to the IDE-slot as Master.
Install
hdb(destination) to the IDE-slot as Slave
Wipe MBR on the 160GB HD.
fdisk -lu
should show you /dev/hdb 160 GB
dd if=/dev/zero of=/dev/hdb bs=512 count=1
Create new partitions hdb1 to hdb8
cfdisk /dev/hdb [New].
Do not forget to assign the File Type for the above created partitions:
File Type=82 for swap (dev/hdb1), File Type=83 (Linux) for the other partitions.
Reboot the machine. (IDE is not hotplug like USB)
Format partitions
mkfs -t ext3 /dev/hdb2 .......... hdb8
Transfer FILES to Partitions (using rsync)
Create source and destination directories
mkdir
/s
mkdir
/d
Mount the source and the destination partition
mount
/dev/hda2 /s
mount
/dev/hdb2 /d
Verify correct mounting with mount command:
mount
Now transfer the files:
rsync -av /s/ /d --devices -–specials
After work is done umount the source and the destination partition
umount
/s
umount
/d
and prepare fore the same job with hda3/hdb3:
mount
/dev/hda3 /s
mount
/dev/hdb3 /d
mount
rsync
-av /s/ /d --devices -–specials
After this work is also done we have to create the GRUB-boot-stuff on hdb.
Leave both harddrives attached to IDE and reboot to hda2 (x2go Server Master harddrive)
mount
/dev/hdb2 /mnt
ln -s /mnt/boot /boot
grub-install --no-floppy
--recheck --->
--root-directory=/mnt /dev/hdb
Now
the grub bootloader is also hdb !!
Release the Master drive
hda from the IDE-slot and rejumper the 160 GB hdb-Slave-HD
as new
hda-Master.
Suzan/Dominki
todo:
Finish doku for udev/rules.d and student/teacher script (add some screenshots)