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 6/12/2014 12:30 PM, Dan Ritter wrote:
> 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.

Thanks for your suggestion. I'm going to "test for transfer": just being 
cautious, etc.

When I do "ls -al /dev/disk/by-uuid", I get

telecomdigest5 at telecom-new:~$ sudo ls -al /dev/disk/by-uuid
[sudo] password for moder8:
total 0
drwxr-xr-x 2 root root 140 Jun 12 11:07 .
drwxr-xr-x 5 root root 100 Jun 12 00:09 ..
lrwxrwxrwx 1 root root  10 Jun 12 00:10 
3eebd0ba-ddf4-46ff-8610-505d56de8360 -> ../../dm-0
lrwxrwxrwx 1 root root  10 Jun 12 00:10 
50a377af-31bb-46df-b901-3dc84ddcece4 -> ../../sda1
lrwxrwxrwx 1 root root  10 Jun 12 00:10 
69d83c29-0475-470d-9465-650f7d4ddd9f -> ../../dm-1
lrwxrwxrwx 1 root root  10 Jun 12 00:10 
902c123b-6a15-4508-8989-0bd4673570b2 -> ../../sdb4
lrwxrwxrwx 1 root root  11 Jun 12 11:07 
d8bdbfe5-dfa2-437c-97f2-1d87f265bd3f -> ../../md127

However, when I enter the command "sudo mdadm --detail --scan", I get

ARRAY /dev/md/telecom-new:md1 metadata=1.2 name=telecom-new:md1 
UUID=c4e39dd8:541c124b:bd60a9b1:339d6e3e

... and since the UUID's aren't matching up, I'm in need of some 
reassurance that I'm not about to brick the machine by using this RAID1 
"ARRAY".

>> 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".

Good point, but I'm stuck at the point where the UUID's in "md127"  
don't match "md1".

BTW, I'd be fine with nuking the raid1 array(s) I have now and starting 
over if that's the easier way. How would I do that?

Bill

-- 
Bill Horne
William Warren Consulting
339-364-8487




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