You are not logged in.

#1 2012-10-30 10:09:15

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

[mdadm] Moving RAID1 partitions to make room for GRUB2

I want to switch to GRUB2, but the partitions of my root RAID1 start at sector 63. This does not leave enough room to embed GRUB2's core.img after the MBR (I've tried).

What are the steps I should take to make both partitions start from sector 2048 and not ruin my root RAID1 in the process?

My reasoning:

1) Boot from an Arch rescue USB disk
2) Shrink md1 (my root RAID1) to make it smaller (from 40G to 20G for instance)
3) Shrink the raid itself with mdadm using --grow (to 30G for instance, as a safe measure)

Here comes the part I'm not so sure about...

4) Fault a disk and remove it from the raid
5) Create a new partition starting from sector 2048
6) Add partition to raid, let it rebuild
7) Remove other one and apply the same logic
8) Hit myself because I screwed something up really bad?

Any suggestions, am I missing something?

Last edited by HyperBaton (2012-10-30 10:09:31)

Offline

#2 2012-11-06 13:06:46

HyperBaton
Member
From: Belgium
Registered: 2008-01-18
Posts: 207

Re: [mdadm] Moving RAID1 partitions to make room for GRUB2

This worked like a charm for me. The only thing not in my list is growing the raid and resizing the filesystem at the end.

Offline

Board footer

Powered by FluxBB