Boston Linux & UNIX was originally founded in 1994 as part of The Boston Computer Society. We meet on the third Wednesday of each month, online, via Jitsi Meet.

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Discuss] Please help with RAID1 on Ubuntu



On Thu, Jun 12, 2014 at 12:10:17PM -0400, Bill Horne wrote:
> The machine came with a default Ubuntu 13.04 LTS install, which
> includes an LVM on /dev/sda, and a blank /dev/sdb. The plan is to
> create a degraded RAID1 array on the "spare" drive, and then copy
> the "live" drive data into it and subsequently join the two drives
> together in a RAID1 array, with LVM on top of RAID1.
> 
> However, we know what they say about the best laid plans ...
> 
> I've managed to create some sort of array, named "md127", but I
> haven't been able to figure out how. I did an "mdadm --create" with
> a name of "md1", but I've wound up with "md127". It appears to be
> working, albeit in degraded mode, but I want to go slowly and figure
> out what happened before I wind up with a non-standard install which
> might cause problems later.

That's an easy one. mdadm doesn't guarantee naming by device, so
you need to either label your partitions (e2label) or use their
UUIDs (ls -al /dev/disk/by-uuid to figure it out) and then put
them in /etc/fstab as:

LABEL=whatever / ext3 defaults 0 0
or
UUID=big-long-string / ext3 defaults 0 0

as appropriate. UUID and label are both guaranteed to survive
anything that leaves the disk readable. UUID is
cross-filesystem.

UUID can also be used in mdadm as device names, and that is
recommended.


> it: of course, that's not the final state I'm aiming for, but for
> now I know that it is working with the "md127" name. I don't know
> how I wound up with the "md127" name instead of "md1", but if
> there's no danger sign in that name, I'm happy to go to the next
> step and make "md127" part of the LVM and proceed to add /dev/sda to
> the RAID1 array.

You're fine, but you probably want to specify it by UUID for /dev/sda,
not "/dev/sda".

-dsr-



BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org