linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm fails to assemble arrays with quotes in name
@ 2013-05-06 17:34 Marek Becka
  2013-05-09  5:14 ` NeilBrown
  2013-05-13  1:34 ` NeilBrown
  0 siblings, 2 replies; 4+ messages in thread
From: Marek Becka @ 2013-05-06 17:34 UTC (permalink / raw)
  To: linux-raid

Hi,

By accident I have created an array with simple quotes in name:

mdadm --assemble /dev/md0 --name=\'newname\':0 --update=name /dev/sdb1 
/dev/sdd1

My mdadm.conf contains following line:

ARRAY /dev/md/0 metadata=1.2 UUID=0324aa8b:e17efd1a:bae27dd0:66fc7573 
name='newname':0

Mdadm fails to assemble this array. After removing the name from 
mdadm.conf, everything works fine.

mdadm  --assemble --scan -v 2>&1 | grep sd[bd]1
mdadm: no RAID superblock on /dev/sdd1
mdadm: no RAID superblock on /dev/sdb1
mdadm: /dev/sdd1 has wrong uuid.
mdadm: /dev/sdb1 has wrong uuid.
mdadm: /dev/sdd1 has wrong name.
mdadm: /dev/sdb1 has wrong name.

I'm using mdadm - v3.2.5 - 18th May 2012 and kernel version 3.4.35. The 
superblock contains:

mdadm  --examine /dev/sdb1
/dev/sdb1:
           Magic : a92b4efc
         Version : 1.2
     Feature Map : 0x0
      Array UUID : 0324aa8b:e17efd1a:bae27dd0:66fc7573
            Name : 'newname':0
   Creation Time : Thu Apr 11 17:54:28 2013
      Raid Level : raid1
    Raid Devices : 2

  Avail Dev Size : 2097128 (1024.16 MiB 1073.73 MB)
      Array Size : 1048564 (1024.16 MiB 1073.73 MB)
     Data Offset : 24 sectors
    Super Offset : 8 sectors
           State : clean
     Device UUID : e9094b42:d1f2e7e4:71b7a626:77e008aa

     Update Time : Sat Apr 13 00:53:27 2013
        Checksum : afddd58 - correct
          Events : 36


    Device Role : Active device 0
    Array State : AA ('A' == active, '.' == missing)

mdadm  --examine /dev/sdd1
/dev/sdd1:
           Magic : a92b4efc
         Version : 1.2
     Feature Map : 0x0
      Array UUID : 0324aa8b:e17efd1a:bae27dd0:66fc7573
            Name : 'newname':0
   Creation Time : Thu Apr 11 17:54:28 2013
      Raid Level : raid1
    Raid Devices : 2

  Avail Dev Size : 2097128 (1024.16 MiB 1073.73 MB)
      Array Size : 1048564 (1024.16 MiB 1073.73 MB)
     Data Offset : 24 sectors
    Super Offset : 8 sectors
           State : clean
     Device UUID : a841cc4e:b37b0765:70225714:71c65fdd

     Update Time : Sat Apr 13 00:53:27 2013
        Checksum : b8a5eef2 - correct
          Events : 36


    Device Role : Active device 1
    Array State : AA ('A' == active, '.' == missing)


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

* Re: mdadm fails to assemble arrays with quotes in name
  2013-05-06 17:34 mdadm fails to assemble arrays with quotes in name Marek Becka
@ 2013-05-09  5:14 ` NeilBrown
  2013-05-09 15:47   ` Marek Becka
  2013-05-13  1:34 ` NeilBrown
  1 sibling, 1 reply; 4+ messages in thread
From: NeilBrown @ 2013-05-09  5:14 UTC (permalink / raw)
  To: Marek Becka; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 2885 bytes --]

On Mon, 06 May 2013 19:34:35 +0200 Marek Becka <marek.becka@superhosting.cz>
wrote:

> Hi,
> 
> By accident I have created an array with simple quotes in name:
> 
> mdadm --assemble /dev/md0 --name=\'newname\':0 --update=name /dev/sdb1 
> /dev/sdd1
> 
> My mdadm.conf contains following line:
> 
> ARRAY /dev/md/0 metadata=1.2 UUID=0324aa8b:e17efd1a:bae27dd0:66fc7573 
> name='newname':0

Try:
   ..... name="'newname':-"

That should work.  Quotes are special.

I should probably update the mdadm.conf manpage to mention that.

NeilBrown


> 
> Mdadm fails to assemble this array. After removing the name from 
> mdadm.conf, everything works fine.
> 
> mdadm  --assemble --scan -v 2>&1 | grep sd[bd]1
> mdadm: no RAID superblock on /dev/sdd1
> mdadm: no RAID superblock on /dev/sdb1
> mdadm: /dev/sdd1 has wrong uuid.
> mdadm: /dev/sdb1 has wrong uuid.
> mdadm: /dev/sdd1 has wrong name.
> mdadm: /dev/sdb1 has wrong name.
> 
> I'm using mdadm - v3.2.5 - 18th May 2012 and kernel version 3.4.35. The 
> superblock contains:
> 
> mdadm  --examine /dev/sdb1
> /dev/sdb1:
>            Magic : a92b4efc
>          Version : 1.2
>      Feature Map : 0x0
>       Array UUID : 0324aa8b:e17efd1a:bae27dd0:66fc7573
>             Name : 'newname':0
>    Creation Time : Thu Apr 11 17:54:28 2013
>       Raid Level : raid1
>     Raid Devices : 2
> 
>   Avail Dev Size : 2097128 (1024.16 MiB 1073.73 MB)
>       Array Size : 1048564 (1024.16 MiB 1073.73 MB)
>      Data Offset : 24 sectors
>     Super Offset : 8 sectors
>            State : clean
>      Device UUID : e9094b42:d1f2e7e4:71b7a626:77e008aa
> 
>      Update Time : Sat Apr 13 00:53:27 2013
>         Checksum : afddd58 - correct
>           Events : 36
> 
> 
>     Device Role : Active device 0
>     Array State : AA ('A' == active, '.' == missing)
> 
> mdadm  --examine /dev/sdd1
> /dev/sdd1:
>            Magic : a92b4efc
>          Version : 1.2
>      Feature Map : 0x0
>       Array UUID : 0324aa8b:e17efd1a:bae27dd0:66fc7573
>             Name : 'newname':0
>    Creation Time : Thu Apr 11 17:54:28 2013
>       Raid Level : raid1
>     Raid Devices : 2
> 
>   Avail Dev Size : 2097128 (1024.16 MiB 1073.73 MB)
>       Array Size : 1048564 (1024.16 MiB 1073.73 MB)
>      Data Offset : 24 sectors
>     Super Offset : 8 sectors
>            State : clean
>      Device UUID : a841cc4e:b37b0765:70225714:71c65fdd
> 
>      Update Time : Sat Apr 13 00:53:27 2013
>         Checksum : b8a5eef2 - correct
>           Events : 36
> 
> 
>     Device Role : Active device 1
>     Array State : AA ('A' == active, '.' == missing)
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

* Re: mdadm fails to assemble arrays with quotes in name
  2013-05-09  5:14 ` NeilBrown
@ 2013-05-09 15:47   ` Marek Becka
  0 siblings, 0 replies; 4+ messages in thread
From: Marek Becka @ 2013-05-09 15:47 UTC (permalink / raw)
  To: linux-raid

On 05/09/2013 07:14 AM, NeilBrown wrote:
> Try:
>     ..... name="'newname':-"
>
> That should work.  Quotes are special.
Yes, this works fine.

> I should probably update the mdadm.conf manpage to mention that.
>
> NeilBrown
I think, that an output from `mdadm  --detail --scan` and `mkconf` 
should also be updated to generate correct name parameters for this case.

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

* Re: mdadm fails to assemble arrays with quotes in name
  2013-05-06 17:34 mdadm fails to assemble arrays with quotes in name Marek Becka
  2013-05-09  5:14 ` NeilBrown
@ 2013-05-13  1:34 ` NeilBrown
  1 sibling, 0 replies; 4+ messages in thread
From: NeilBrown @ 2013-05-13  1:34 UTC (permalink / raw)
  To: Marek Becka; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1101 bytes --]

On Mon, 06 May 2013 19:34:35 +0200 Marek Becka <marek.becka@superhosting.cz>
wrote:

> Hi,
> 
> By accident I have created an array with simple quotes in name:
> 
> mdadm --assemble /dev/md0 --name=\'newname\':0 --update=name /dev/sdb1 
> /dev/sdd1
> 
> My mdadm.conf contains following line:
> 
> ARRAY /dev/md/0 metadata=1.2 UUID=0324aa8b:e17efd1a:bae27dd0:66fc7573 
> name='newname':0
> 
> Mdadm fails to assemble this array. After removing the name from 
> mdadm.conf, everything works fine.
> 
> mdadm  --assemble --scan -v 2>&1 | grep sd[bd]1
> mdadm: no RAID superblock on /dev/sdd1
> mdadm: no RAID superblock on /dev/sdb1
> mdadm: /dev/sdd1 has wrong uuid.
> mdadm: /dev/sdb1 has wrong uuid.
> mdadm: /dev/sdd1 has wrong name.
> mdadm: /dev/sdb1 has wrong name.
> 
> I'm using mdadm - v3.2.5 - 18th May 2012 and kernel version 3.4.35. The 

mdadm-3.2.6 will quote the quotes in --detail --brief and  --examine --brief
output, so this issue is already address in the latest mdadm.
Next release will mention quotes in the mdadm.conf documentation.

NeilBrown


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

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

end of thread, other threads:[~2013-05-13  1:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-05-06 17:34 mdadm fails to assemble arrays with quotes in name Marek Becka
2013-05-09  5:14 ` NeilBrown
2013-05-09 15:47   ` Marek Becka
2013-05-13  1:34 ` NeilBrown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).