Hi Tomas,
Did you catch this line in my other reply?
# Set them to readonly if linked R/O
ACTION=="add", SUBSYSTEM=="ccw", DRIVER=="dasd-eckd", PROGRAM="/bin/sh -c
'/sbin/modprobe vmcp;/sbin/vmcp q v dasd|grep ${DEVPATH##*.}|grep -q R/O'",
ATTR{readonly}="1"
Again...make sure it's all on one line.
Leland
On 2/13/2013 1:31 AM, Pavelka, Tomas wrote:
> Will your solution preserve read only attributes? I.e. if you bring all dasd
> online with a single udev rule, will those linked as read only have the
> correct read only attributes so the kernel knows that it cannot write to them?
>
> Example of what I mean by correct read only attributes:
>
>> vmcp q v dasd
> DASD 0200 3390 VMBL1V R/W 353 CYL ON DASD 8460 SUBCHANNEL = 0001
> DASD 0201 3390 VMBL1J R/O 683 CYL ON DASD 845C SUBCHANNEL = 0002
>
>> lsdasd
> Bus-ID Status Name Device Type BlkSz Size Blocks
> ==============================================================================
> 0.0.0200 active dasda 94:0 ECKD 4096 248MB 63540
> 0.0.0201 active(ro) dasdb 94:4 ECKD 4096 480MB 122940
>
> We have ran into the same problem you are describing and ended up making
> individual rules for each dasd (e.g.
> /etc/udev/rules.d/51-dasd-0.0.0200.rules) to preserve read only attributes.
> But we are new to SUSE and haven't experimented with a single rule for all
> dasd which is why I am curious.
>
> Tomas
>
> ----------------------------------------------------------------------
> For LINUX-390 subscribe / signoff / archive access instructions,
> send email to [email protected] with the message: INFO LINUX-390 or visit
> http://www.marist.edu/htbin/wlvindex?LINUX-390
> ----------------------------------------------------------------------
> For more information on Linux on System z, visit
> http://wiki.linuxvm.org/
>
----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390
----------------------------------------------------------------------
For more information on Linux on System z, visit
http://wiki.linuxvm.org/