[RndTbl] setting up RAID 1 with mdadm

Gilbert E. Detillieux gedetil at cs.umanitoba.ca
Thu Oct 4 09:42:46 CDT 2018


I think the tutorial is complete enough.  The only thing I'd do 
differently is create appropriate partition tables on the raw disks (GPT 
if the disks are >2TB or if you need to use GPT for other reasons, but 
the older MS-DOS partition tables would be fine otherwise), set up one 
partition on each drive and tag them with the applicable partition type 
to indicate they're MD RAID partitions, and use the device names for the 
partitions rather than the raw drives in the mdadm commands.  While this 
isn't necessary, I think it would help in post-mortem recovery, and in 
keeping your sanity when you're (or someone else is) trying to figure 
out what you did a few years later.

LVM has some nice features to offer, e.g. if you anticipate wanting to 
add more capacity to this file system in the future, or you want to 
split a large array into multiple file systems.  But for simple use 
cases, I wouldn't bother.  If you do use LVM, don't use its RAID 
features; use LVM over top of MD.

If you go with GPT partition format, and don't want to deal with the 
arcane syntax of parted commands, there are alternatives: gparted for 
the full-GUI, Partition-Magic-like experience, or gdisk for a simple 
fdisk-like, retro, text-menu-based interface.

Gilbert

On 04/10/2018 8:33 AM, Gilles Detillieux wrote:
> Circumstances finally forced me to bite the bullet and learn something I 
> had been putting off for too long: setting up a RAID array under Linux. 
> I'm almost embarrassed, now that I've done it, that I waited so long 
> because it was way simpler than I'd imagined. I thought I'd have to 
> figure out all kinds of magic with LVM, parted, and mdadm, but I found 
> this tutorial that showed a simple set of mdadm commands to set up RAID 1:
> 
> https://www.digitalocean.com/community/tutorials/how-to-create-raid-arrays-with-mdadm-on-ubuntu-16-04 
> 
> 
> This was actually one of the simplest scenarios: the system had an SSD 
> for the root/boot partition, and two 2 TB hard drives for data storage 
> (/dev/sdb & sdc), so I just needed to set up RAID 1 and not worry about 
> the intricacies of booting from RAID. So, software RAID seemed like the 
> quick & easy way to go with a minimum of fuss.
> 
> Now the nagging question: is it really this simple, or does the tutorial 
> above oversimplify and omit some important steps? Can someone with ample 
> RAID and mdadm experience advise or provide tips on anything else I 
> should do or lookout for?
> 
> Thanks,
> Gilles

-- 
Manitoba UNIX User Group	E-mail: <gedetil at muug.ca>
c/o Gilbert E. Detillieux	Web:	http://muug.ca/
University of Manitoba		Phone:  (204)474-8161
Winnipeg MB CANADA  R3T 2N2	Fax:    (204)474-7609


More information about the Roundtable mailing list