Thread (4 messages) 4 messages, 3 authors, 2008-05-06

Re: Resize / file system and create /home in existing raid 1

From: Peter Grandi <hidden>
Date: 2008-05-05 21:53:48

[ ... reshaping from ... ]
- / is in a Raid 1 array (/dev/md0) consisting of two
  partitions - sda1 and sdb1 (ca. 148 GB);
- swap in Raid 0 (/dev/md1) - sda2 and sdb2 of ca. 1 GB each
  giving me 2 GB in total:
[ ... to ... ]
- resize the partition containing the / file system to 27 GB
  keeping it in RAID 1 (/dev/md0);
- create a new partition of 120GB to mount /home, also in RAID
  1 (/dev/md2);
- change swap from a RAID 0 to a RAID 1, resizing it to 2GB
  (/dev/md1).
Separating '/' and '/home' is a good idea. RAID swap, either
RAID0 or RAID1, is usually pointless. RAID1 swap is only useful
if you have really demanding availability requirements.
Can this be done without reinstalling everything from scratch?
You have two mirrored disks so it is trivial.

Break the mirroring, repartition 'sdb' say into 'sdb[123]',
'mkfs' the 'sdb[13]' partitions, 'mkswap' the 'sdb2' partition,
copy stuff from 'sda1' to 'sdb1' and 'sdb3', reboot from 'sdb1'
without any RAID, repartition 'sda' in the same way as 'sdb',
then recreate new RAID mirrors ('md0' as 'sda1' and 'sdb1'
etc.). You can do much the same from a live CD eliminating the
obvious steps.

Resizing is dangerous, shrinking is very dangerous, and most
filesystems don't support shrinking anyhow.
Output of /proc/mdstat: [ ... ]
Why so much pointless stuff...
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help