All of lore.kernel.org
 help / color / mirror / Atom feed
* raid0: device does not exist with examine and scan
@ 2017-07-27 16:11 Nigel Croxon
  2017-07-27 17:07 ` Wols Lists
  0 siblings, 1 reply; 4+ messages in thread
From: Nigel Croxon @ 2017-07-27 16:11 UTC (permalink / raw)
  To: linux-raid


Hello all,

The device name referenced in the mdadm --examine --scan does not exist
when using metadata=1.2 and --name on the creation.
I am using metadata 0.9 as a bases to test against 1.2.
Am I fighting a udev rule? Did the symlink from /dev/md/TEST_MD to
/dev/md0 disappear?


If I start with METADATA=0.9 and specifying a --name

# mdadm --create --verbose /dev/md0 --level=0 --metadata=0.9
--raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde

with METADATA=0.9, there is no NAME field printed on DETAIL

# mdadm -D /dev/md0
/dev/md0:
           Version : 0.90
     Creation Time : Thu Jul 27 10:36:02 2017
        Raid Level : raid0
        Array Size : 293045760 (279.47 GiB 300.08 GB)
      Raid Devices : 2
     Total Devices : 2
   Preferred Minor : 0
       Persistence : Superblock is persistent

       Update Time : Thu Jul 27 10:36:02 2017
             State : clean
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

        Chunk Size : 512K

Consistency Policy : none

              UUID : 623d8bac:8819491b:e9034e5d:acd14f01
            Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       8       48        0      active sync   /dev/sdd
       1       8       64        1      active sync   /dev/sde


The --examine --scan shows /dev/md0, and not /dev/md/TEST_MD.
# mdadm --examine --scan
ARRAY /dev/md0 UUID=65cb66eb:d8a0d9ff:85609b40:89383835


Next, change the METADATA=1.2 and specifying a --name
# mdadm --create --verbose /dev/md0 --level=0 --metadata=1.2
--raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde

With METADATA=1.2, there is a NAME field printed:
thinkstation:TEST_MD  (local to host thinkstation)

# mdadm -D /dev/md0
/dev/md0:
           Version : 1.2
     Creation Time : Thu Jul 27 11:13:02 2017
        Raid Level : raid0
        Array Size : 292784128 (279.22 GiB 299.81 GB)
      Raid Devices : 2
     Total Devices : 2
       Persistence : Superblock is persistent

       Update Time : Thu Jul 27 11:13:02 2017
             State : clean
    Active Devices : 2
   Working Devices : 2
    Failed Devices : 0
     Spare Devices : 0

        Chunk Size : 512K

Consistency Policy : none

              Name : thinkstation:TEST_MD  (local to host thinkstation)
              UUID : 591d68eb:5182a6e2:ead93be0:812f7fc6
            Events : 0

    Number   Major   Minor   RaidDevice State
       0       8       48        0      active sync   /dev/sdd
       1       8       64        1      active sync   /dev/sde

The --examine --scan is shows /dev/md/TEST_MD and not /dev/md0.

# mdadm --examine --scan
ARRAY /dev/md/TEST_MD  metadata=1.2
UUID=413a8ca9:a1edb21b:9eb8876d:784349ed name=thinkstation:TEST_MD

This problem is, /dev/md/TEST_MD does not exist. /dev/md0 does.

mdadm --version
mdadm - v4.0-158-gcb91230 - 2017-07-10

Am I fighting udev rules?

Regards,
-Nigel



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: raid0: device does not exist with examine and scan
  2017-07-27 16:11 raid0: device does not exist with examine and scan Nigel Croxon
@ 2017-07-27 17:07 ` Wols Lists
  2017-07-27 17:17   ` Nigel Croxon
  0 siblings, 1 reply; 4+ messages in thread
From: Wols Lists @ 2017-07-27 17:07 UTC (permalink / raw)
  To: Nigel Croxon, linux-raid

On 27/07/17 17:11, Nigel Croxon wrote:
> 
> Hello all,
> 
> The device name referenced in the mdadm --examine --scan does not exist
> when using metadata=1.2 and --name on the creation.
> I am using metadata 0.9 as a bases to test against 1.2.
> Am I fighting a udev rule? Did the symlink from /dev/md/TEST_MD to
> /dev/md0 disappear?
> 
> 
> If I start with METADATA=0.9 and specifying a --name
> 
> # mdadm --create --verbose /dev/md0 --level=0 --metadata=0.9
> --raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
> 
> with METADATA=0.9, there is no NAME field printed on DETAIL

I don't think 0.9 metadata supports names ...
> 
> # mdadm -D /dev/md0
> /dev/md0:
>            Version : 0.90
>      Creation Time : Thu Jul 27 10:36:02 2017
>         Raid Level : raid0
>         Array Size : 293045760 (279.47 GiB 300.08 GB)
>       Raid Devices : 2
>      Total Devices : 2
>    Preferred Minor : 0
>        Persistence : Superblock is persistent
> 
>        Update Time : Thu Jul 27 10:36:02 2017
>              State : clean
>     Active Devices : 2
>    Working Devices : 2
>     Failed Devices : 0
>      Spare Devices : 0
> 
>         Chunk Size : 512K
> 
> Consistency Policy : none
> 
>               UUID : 623d8bac:8819491b:e9034e5d:acd14f01
>             Events : 0.1
> 
>     Number   Major   Minor   RaidDevice State
>        0       8       48        0      active sync   /dev/sdd
>        1       8       64        1      active sync   /dev/sde
> 
> 
> The --examine --scan shows /dev/md0, and not /dev/md/TEST_MD.
> # mdadm --examine --scan
> ARRAY /dev/md0 UUID=65cb66eb:d8a0d9ff:85609b40:89383835
> 
> 
> Next, change the METADATA=1.2 and specifying a --name
> # mdadm --create --verbose /dev/md0 --level=0 --metadata=1.2
> --raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
> 
> With METADATA=1.2, there is a NAME field printed:
> thinkstation:TEST_MD  (local to host thinkstation)
> 
> # mdadm -D /dev/md0
> /dev/md0:
>            Version : 1.2
>      Creation Time : Thu Jul 27 11:13:02 2017
>         Raid Level : raid0
>         Array Size : 292784128 (279.22 GiB 299.81 GB)
>       Raid Devices : 2
>      Total Devices : 2
>        Persistence : Superblock is persistent
> 
>        Update Time : Thu Jul 27 11:13:02 2017
>              State : clean
>     Active Devices : 2
>    Working Devices : 2
>     Failed Devices : 0
>      Spare Devices : 0
> 
>         Chunk Size : 512K
> 
> Consistency Policy : none
> 
>               Name : thinkstation:TEST_MD  (local to host thinkstation)
>               UUID : 591d68eb:5182a6e2:ead93be0:812f7fc6
>             Events : 0
> 
>     Number   Major   Minor   RaidDevice State
>        0       8       48        0      active sync   /dev/sdd
>        1       8       64        1      active sync   /dev/sde
> 
> The --examine --scan is shows /dev/md/TEST_MD and not /dev/md0.
> 
> # mdadm --examine --scan
> ARRAY /dev/md/TEST_MD  metadata=1.2
> UUID=413a8ca9:a1edb21b:9eb8876d:784349ed name=thinkstation:TEST_MD
> 
> This problem is, /dev/md/TEST_MD does not exist. /dev/md0 does.

Is the array running? This is an educated guess on my part, but I think
it's running the array that creates the symlink.
> 
> mdadm --version
> mdadm - v4.0-158-gcb91230 - 2017-07-10
> 
> Am I fighting udev rules?
> 
Cheers,
Wol


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: raid0: device does not exist with examine and scan
  2017-07-27 17:07 ` Wols Lists
@ 2017-07-27 17:17   ` Nigel Croxon
  2017-07-28 13:50     ` Nigel Croxon
  0 siblings, 1 reply; 4+ messages in thread
From: Nigel Croxon @ 2017-07-27 17:17 UTC (permalink / raw)
  To: Wols Lists, linux-raid

On 07/27/2017 01:07 PM, Wols Lists wrote:
> On 27/07/17 17:11, Nigel Croxon wrote:
>>
>> Hello all,
>>
>> The device name referenced in the mdadm --examine --scan does not exist
>> when using metadata=1.2 and --name on the creation.
>> I am using metadata 0.9 as a bases to test against 1.2.
>> Am I fighting a udev rule? Did the symlink from /dev/md/TEST_MD to
>> /dev/md0 disappear?
>>
>>
>> If I start with METADATA=0.9 and specifying a --name
>>
>> # mdadm --create --verbose /dev/md0 --level=0 --metadata=0.9
>> --raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
>>
>> with METADATA=0.9, there is no NAME field printed on DETAIL
> 
> I don't think 0.9 metadata supports names ...
>>
>> # mdadm -D /dev/md0
>> /dev/md0:
>>            Version : 0.90
>>      Creation Time : Thu Jul 27 10:36:02 2017
>>         Raid Level : raid0
>>         Array Size : 293045760 (279.47 GiB 300.08 GB)
>>       Raid Devices : 2
>>      Total Devices : 2
>>    Preferred Minor : 0
>>        Persistence : Superblock is persistent
>>
>>        Update Time : Thu Jul 27 10:36:02 2017
>>              State : clean
>>     Active Devices : 2
>>    Working Devices : 2
>>     Failed Devices : 0
>>      Spare Devices : 0
>>
>>         Chunk Size : 512K
>>
>> Consistency Policy : none
>>
>>               UUID : 623d8bac:8819491b:e9034e5d:acd14f01
>>             Events : 0.1
>>
>>     Number   Major   Minor   RaidDevice State
>>        0       8       48        0      active sync   /dev/sdd
>>        1       8       64        1      active sync   /dev/sde
>>
>>
>> The --examine --scan shows /dev/md0, and not /dev/md/TEST_MD.
>> # mdadm --examine --scan
>> ARRAY /dev/md0 UUID=65cb66eb:d8a0d9ff:85609b40:89383835
>>
>>
>> Next, change the METADATA=1.2 and specifying a --name
>> # mdadm --create --verbose /dev/md0 --level=0 --metadata=1.2
>> --raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
>>
>> With METADATA=1.2, there is a NAME field printed:
>> thinkstation:TEST_MD  (local to host thinkstation)
>>
>> # mdadm -D /dev/md0
>> /dev/md0:
>>            Version : 1.2
>>      Creation Time : Thu Jul 27 11:13:02 2017
>>         Raid Level : raid0
>>         Array Size : 292784128 (279.22 GiB 299.81 GB)
>>       Raid Devices : 2
>>      Total Devices : 2
>>        Persistence : Superblock is persistent
>>
>>        Update Time : Thu Jul 27 11:13:02 2017
>>              State : clean
>>     Active Devices : 2
>>    Working Devices : 2
>>     Failed Devices : 0
>>      Spare Devices : 0
>>
>>         Chunk Size : 512K
>>
>> Consistency Policy : none
>>
>>               Name : thinkstation:TEST_MD  (local to host thinkstation)
>>               UUID : 591d68eb:5182a6e2:ead93be0:812f7fc6
>>             Events : 0
>>
>>     Number   Major   Minor   RaidDevice State
>>        0       8       48        0      active sync   /dev/sdd
>>        1       8       64        1      active sync   /dev/sde
>>
>> The --examine --scan is shows /dev/md/TEST_MD and not /dev/md0.
>>
>> # mdadm --examine --scan
>> ARRAY /dev/md/TEST_MD  metadata=1.2
>> UUID=413a8ca9:a1edb21b:9eb8876d:784349ed name=thinkstation:TEST_MD
>>
>> This problem is, /dev/md/TEST_MD does not exist. /dev/md0 does.
> 
> Is the array running? This is an educated guess on my part, but I think
> it's running the array that creates the symlink.
>>

# mdadm --create --verbose /dev/md0 --level=0 --metadata=1.2
--raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
mdadm: chunk size defaults to 512K
mdadm: array /dev/md0 started.

# cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 sde[1] sdd[0]
      292784128 blocks super 1.2 512k chunks

unused devices: <none>

# mdadm --examine --scan
ARRAY /dev/md/TEST_MD  metadata=1.2
UUID=fff9f89d:62dcc596:665386ca:d19f2487 name=thinkstation:TEST_MD

# ls /dev/md/
ls: cannot access /dev/md/: No such file or directory


>> mdadm --version
>> mdadm - v4.0-158-gcb91230 - 2017-07-10
>>
>> Am I fighting udev rules?
>>
> Cheers,
> Wol
> 
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: raid0: device does not exist with examine and scan
  2017-07-27 17:17   ` Nigel Croxon
@ 2017-07-28 13:50     ` Nigel Croxon
  0 siblings, 0 replies; 4+ messages in thread
From: Nigel Croxon @ 2017-07-28 13:50 UTC (permalink / raw)
  To: Wols Lists, linux-raid

On 07/27/2017 01:17 PM, Nigel Croxon wrote:
> On 07/27/2017 01:07 PM, Wols Lists wrote:
>> On 27/07/17 17:11, Nigel Croxon wrote:
>>>
>>> Hello all,
>>>
>>> The device name referenced in the mdadm --examine --scan does not exist
>>> when using metadata=1.2 and --name on the creation.
>>> I am using metadata 0.9 as a bases to test against 1.2.
>>> Am I fighting a udev rule? Did the symlink from /dev/md/TEST_MD to
>>> /dev/md0 disappear?
>>>
>>>
>>> If I start with METADATA=0.9 and specifying a --name
>>>
>>> # mdadm --create --verbose /dev/md0 --level=0 --metadata=0.9
>>> --raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
>>>
>>> with METADATA=0.9, there is no NAME field printed on DETAIL
>>
>> I don't think 0.9 metadata supports names ...
>>>
>>> # mdadm -D /dev/md0
>>> /dev/md0:
>>>            Version : 0.90
>>>      Creation Time : Thu Jul 27 10:36:02 2017
>>>         Raid Level : raid0
>>>         Array Size : 293045760 (279.47 GiB 300.08 GB)
>>>       Raid Devices : 2
>>>      Total Devices : 2
>>>    Preferred Minor : 0
>>>        Persistence : Superblock is persistent
>>>
>>>        Update Time : Thu Jul 27 10:36:02 2017
>>>              State : clean
>>>     Active Devices : 2
>>>    Working Devices : 2
>>>     Failed Devices : 0
>>>      Spare Devices : 0
>>>
>>>         Chunk Size : 512K
>>>
>>> Consistency Policy : none
>>>
>>>               UUID : 623d8bac:8819491b:e9034e5d:acd14f01
>>>             Events : 0.1
>>>
>>>     Number   Major   Minor   RaidDevice State
>>>        0       8       48        0      active sync   /dev/sdd
>>>        1       8       64        1      active sync   /dev/sde
>>>
>>>
>>> The --examine --scan shows /dev/md0, and not /dev/md/TEST_MD.
>>> # mdadm --examine --scan
>>> ARRAY /dev/md0 UUID=65cb66eb:d8a0d9ff:85609b40:89383835
>>>
>>>
>>> Next, change the METADATA=1.2 and specifying a --name
>>> # mdadm --create --verbose /dev/md0 --level=0 --metadata=1.2
>>> --raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
>>>
>>> With METADATA=1.2, there is a NAME field printed:
>>> thinkstation:TEST_MD  (local to host thinkstation)
>>>
>>> # mdadm -D /dev/md0
>>> /dev/md0:
>>>            Version : 1.2
>>>      Creation Time : Thu Jul 27 11:13:02 2017
>>>         Raid Level : raid0
>>>         Array Size : 292784128 (279.22 GiB 299.81 GB)
>>>       Raid Devices : 2
>>>      Total Devices : 2
>>>        Persistence : Superblock is persistent
>>>
>>>        Update Time : Thu Jul 27 11:13:02 2017
>>>              State : clean
>>>     Active Devices : 2
>>>    Working Devices : 2
>>>     Failed Devices : 0
>>>      Spare Devices : 0
>>>
>>>         Chunk Size : 512K
>>>
>>> Consistency Policy : none
>>>
>>>               Name : thinkstation:TEST_MD  (local to host thinkstation)
>>>               UUID : 591d68eb:5182a6e2:ead93be0:812f7fc6
>>>             Events : 0
>>>
>>>     Number   Major   Minor   RaidDevice State
>>>        0       8       48        0      active sync   /dev/sdd
>>>        1       8       64        1      active sync   /dev/sde
>>>
>>> The --examine --scan is shows /dev/md/TEST_MD and not /dev/md0.
>>>
>>> # mdadm --examine --scan
>>> ARRAY /dev/md/TEST_MD  metadata=1.2
>>> UUID=413a8ca9:a1edb21b:9eb8876d:784349ed name=thinkstation:TEST_MD
>>>
>>> This problem is, /dev/md/TEST_MD does not exist. /dev/md0 does.
>>
>> Is the array running? This is an educated guess on my part, but I think
>> it's running the array that creates the symlink.
>>>
> 
> # mdadm --create --verbose /dev/md0 --level=0 --metadata=1.2
> --raid-devices=2 --name=TEST_MD /dev/sdd /dev/sde
> mdadm: chunk size defaults to 512K
> mdadm: array /dev/md0 started.
> 
> # cat /proc/mdstat
> Personalities : [raid0]
> md0 : active raid0 sde[1] sdd[0]
>       292784128 blocks super 1.2 512k chunks
> 
> unused devices: <none>
> 
> # mdadm --examine --scan
> ARRAY /dev/md/TEST_MD  metadata=1.2
> UUID=fff9f89d:62dcc596:665386ca:d19f2487 name=thinkstation:TEST_MD
> 
> # ls /dev/md/
> ls: cannot access /dev/md/: No such file or directory
> 
> 
>>> mdadm --version
>>> mdadm - v4.0-158-gcb91230 - 2017-07-10
>>>
>>> Am I fighting udev rules?
>>>
>> Cheers,
>> Wol
>>
>>

Looks like I'm all set.

1) Reboot - and the symlink will be there.
or
2) stop the device and reassemble with -I

This is how the udev rules do it.

-Nigel



^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-28 13:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-27 16:11 raid0: device does not exist with examine and scan Nigel Croxon
2017-07-27 17:07 ` Wols Lists
2017-07-27 17:17   ` Nigel Croxon
2017-07-28 13:50     ` Nigel Croxon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.