Help, my RAID won't start

Kevin O'Gorman kogorman at gmail.com
Tue Apr 4 16:01:23 UTC 2017


On Tue, Apr 4, 2017 at 8:56 AM, Kevin O'Gorman <kogorman at gmail.com> wrote:


>
> On Tue, Apr 4, 2017 at 8:48 AM, Kevin O'Gorman <kogorman at gmail.com> wrote:
>
>>
>>
>> On Tue, Apr 4, 2017 at 8:18 AM, Kevin O'Gorman <kogorman at gmail.com>
>> wrote:
>>
>>>
>>>
>>> On Tue, Apr 4, 2017 at 6:50 AM, Rashkae <ubuntu at tigershaunt.com> wrote:
>>>
>>>> On 17-04-04 12:17 AM, Kevin O'Gorman wrote:
>>>>
>>>>> I've been fooling with this for a while.  Some things are fixed, but
>>>>> the
>>>>> darned thing still isn't right.
>>>>>
>>>>>
>>>> It looks like you've partitioned your RAID device itself.  I'm not too
>>>> sure how that's supposed to look, as I've never set them up that way.
>>>> (I partition the physical devices, as you've done, then create a raid
>>>> array, and create my FS directly on that array.)
>>>>
>>>> That's not to say what you have here is wrong, just that I'm not sure
>>>> how to interpret the blkid output.
>>>>
>>>> But actually fixing your current situation is probably going to be
>>>> simple.. *Don't* use device names in your fstab.. put in the UUID
>>>>
>>>> Example:
>>>>
>>>>
>>>> UUID=a6470f33-4709-4c96-8cf4-2fc0a4c2cdf9 /raid3        ext4
>>>>  defaults  0    2
>>>>
>>>> (Note the removal of nofail, and changing the last field to 2)
>>>>
>>>>
>>>> You might also want to update your mdadm.conf
>>>>
>>>> Check the device name of your running array with cat /proc/mdstat
>>>>
>>>> Assuming it's the same as you have in the original message, md127
>>>>
>>>> mdadm --detail --scan /dev/md127
>>>>
>>>> Use the output of that command to replace the ARRAY /dev/md3
>>>> metadata=1.2 name=camelot-x:3
>>>> UUID=07c3d55f:2c9b1534:6b0d5b78:dd9856ed
>>>>
>>>
>>> Thanks...
>>>
>>> I tried your entry in my /etc/fstab, and "mount /raid3", and while the
>>> mount finished without reporting an error, there
>>> was no filesystem on /raid3, and /var/log/syslog now ends with
>>>
>>> Apr  4 07:37:14 camelot-x wpa_supplicant[1553]: wlp7s0: WPA: Group
>>> rekeying completed with b4:75:0e:fc:84:9a [GTK=TKIP]
>>> Apr  4 07:46:46 camelot-x kernel: [38933.017667] EXT4-fs (md127p1):
>>> mounted filesystem with ordered data mode. Opts: (null)
>>> Apr  4 07:46:46 camelot-x systemd[1]: raid3.mount: Unit is bound to
>>> inactive unit dev-md3p1.device. Stopping, too.
>>> Apr  4 07:46:46 camelot-x systemd[1]: Unmounting /raid3...
>>> Apr  4 07:46:46 camelot-x systemd[1]: Unmounted /raid3.
>>>
>>> All of this in spite of /proc/mdstat reporting an active RAID array....
>>>
>>> So I tried putting the filesystem directly on the RAID, as you
>>> suggested, with
>>> dd if=/dev/zero of=/dev/md127 bs=1024 count=1024
>>> mdadm --stop /dev/md127
>>> mdadm --remove /dev/md127
>>> mdadm -A --scan /dev/md3
>>> mkfs.ext4 -m .01 -b 4096 -E stride=32,stripe-width=64 /dev/md3
>>>
>>> And was still unable to mount /raid3, but now I can see the syslog is
>>> complaining that /raid3 is still bound to the
>>> non-existent partition /dev/md3p1.  So I mounted it on a new directory
>>> /raid3x.  It seems okay, in that it has
>>> lost+found and lots of space.  But it did so last time too.
>>>
>>> I'm going to stick with my /etc/fstab entry for now, because I want to
>>> be sure I get a warning if it ever gets assembled
>>> as anything except /dev/md3.  The mdadm.conf entry is still correct, so
>>> I'm going to reboot to make sure everything gets
>>> assembled correctly.  Back in a few.....
>>>
>>> --
>>> Kevin O'Gorman
>>> #define QUESTION ((bb) || (!bb))   /* Shakespeare */
>>>
>>> Please consider the environment before printing this email.
>>>
>> That did NOT work.  Not exactly, anyway.
>>
>> There was nothing mounted on /raid3 after the reboot, and there was a
>> /dev/md127 that I cannot get rid of in spite of multiple tries at
>> mdadm --stop /dev/md127
>> mdadm --remove /dev/md127
>> But it did not show up in /proc/mdstat any more so I reassembled it
>> mdadm -A --scan /dev/md3
>> And it was not only assembled but mounted too.
>>
>> lsblk shows
>> sdd       8:48   0   3.7T  0 disk
>> └─sdd1    8:49   0   3.7T  0 part
>>   └─md3   9:3    0   7.3T  0 raid5 /raid3
>> sde       8:64   0   3.7T  0 disk
>> └─sde1    8:65   0   3.7T  0 part
>>   └─md3   9:3    0   7.3T  0 raid5 /raid3
>> sdf       8:80   0   3.7T  0 disk
>> └─sdf1    8:81   0   3.7T  0 part
>>   └─md3   9:3    0   7.3T  0 raid5 /raid3
>>
>> blkid shows
>> /dev/sdd1: UUID="07c3d55f-2c9b-1534-6b0d-5b78dd9856ed"
>> UUID_SUB="24275237-b493-169e-9e88-df0debaae551" LABEL="camelot-x:3"
>> TYPE="linux_raid_member" PARTLABEL="cam-raid5-a"
>> PARTUUID="729558f8-fbcf-45c1-9d9b-c6bfe6ec4bf6"
>> /dev/sde1: UUID="07c3d55f-2c9b-1534-6b0d-5b78dd9856ed"
>> UUID_SUB="cf36e69a-c110-b0ae-b504-fcfeb2dea024" LABEL="camelot-x:3"
>> TYPE="linux_raid_member" PARTLABEL="cam-raid5-c"
>> PARTUUID="654fc581-f6ef-43a4-b583-6f3cd7d52e61"
>> /dev/sdf1: UUID="07c3d55f-2c9b-1534-6b0d-5b78dd9856ed"
>> UUID_SUB="54fbf294-766f-c8eb-9663-02a39534003f" LABEL="camelot-x:3"
>> TYPE="linux_raid_member" PARTLABEL="cam-raid5-b"
>> PARTUUID="f6a7ba77-278e-4b64-8f7e-16041b85f097"
>> and
>> /dev/md3: UUID="97309dc0-0f54-45d8-853f-af99dead3ed2" TYPE="ext4"
>>
>> df -h shows
>> /dev/md3        7.3T   51M  7.3T   1% /raid3
>>
>> QUESIONS:
>>
>> So why is there still a /dev/md127, and why does the array not assemble
>> as /dev/md3?
>> /etc/mdadm/mdadm.conf contains just the one array:
>> ARRAY /dev/md3 metadata=1.2 name=camelot-x:3
>> UUID=07c3d55f:2c9b1534:6b0d5b78:dd9856ed
>> which is still what I get from
>> mdadm --detail --scan
>>
>> mount and umount commands work as expected, both with my original
>> /etc/fstab entry or with yours.  I'll leave yours in place and try a
>> reboot....
>>
>> --
>> Kevin O'Gorman
>> #define QUESTION ((bb) || (!bb))   /* Shakespeare */
>>
>> Please consider the environment before printing this email.
>>
>
>
> SUCCESS.  Sort of.  It raises another question.
>
> On reboot, I had /raid3.  But it is mounted on /dev/md127.  It appears the
> system is ignoring the device in my mdadm.conf entry.  Here it is again:
> ARRAY /dev/md3 metadata=1.2 name=camelot-x:3 UUID=07c3d55f:2c9b1534:
> 6b0d5b78:dd9856ed
> And here's the output of mdadm --detail --scan
> ARRAY /dev/md/camelot-x:3 metadata=1.2 name=camelot-x:3
> UUID=07c3d55f:2c9b1534:6b0d5b78:dd9856ed
>
> And indeed there is a /dev/camelot-x:3
>

Sorry, clicked before I got a chance to finish and make this a
bottom-post.  Anyway, the above is a link to /dev/md127

So on startup, it's going to make its own choices of device...  And it then
makes sense to use UUID in the /etc/fstab entry.

Yet another discrepancy with the docs I was using.

-- 
Kevin O'Gorman
#define QUESTION ((bb) || (!bb))   /* Shakespeare */

Please consider the environment before printing this email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20170404/7e6e14bd/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: image/gif
Size: 441 bytes
Desc: not available
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20170404/7e6e14bd/attachment.gif>


More information about the ubuntu-users mailing list