Is there a known reliable workaround? I have tried running dasdfmt in a script 
right after chccwdev and run into the non-existent device problem. So I tried 
putting a loop after chccwdev waiting for the device to appear in /dev, like 
this:

while [[ ! -b $dev ]] ; do
      sleep 0.1
done

and then ran dasdfmt. That works most of the time, but still isn't reliable 
enough, especially on slow systems I get the occasional 

"DASD format failed: dasdfmt: (format cylinder) IOCTL BIODASDFMT failed. 
(Input/output error)"

I know it is possible to rerun the dasdfmt, or whatever command follows the 
chccwdev, but it would be much nicer to have some indicator that the device is 
really ready. Then I could just write a wrapper around chccwdev and forget 
about this problem. 

Thanks,

Tomas

-----Original Message-----
From: Linux on 390 Port [mailto:[email protected]] On Behalf Of Florian 
Bilek
Sent: Friday, July 27, 2012 6:28 AM
To: [email protected]
Subject: Re: Synchronous option for chccwdev -- was there a resolution?

Hi David,

Thank you for bringing up this topic again. No, unfortunately there was no 
other solution than to rerun the commands.

I think there should be an option for chccwdev to wait till DE/CE is received 
and not to terminate with device busy.

Kind regards,
Florian

On Thu, Jul 26, 2012 at 6:52 PM, David Boyes <[email protected]> wrote:

> A week or two back, someone (I think it was Florian Bilek) asked why 
> there was a delay between invoking chccwdev and the device becoming 
> available, and whether there was an option or command that would exit 
> only when the device was actually available. There was some discussion 
> of the --settle option in udev, but I don't recall seeing a resolution 
> other than "loop on (test for device availability;sleep a few seconds) 
> repeat".
>
> Was there a better solution? If not, could the IBM developers add a 
> --sync option to chccwdev that forces chccwdev to wait until the 
> requested operation is actually completed before exiting?
>
> ----------------------------------------------------------------------
> 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/

Reply via email to