From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <28e996611ff301dc74613f18ef47bbce@coraid.com> From: erik quanstrom Date: Fri, 4 May 2007 22:19:05 -0400 To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] devsd & media changed errors Topicbox-Message-UUID: 59f42232-ead2-11e9-9d60-3106f5b1d025 when a disk or a cdrom reports that it has 0 sectors devsd won't let you write to the control file. it gives write error: media or partition has changed. this is because sdinitpart increments the partition vers each time it is called and it's called in many places when the number of sectors is zero. there are a couple of senerios where this is a pain. first, if you have a blank cdrom in the tray, you can't echo dma on>/dev/sdXX/ctl worse, if i have a drive that sometimes needs to be reset manually. (some sata drives have loopy firmware.) i can't echo reset>/dev/sdE5/ctl to fix it. (one could abuse /dev/sdctl to do this, but then you've reinvented the problem of figuring out which device is the intended target of the request.) am i missing something here or is this a real devsd problem? without knowing a whole lot about devsd, i would think that the devsd should allow writes to the control file even when sectors == 0. perhaps letting -1 sectors be the sentinal value would be enough. - erik