Hi Leland, I did, I'm just far away timezone-wise ;-) It did not occur to me that you can do tests in udev rules. What we ended up doing was access the file system before IPLing the Linux and dropping in the individual dasd rules. We did this because we were already accessing the fs for other tasks and because we knew in advance what should be R/O and what RW. But your way is useful when you cannot afford to access the fs before every IPL.
Thanks, Tomas -----Original Message----- From: Linux on 390 Port [mailto:LINUX-390@VM.MARIST.EDU] On Behalf Of Leland Lucius Sent: Thursday, February 14, 2013 1:58 AM To: LINUX-390@VM.MARIST.EDU Subject: Re: Using dasd_configure in SLES11 SP2 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 lists...@vm.marist.edu 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 lists...@vm.marist.edu 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 lists...@vm.marist.edu 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/