I have a linux box with CentOS 6.2 and a RAID1 (2x 2Tb) configuration:
/dev/md1 -> / (10G)
/dev/md2 -> /home (1.9T)
I want to split the md2 in two different partitions, so I can get the following configuration:
/dev/md1 -> / (10G)
/dev/md2 -> /home (1T)
/dev/md3 -> /example (900G)
How can I achieve this? I already know that I can resize the partition, but that doesn't alter the real partition table (only the md device), so how can I do this?
If you are not using LVM, you need to:
mdadm
),fdisk
),fdisk
),mdadm
).you are best of using logical volumes.
You can then create, expand and pretty much do as much as you want.
there is a nice guide here
http://www.gagme.com/greg/linux/raid-lvm.php
The correct (initial) way would have been to overlay LVM on top of the RAID array, and then re-allocate volumes as needed. But you're not at a point where this is probably feasible.
You may still have a way out. Ext3/Ext2 are re-sizable, although it is slightly risky when you are contracting filesystems. I don't recommend this unless you have no other options or you're willing to risk your data:
You have two paths now, one with LVM, one without.
With old-style partitions:
With LVM: