0

I am running Ubuntu 14.10 which boots from two identical drives configured as a Raid 1. I would like to break up the array so to keep the existing data on one drive and use the second drive to install another operating system.

Could somebody kindly help me through this? It shouldn't be too difficult, and I have seen some instructions but they are from a couple of years ago, and I wonder if they are still valid.

I am giving below the content of /proc/mdstat and the output of fdisk -l, in case it is useful.

Thanks in advance! giuseppe


My /proc/mdstat:

Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10] md0 : active raid1 sda1[0] sdb1[1] 476501952 blocks [2/2] [UU]

md1 : active raid1 sda5[0] sdb5[1] 11881408 blocks [2/2] [UU]

unused devices:


fdisk -l:

Disk /dev/sda: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 953006079 953004032 454.4G fd Linux raid autodetect /dev/sda2 953008126 976771071 23762946 11.3G 5 Extended /dev/sda5 953008128 976771071 23762944 11.3G fd Linux raid autodetect

Disk /dev/sdb: 465.8 GiB, 500107862016 bytes, 976773168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x00000000

Device Boot Start End Sectors Size Id Type /dev/sdb1 * 2048 953006079 953004032 454.4G fd Linux raid autodetect /dev/sdb2 953008126 976771071 23762946 11.3G 5 Extended /dev/sdb5 953008128 976771071 23762944 11.3G fd Linux raid autodetect

Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: dos Disk identifier: 0x000803c4

Device Boot Start End Sectors Size Id Type /dev/sdc1 63 3907024064 3907024002 1.8T 83 Linux

Disk /dev/md1: 11.3 GiB, 12166561792 bytes, 23762816 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/md0: 454.4 GiB, 487937998848 bytes, 953003904 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes

0

There's not much to this.

  • You simply wait until your array is fully synced
  • Shutdown, remove whatever pair you want and stuff that in the new system
  • Boot both systems, each will have a degraded RAID1 with the same uuid
  • Add a slave and resync
  • Done

You'll want to change the array UUID on the new system and update the mdadm.conf to auto assemble. There's plenty of documentation to do this in the man page and the linux raid wiki.

Do not mix those disks between the two systems, especially if you didn't change the UUID. MD will take the one that appears to have the most up to date data and resync from that, potentially destroying your system.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.