4
mdadm --create /dev/md2 -l 1 -n 3 --name="boot" /dev/sda1 missing missing
6
mdadm --manage /dev/md2 -a /dev/sdb1
7
- Storring current configuration (Don't forget!!!)
8
mdadm --detail --scan > /etc/mdadm.conf
10
Migrating to different RAID
11
===========================
12
- The grub accepts following syntaxis specifying root on the raid
13
root=/dev/md0 md=1,/dev/sda5,/dev/sdb5
14
However, the initrd normally contains /etc/mdadm.conf which defines
15
UUID (UUID=af154497:441463a4:5ae73ed6:62cf7617) of the actual RAID
16
to find and mount. Therefore, if raid is altered and UID is changed
17
it is necesary to update initrd file.
18
* This could be achieved, for example, by performing following actions:
20
b) search for md0 and replace uuid with actual value
23
Converting Disk to RAID-1 online
24
================================
25
There is a tricky bit. The actual Ext# partion is not occupaying all the
26
space of partition but leaving a small piece to the SoftRaid superblock.
28
a) The 64KB block is allocated to superblock
29
b) After that the size of partition is made multiple of 64KB (the
31
' 64KB - is dependent on raid strip size
33
- If Raid is already created the actual blocks count (1KB) could be
36
The blocks in complete partition (without stripped superblock and rounding)
40
- Then it's possible to resize the file system size (without touching actual
41
partition size) using:
42
resize2fs /dev/sd<dev> <size>
43
Required 'size' is reported by 'cat /proc/mdstat'
44
* Yep. if partition is not completely full, it's more or less save to create
45
RAID first, giving him opportunity to overwrite last sectors of data, find
46
appropriate size, and then resize file system.
47
* Alternatively file system could be resize down (few MB, let's say) then
48
RAID is created, no damage to FS, and then enlarge back to appropriate size
50
- e2fsck will complain what sizes do not match.