Tuesday, May 14, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 9235  / 3 Years ago, mon, june 28, 2021, 6:54:16

I just made a fresh install of Ubuntu 12.10 on a new SSD (/dev/sda). Now I would like to add two 1TB drives (/dev/sdb /dev/sdc) in RAID 1 but I'm pretty clueless on how to do it.



This is what I came up with (but didn't work):



First created partitions on the new drives:



sudo fdisk /dev/sdb



created primary partition and write table to disk



After that:



sudo mdadm --create --level=1 --name=raidarray --raid-devices=2 /dev/sdb /dev/sdc


However this outputs:



mdadm: device /dev/sdb exists but is not an md array.


Can somebody point me in the right direction on how to do this?



One bonus question: Would it be possible to reserve a part (same size of SSD) of one HDD and create a RAID 1 with the SSD and part of the HDD. And if so, how and can I keep my installation?


More From » 12.10

 Answers
2

The default command should look like this:



mdadm --create --verbose /dev/md0 --level=1 /dev/sda1 /dev/sdb2


You are not adding a complete disk, you should add a device (use /dev/sdb1 (or2), not just /dev/sdb) as far as I know. The target name (/dev/md0) was also missing.



I always use this cheatsheet: http://www.ducea.com/2009/03/08/mdadm-cheat-sheet/ :D


[#34299] Monday, June 28, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
peratingcit

Total Points: 253
Total Questions: 122
Total Answers: 94

Location: Botswana
Member since Sat, Jan 7, 2023
1 Year ago
peratingcit questions
Thu, Feb 23, 23, 18:33, 1 Year ago
Wed, Jul 27, 22, 03:43, 2 Years ago
Mon, Dec 6, 21, 13:03, 2 Years ago
;