Re: [PATCH] mdadm: load default sysfs attributes after assemblation

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

 



>>>>> "Mariusz" == Mariusz Dabrowski <mariusz.dabrowski@xxxxxxxxx> writes:

Mariusz> Added new type of line to mdadm.conf which allows to specify
Mariusz> values of sysfs attributes for MD devices that should be
Mariusz> loaded after assemblation.  Each line is interpreted as list
Mariusz> of structures containing sysname of MD device (md126 etc.)
Mariusz> and list of sysfs attributes and their values.

So what does this buy us?  Looking at your example, you hard code
devices to a raid name, but also include a UUID setting.  Don't you
think that's a bad idea?  


 
Mariusz> +.TP
Mariusz> +.B SYSFS
Mariusz> +The SYSFS line lists custom values of MD device's sysfs attributes which will be
Mariusz> +stored in sysfs after assemblation. Multiple lines are allowed and each line has

This should be "after assembly." Or maybe "after the array is
assembled." instead.  

Mariusz> +to contain uuid or name of the device to which it relates.

... "contain the uuid" ...

Mariusz> +.RS 4
Mariusz> +.TP
Mariusz> +.B uuid=
Mariusz> +hexadecimal identifier of MD device. This must match the uuid stored in the
Mariusz> +superblock.
Mariusz> +.TP
Mariusz> +.B name=
Mariusz> +name of the MD device as was given to
Mariusz> +.I mdadm
Mariusz> +when the array was created. It will be ignored if
Mariusz> +.B uuid
Mariusz> +is not empty.
Mariusz> +.TP
Mariusz> +.RS 7
Mariusz> +
Mariusz>  .SH EXAMPLE
Mariusz>  DEVICE /dev/sd[bcdjkl]1
Mariusz>  .br
Mariusz> @@ -657,6 +677,11 @@ CREATE group=system mode=0640 auto=part\-8
Mariusz>  HOMEHOST <system>
Mariusz>  .br
Mariusz>  AUTO +1.x homehost \-all
Mariusz> +.br
Mariusz> +SYSFS name=/dev/md/raid5 group_thread_cnt=4 sync_speed_max=1000000
Mariusz> +.br
Mariusz> +SYSFS uuid=bead5eb6:31c17a27:da120ba2:7dfda40d group_thread_cnt=4
Mariusz> +sync_speed_max=1000000

So according to the docs above, since you have a SYSFS uuid=... entry,
won't the name be ignored?

Also, it's not clear if the case of these SYSFS atttribures matters or
not.  I'd *hope* they don't, because I can see people putting in

 "SYSFS UUID=... "

Just like the regular ARRAY /dev/md3 UUID=... stuff in mdadm.conf
already.

Cheers,
John





[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux