Version 2 (modified by Jamie McClelland, 12 years ago) (diff)


Run the following command (modify as needed):

xen-create-image --size=1Gb --memory=750MB--swap=512Mb --gateway= --netmask= --ip= --hostname=peltier

Create new LVM virtual volumes, for example:

lvcreate --size=5GB --name=peltier-var vg_gramsci0
lvcreate --size=5GB --name=peltier-usr vg_gramsci0
lvcreate --size=5GB --name=peltier-srv vg_gramsci0

Then, edit /etc/xen/peltier.cfg, modifying the disk line to be something like this:

disk    = [ 'phy:vg_gramsci0/peltier-disk,sda1,w', 'phy:vg_gramsci0/peltier-swap,sda2,w', 'phy:vg_gramsci0/peltier-var,sda3,w', 'phy:vg_gramsci0/peltier-usr,sda4,w', 'phy:vg_gramsci0/peltier-srv,sda5,w']

Then, start the server with:

xm create -c peltier.cfg

Login as root (no password).

Set the password.

Then exit. To get rid of the login screen and return to the dom0, hit ctrl-].

Then, ssh into the server and format the disks:

mkfs -t ext3 /dev/sda3
mkfs -t ext3 /dev/sda4
mkfs -t ext3 /dev/sda5

Switch the /var partition to the one you just created:

mkdir /mnt/var.temp
mount /dev/sda3 /mnt/var.temp
cp --preserve -r /var/* /mnt/var.temp
umount /mnt/var.temp
mv /var /var.orig; mkdir /var; mkdir /var; mount /dev/sda3 /var
rm -rf /var.orig
rmdir /mnt/var.temp

Do the same for usr:

mkdir /mnt/usr.temp
mount /dev/sda4 /mnt/usr.temp
cp --preserve -r /usr/* /mnt/usr.temp
umount /mnt/usr.temp
mv /usr /usr.orig; mkdir /usr; mount /dev/sda4 /usr
rm -rf /usr.orig
rmdir /mnt/usr.temp

Then, add the following lines to fstab:

/dev/sda3     /var     ext3     defaults   0     2
/dev/sda4     /usr     ext3     defaults   0     2
/dev/sda5     /srv    ext3     defaults   0     2

Then, mount the last filesystem:

mount /srv