Hi,
I've recently written this How-To for my needs, but you might as well find it useful
and give some comments/improvements
How-To extend the SME root file system using two Raid1 HDDs
In this example SME 7.2 is installed on two Raid1 HDDs /dev/sda and /dev/sdb (default 2 drives installation).
This is about how to add a Raid partition (/dev/md3) based on /dev/sdc and /dev/sdd to the LV /dev/main/root.
LV: logical volume, VG: volume group, PV: physical volume, fs: file system
1. Create /dev/md3 and format it.
Create a partion table for /dev/sdc and /dev/sdd
#fdisk /dev/sdc
with parameters (n p 1 t fd w) to create 1 Linux Raid autodetect partition using the full capacity
#sfdisk -d /dev/sdc |sfdisk /dev/sdd
Create/format /dev/md3
#mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1
#mkfs.ext3 /dev/md3
2. Add /dev/md3 to the VG
Create the PV /dev/md3:
#pvcreate /dev/md3
Add the PV /dev/md3 to the VG main:
#vgextend main /dev/md3
Enlarge the size of the LV /dev/main/root using the PV /dev/md3:
#lvresize -l +100%FREE /dev/main/root
Create a new boot image (to declare the new raid partition /dev/md3):
#mkinitrd /boot/newraid.img $(uname -r)
Modify /boot/grub/grub.conf to use the new image:
#sed -i 's/initrd-'"$(uname -r)"'.img/newraid.img/' /boot/grub/grub.conf
3. Extend the file system offline
Reboot and place the SME installation CD to use the sme rescue mode:
#boot: sme rescue
Ignore the network and Linux system search
Start all the Raids used by the VG main (here only /dev/md2 and /dev/md3):
#mdadm -AR /dev/md2 /dev/sda2 /dev/sdb2
#mdadm -AR /dev/md3 /dev/sdc1 /dev/sdd1
Scan for the VG main:
#lvm vgscan
Activate the VG main:
#lvm vgchange -ay main
And now enlarge the fs /dev/main/root:
#e2fsck -f /dev/main/root
#resize2fs /dev/main/root
That's it, reboot and you're done
PS: It is possible to extend the file system online using one simple command: #ext2online -C0 /dev/main/root
but it seems that ext2online is buggy when adding more than 60Gb to a fs. And anyway offline work on a filesystem
is more secure.