On 11/09/2009 03:41 PM, Steffen Maier wrote: > On 11/07/2009 12:38 AM, David Cantrell wrote: >> On s390, if you had a single DASD that needed dasdfmt run, you would get >> a ZeroDivisionError traceback because the self._totalCylinders value was >> zero. The problem was caused by the DASD.totalCylinders property and >> how it initialized. It would initialize itself on the first call, but >> since we'd already fired off a dasdfmt process for the device, the one >> running to capture the cylinder count couldn't get access to the device. >> >> Users with more than one DASD needing a dasdfmt would not see the >> traceback, but would have an incorrect total cylinder count, so 100% >> would be reached when n-1 devices had been formatted. >> Lastly, in certain instances, the status for the DASD could be "basic" >> rather than "unformatted", so treat those the same and perform a >> dasdfmt. > > Only DASDs with status "unformatted" are eligible for low-level > formatting. Otherwise we risk formatting disks that are already > formatted and thus risk data loss. The reason is that the status > attribute shows the current state of a transition through different > states during device bringup. > > An already formatted DASD shows the following state transition: > 'unkown new detected basic ready online (*)' > > An unformatted DASD shows roughly the following state transition: > 'unknown new detected basic unformatted (*)' > On running dasdfmt, the transition continues as follows: > 'basic ready online' > > (*) is the spot your code should find the DASDs in. I suppose you only > saw the 'basic' state because the already running dasdfmt on that > particular DASD had set its state from 'unformatted' back to 'basic' > which is a preparation it does before formatting. If still DASDs appear > in state 'basic', we have to look at it again from a different > perspective. When dasd.py accesses DASD sysfs attributes, the DASDs > should have long gone into either state 'online' or 'unformatted' since > the onlining and detection has happened long enough before in linuxrc.s390. David, I still see the check for "basic" in the rhel6-branch from commit43db7a8b4374a0728a91a8aab260253ccfc7a5a0. Can you please remove the check and only compare for "unformatted"? In master it is correct, although that seems because this commit was only applied to rhel6-branch. Steffen Linux on System z Development IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list