Re: BD-RE mount problem
On 10/08/12 01:50 AM, Thomas Schmitt wrote: Hi, fd = open(/dev/sr0, O_RDWR); root@transponder:/home/garydale# ./open_sr0 open: fd= -1 , errno= 30 open: Read-only file system This is surprising, because xorriso uses open(..., O_RDWR | O_NDELAY); when it acquires a drive. (I would have expected to see the error with write(), which xorriso does not use.) Whay happens if you change the test program -fd = open(/dev/sr0, O_RDWR); +fd = open(/dev/sr0, O_RDWR | O_NDELAY); compile it, and run again as superuser ? Whatever, a BD-RE device with rw-permission on its device file should not throw this error. We need kernel expertise to find out what happens here. Is anybody at debian-user able to give advise or propose experiments which shed light on the problem ? root@transponder:/home/garydale# ./open_sr0 open: fd= 3 , errno= 0 write: ret= 2048 , errno= 0 No one in Debian user has been able to shed any light on the problem. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5024ccbf.3010...@rogers.com
Re: BD-RE mount problem
Hi, -fd = open(/dev/sr0, O_RDWR); +fd = open(/dev/sr0, O_RDWR | O_NDELAY); open: fd= 3 , errno= 0 write: ret= 2048 , errno= 0 This explains why xorriso or dvd+rw-format can open the drive device file. (The failure to re-format is a different problem.) No one in Debian user has been able to shed any light on the problem. I am not a kernel hacker, but rather a self-proclaimed expert for optical drives and ISO 9660. My best guess is that the kernel believes the medium is read-only (like BD-ROM) and thus refuses any attempt to use it for writing via the normal POSIX system interface. But i do not know how to inquire the kernel's view on the medium. The drive sees a BD-RE and has no scruples to write data to it. But the kernel seems to see a problem with writing. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/24165612497463144...@scdbackup.webframe.org
Re: BD-RE mount problem
On 10/08/12 05:23 AM, Thomas Schmitt wrote: Hi, -fd = open(/dev/sr0, O_RDWR); +fd = open(/dev/sr0, O_RDWR | O_NDELAY); open: fd= 3 , errno= 0 write: ret= 2048 , errno= 0 This explains why xorriso or dvd+rw-format can open the drive device file. (The failure to re-format is a different problem.) No one in Debian user has been able to shed any light on the problem. I am not a kernel hacker, but rather a self-proclaimed expert for optical drives and ISO 9660. My best guess is that the kernel believes the medium is read-only (like BD-ROM) and thus refuses any attempt to use it for writing via the normal POSIX system interface. But i do not know how to inquire the kernel's view on the medium. The drive sees a BD-RE and has no scruples to write data to it. But the kernel seems to see a problem with writing. Thanks Thomas. I'm wondering if the problem is the iso9660 file system that K3B put onto the disc? That would make the medium read-only so far as normal file I/O is concerned. Perhaps when faced with read-only media, the kernel simply assumes that the device itself is read-only. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5024d5e9.4090...@rogers.com
Re: BD-RE mount problem
Hi, I'm wondering if the problem is the iso9660 file system that K3B put onto the disc? I seriously doubt. At least dd should have no scruples to overwrite any filesystem. The block device driver has no idea of filesystems. The only connection would be open(2) flag O_EXCL. mount uses it to tell others that the drive is in use. To learn about it, the other program would have to use O_EXCL, too, But open_sr0.c does not do that and even if so, then it would cause error 16 EBUSY rather than 30 EROFS. The problem seems to be in the way how the kernel perceives the drive or the medium. Perhaps when faced with read-only media, the kernel simply assumes that the device itself is read-only. That would be an expensive one-way-road for re-usable media. Drive and medium appear as one thing to the software which controls the drive. The medium type is expressed by the SCSI profile number. This is not exactly a medium type identifier but a promise that the drive can perform certain actions on the loaded medium. In a write-capable drive a BD-RE should cause profile 0x43. In a read-only drive, a BD-RE might well appear as 0x40 BD-ROM. But we know from dvd+rw-format and xorriso that the drive reports profile 0x43 = BD-RE and that one can write data onto the medium. So for some reason the kernel (actually the block device driver) seems to get it wrong. Well, maybe the refusal has other reasons. One approach would be to debug the kernel: insert printk() and compile and reboot. Multiple times. It would be tricky to do this in a virtual machine, but not impossible. See http://libburnia-project.org/wiki/QemuXorriso I recently did a similar try-and-error research on Debian squeeze in order to find out why Linux would not mount the HFS+ aspect of a xorriso hybrid image. (It turned out that the kernel has hardcoded APM block size 512, whereas xorriso used 2048 by default.) To my luck, i could use qemu for the development cycles. This is not a task where i can help from remote. One would have to find the occasions where error 30 (EROFS) is emitted during the course of open(2). Each of them would have to be equipped by printk() which puts text into the system log (dmesg, /var/log/messages, ...). Then you try from userspace to open(/dev/sr0, O_RDWR); and look in the log for messages from your printk(). Theories will emerge and fail. If you are lucky then you find out enough to revert the system change that has hit you. (Obviously something must have triggered the change in behavior.) Or you can send a request for help to Linux Kernel Mailing List, which is a rough territory if one is not well prepared. Especially since Debian kernels are usually not the newest ones. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/12645612483761152...@scdbackup.webframe.org
Re: BD-RE mount problem
Hi, i can reproduce the symptoms by a read-only situation of drive and media. (It should not happen with BD-RE in a BD writer, of course.) open_sr0.c with O_NDELAY yielded: open: fd= 3 , errno= 0 write: ret= 2048 , errno= 0 I get the same behavior when i put a DVD into a DVD-ROM drive. It allows me to dump my data into a black hole and reports no error to the userspace program. In /var/log/messages i find sr 6:0:0:0: [sr1] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sr 6:0:0:0: [sr1] Sense Key : Illegal Request [current] sr 6:0:0:0: [sr1] Add. Sense: Invalid command operation code sr 6:0:0:0: [sr1] CDB: Write(10): 2a 00 00 00 00 00 00 00 01 00 lost page write due to I/O error on sr1 Looks like an old kernel bug resp. unwanted way to silently shoot your own foot. It happens too with 8 subsequent write() calls with sleep(1) inbetween. No delayed error is returned. --- I dug out the reason why libburn (underneath xorriso) uses O_NDELAY when it opens the drive device file. A note to myself in libburn/sg-linux.c: O_NONBLOCK is prescribed by linux/cdrom.h Switched to O_NDELAY for LKML statement 2007/4/11/141 by Alan Cox: open() has side effects. The CD layer allows you to open with O_NDELAY if you want to avoid them. In Debian squeeze's /usr/include/linux/cdrom.h: * Additionally, as of Linux 2.1.x, all Linux application programs * should use the O_NONBLOCK option when opening a CD-ROM device * for subsequent ioctl commands. This allows for neat system errors * like No medium found or Wrong medium type upon attempting to * mount or play an empty slot, mount an audio disc, or play a data disc. This explains why open() does not fail with O_NDELAY (= O_NOBLOCK): For ioctl(SG_IO) one needs w-permission. So it must tolerate O_RDWR | O_NDELAY But why does not write(2) fail afterwards ? Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/14098612380822626...@scdbackup.webframe.org
Re: BD-RE mount problem
On 10/08/12 10:33 AM, Thomas Schmitt wrote: Hi, i can reproduce the symptoms by a read-only situation of drive and media. (It should not happen with BD-RE in a BD writer, of course.) open_sr0.c with O_NDELAY yielded: open: fd= 3 , errno= 0 write: ret= 2048 , errno= 0 I get the same behavior when i put a DVD into a DVD-ROM drive. It allows me to dump my data into a black hole and reports no error to the userspace program. In /var/log/messages i find sr 6:0:0:0: [sr1] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sr 6:0:0:0: [sr1] Sense Key : Illegal Request [current] sr 6:0:0:0: [sr1] Add. Sense: Invalid command operation code sr 6:0:0:0: [sr1] CDB: Write(10): 2a 00 00 00 00 00 00 00 01 00 lost page write due to I/O error on sr1 Looks like an old kernel bug resp. unwanted way to silently shoot your own foot. It happens too with 8 subsequent write() calls with sleep(1) inbetween. No delayed error is returned. --- I dug out the reason why libburn (underneath xorriso) uses O_NDELAY when it opens the drive device file. A note to myself in libburn/sg-linux.c: O_NONBLOCK is prescribed bylinux/cdrom.h Switched to O_NDELAY for LKML statement 2007/4/11/141 by Alan Cox: open() has side effects. The CD layer allows you to open with O_NDELAY if you want to avoid them. In Debian squeeze's /usr/include/linux/cdrom.h: * Additionally, as of Linux 2.1.x, all Linux application programs * should use the O_NONBLOCK option when opening a CD-ROM device * for subsequent ioctl commands. This allows for neat system errors * like No medium found or Wrong medium type upon attempting to * mount or play an empty slot, mount an audio disc, or play a data disc. This explains why open() does not fail with O_NDELAY (= O_NOBLOCK): For ioctl(SG_IO) one needs w-permission. So it must tolerate O_RDWR | O_NDELAY But why does not write(2) fail afterwards ? Have a nice day :) Thomas I did try this when booting from System Rescue CD (sub stick) as well. I get the same results. I'm hoping to get another system up and running next week that also has a BluRay writer. I'll give that a try too. Thanks. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/50253af7.7080...@rogers.com
Re: BD-RE mount problem
On 10/08/12 12:46 PM, Gary Dale wrote: On 10/08/12 10:33 AM, Thomas Schmitt wrote: Hi, i can reproduce the symptoms by a read-only situation of drive and media. (It should not happen with BD-RE in a BD writer, of course.) open_sr0.c with O_NDELAY yielded: open: fd= 3 , errno= 0 write: ret= 2048 , errno= 0 I get the same behavior when i put a DVD into a DVD-ROM drive. It allows me to dump my data into a black hole and reports no error to the userspace program. In /var/log/messages i find sr 6:0:0:0: [sr1] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE sr 6:0:0:0: [sr1] Sense Key : Illegal Request [current] sr 6:0:0:0: [sr1] Add. Sense: Invalid command operation code sr 6:0:0:0: [sr1] CDB: Write(10): 2a 00 00 00 00 00 00 00 01 00 lost page write due to I/O error on sr1 Looks like an old kernel bug resp. unwanted way to silently shoot your own foot. It happens too with 8 subsequent write() calls with sleep(1) inbetween. No delayed error is returned. --- I dug out the reason why libburn (underneath xorriso) uses O_NDELAY when it opens the drive device file. A note to myself in libburn/sg-linux.c: O_NONBLOCK is prescribed bylinux/cdrom.h Switched to O_NDELAY for LKML statement 2007/4/11/141 by Alan Cox: open() has side effects. The CD layer allows you to open with O_NDELAY if you want to avoid them. In Debian squeeze's /usr/include/linux/cdrom.h: * Additionally, as of Linux 2.1.x, all Linux application programs * should use the O_NONBLOCK option when opening a CD-ROM device * for subsequent ioctl commands. This allows for neat system errors * like No medium found or Wrong medium type upon attempting to * mount or play an empty slot, mount an audio disc, or play a data disc. This explains why open() does not fail with O_NDELAY (= O_NOBLOCK): For ioctl(SG_IO) one needs w-permission. So it must tolerate O_RDWR | O_NDELAY But why does not write(2) fail afterwards ? Have a nice day :) Thomas I did try this when booting from System Rescue CD (sub stick) as well. I get the same results. I'm hoping to get another system up and running next week that also has a BluRay writer. I'll give that a try too. Thanks. I did another test using system rescue cd. While it gives me the same error when I run dvd+rw-format, I note that mkudffs complains about multiple extents. I don't know why it gives a different message under system rescue cd than under Debian/Wheezy but I thought it might be a clue as to what the problem is. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/50255809.3020...@rogers.com
Re: BD-RE mount problem
Hi, I did another test using system rescue cd. While it gives me the same error when I run dvd+rw-format, I note that mkudffs complains about multiple extents. I don't know why it gives a different message under system rescue cd than under Debian/Wheezy but I thought it might be a clue as to what the problem is. What do you get from a plain write attempt: dd if=/dev/zero of=/dev/sr0 bs=2048 count=1 Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/8757612425536751...@scdbackup.webframe.org
Re: BD-RE mount problem
On Mon, Aug 06, 2012 at 11:51:36PM -0400, Gary Dale wrote: I'm using Memorex BD-RE 2x discs. I've used an LG, ASUS and Pioneer BluRay writer - the first two on the older machine. The ASUS and Pioneer are brand new writers. Any ideas? Have you tried different media? Also a quick google shows that you might get some help on the cdwrite list: http://lists.debian.org/cdwrite/ -- If you're not careful, the newspapers will have you hating the people who are being oppressed, and loving the people who are doing the oppressing. --- Malcolm X -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20120809141202.GF2687@tal
Re: BD-RE mount problem
[Ccing cdwr...@other.debian.org] Any ideas? On Tue, Aug 07, 2012 at 03:49:13PM -0400, Gary Dale wrote: On 06/08/12 11:51 PM, Gary Dale wrote: I've been using BD-RE discs for backups on a Debian/Squeeze server for a couple of years now. In the last week or so the backups have been failing. I haven't modified my backup script so I thought about possible hardware issues. - I tried changing the BluRay writer but got the same problem. - I tried new discs but got the same problem. - I tried replacing the PCI-SATA controller that the machine needed for the BluRay writer, but still got the same problem. - the discs do formate correctly when I try dvd+rw-format -force=full /dev/sr0 Finally, I tried an entirely different machine with a different model of BluRay writer and I'm still getting the same problem. This new machine has a different architecture (AMD64) and is running Debian/Wheezy. Why am I getting the same problem? I tried a new disc again, and this time formatted it through K3B instead of using dvd+rw-format directly. It appeared to format correctly - and no longer shows as an empty BD-RE disc when I insert it - but still wouldn't mount. All the mount attempts give exactly the same result: # mount /media/dvd mount: block device /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so The /etc/fstab entry is the same between the two machines: /dev/sr0/media/dvd udf user 0 0 I'm using Memorex BD-RE 2x discs. I've used an LG, ASUS and Pioneer BluRay writer - the first two on the older machine. The ASUS and Pioneer are brand new writers. Any ideas? Further to above, I did a file copy using K3B onto one of the BD-RE discs that won't mount. K3B appeared to recognize that there was a udf file system on the disc. After it finished, it automounted as /media/cdrom0 with fs type iso9660. However, I could also mount it as /media/dvd. Switching to root, I was also able to mount it using mount -t udf /dev/sr0 /media/dvd Running mount shows that it is mounted as a udf file system. However, I can't mount it -rw. It insists that the file system is read-only. Also, I booted my computer from a USB key containing system rescue CD. Again, the mount fails. Here's a sequence I just tried: root@transponder:/home/garydale# mkudffs /dev/sr0 Error opening device: Read-only file system root@transponder:/home/garydale# mount /media/dvd mount: block device /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so root@transponder:/home/garydale# mount /media/cdrom0 mount: block device /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so Afterward, I started up k3B and tried tools | format. The format dialog has a pulldown for the media which shows Complete Data BD-RE. It wouldn't do a format - said it didn't need to do one - unless I do a force, which I decided against. I was able to burn a data project, after which the BluRay disc automounts as /media/cdrom0 again. The mount command (no options) shows it as: /dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,noexec,relatime) I can also mount it as /media/dvd, where the mount command shows it mounted as: /dev/sr0 on /media/dvd type udf (ro,nosuid,nodev,noexec,relatime,utf8) Trying to format the disk using dvd+rw-format is now giving me: root@transponder:/home/garydale# dvd+rw-format -force=full /dev/sr0 * BD/DVD±RW/-RAM format utility by ap...@fy.chalmers.se, version 7.1. * 24.2GB BD media detected. * formatting .:-[ FORMAT UNIT failed with SK=5h/INVALID FIELD IN PARAMETER LIST]: Input/output error I get the same if I try to -blank or -format as well. And of course, the device shows as 100% full under df, since it seems to really be an iso9660 formatted disc. Here's the dvd+rw-mediainfo: root@transponder:/home/garydale# dvd+rw-mediainfo /dev/sr0 INQUIRY:[PIONEER ][BD-RW BDR-207D][1.10] GET [CURRENT] CONFIGURATION: Mounted Media: 43h, BD-RE Media ID: RITEK/BW1 Current Write Speed: 2.0x4495=8990KB/s Write Speed #0:2.0x4495=8990KB/s Speed Descriptor#0:00/11826175 R@2.0x4495=8990KB/s W@2.0x4495=8990KB/s READ DISC INFORMATION: Disc status: complete Number of Sessions:1 State of Last Session: complete Number of Tracks: 1 READ
Re: BD-RE mount problem
Hi, [i am subscribed to cdwr...@other.debian.org, not to debian-user] I tried a new disc again, and this time formatted it through K3B instead of using dvd+rw-format directly. I don't know what K3B does as formatting, but dvd+rw-format does only a hardware level formatting. It does not create a filesystem. Further to above, I did a file copy using K3B onto one of the BD-RE discs that won't mount. K3B appeared to recognize that there was a udf file system on the disc. I would rather expect that it created one around the files which you told it to copy. After it finished, it automounted as /media/cdrom0 with fs type iso9660. So it is probably an ISO 9660/UDF hybrid filesystem created by mkisofs (which was started under the control of K3B). However, I can't mount it -rw. It insists that the file system is read-only. This is not the variant of UDf which you want. You want a read-write filesystem. root@transponder:/home/garydale# mkudffs /dev/sr0 Error opening device: Read-only file system This should have worked. Do you have no w-permission to /dev/sr0 ? I just exercised with success: mkudffs /dev/sr1 mount /dev/sr1 /mnt cp /some/dir /mnt umount /mnt Hardware: INQUIRY:[HL-DT-ST][BD-RE GGW-H20L ][YL03] Mounted Media: 43h, BD-RE Media ID: VERBAT/IM0 (Not that i ever would do that for backup. The umount time alone gives me creeps. No chance to get full write speed. Arrrgh !!! I use my own ISO 9660 multi-session tool xorriso for backups.) root@transponder:/home/garydale# dvd+rw-format -force=full /dev/sr0 * BD/DVD±RW/-RAM format utility by ap...@fy.chalmers.se, version 7.1. * 24.2GB BD media detected. * formatting .:-[ FORMAT UNIT failed with SK=5h/INVALID FIELD IN PARAMETER LIST]: Input/output error It would be interesting to see what paramaters the program sent with the FORMAT UNIT command. According to the source code it would be Format Type 0x30 with sub-type 2. This should not cause an error. Here's the dvd+rw-mediainfo: root@transponder:/home/garydale# dvd+rw-mediainfo /dev/sr0 READ FORMAT CAPACITIES: formatted: 11826176*2048=24220008448 Well, it is already formatted. That should suffice for a whole media life. The problem is to get mkudffs to work. Maybe it is reluctant to overwrite a valid ISO 9660 or UDF on the medium ? Try to overwrite it by brute force umount /dev/sr0 dd if=/dev/zero of=/dev/sr0 bs=2048 count=1024 mkudffs /dev/sr0 If 1024 blocks of 0s is not enough, then try to flood the whole medium dd if=/dev/zero of=/dev/sr0 bs=2048 count=11826176 Any ideas anyone? You could use sequential burn programs like growisofs or xorriso. Both can add files to ISO 9660 filesystems on BD-RE. Those filesystems are mountable read-only. If you canafford to have the medium only readable on Linux, then you could try to format it by mkfs -t ext2. But that might reduce the lifetime of your BD-RE by overwriting the same blocks frequently. Actually your mkudffs approach should just work (with all its advantages and drawbacks towards ISO 9660 sessions.) Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/20220612813641277...@scdbackup.webframe.org
Re: BD-RE mount problem
On 09/08/12 12:08 PM, Thomas Schmitt wrote: Hi, [i am subscribed to cdwr...@other.debian.org, not to debian-user] I tried a new disc again, and this time formatted it through K3B instead of using dvd+rw-format directly. I don't know what K3B does as formatting, but dvd+rw-format does only a hardware level formatting. It does not create a filesystem. Further to above, I did a file copy using K3B onto one of the BD-RE discs that won't mount. K3B appeared to recognize that there was a udf file system on the disc. I would rather expect that it created one around the files which you told it to copy. After it finished, it automounted as /media/cdrom0 with fs type iso9660. So it is probably an ISO 9660/UDF hybrid filesystem created by mkisofs (which was started under the control of K3B). However, I can't mount it -rw. It insists that the file system is read-only. This is not the variant of UDf which you want. You want a read-write filesystem. root@transponder:/home/garydale# mkudffs /dev/sr0 Error opening device: Read-only file system This should have worked. Do you have no w-permission to /dev/sr0 ? I just exercised with success: mkudffs /dev/sr1 mount /dev/sr1 /mnt cp /some/dir /mnt umount /mnt Hardware: INQUIRY:[HL-DT-ST][BD-RE GGW-H20L ][YL03] Mounted Media: 43h, BD-RE Media ID: VERBAT/IM0 (Not that i ever would do that for backup. The umount time alone gives me creeps. No chance to get full write speed. Arrrgh !!! I use my own ISO 9660 multi-session tool xorriso for backups.) Yes, I have read-write permissions. I tried xorriso to fix the disc as well but it also fails. root@transponder:/home/garydale# dvd+rw-format -force=full /dev/sr0 * BD/DVD±RW/-RAM format utility byap...@fy.chalmers.se, version 7.1. * 24.2GB BD media detected. * formatting .:-[ FORMAT UNIT failed with SK=5h/INVALID FIELD IN PARAMETER LIST]: Input/output error It would be interesting to see what paramaters the program sent with the FORMAT UNIT command. According to the source code it would be Format Type 0x30 with sub-type 2. This should not cause an error. I've seen mention of this in some of my google searches on the various messages I've been getting. Can you elaborate on how to change the format type from the command line? Here's the dvd+rw-mediainfo: root@transponder:/home/garydale# dvd+rw-mediainfo /dev/sr0 READ FORMAT CAPACITIES: formatted: 11826176*2048=24220008448 Well, it is already formatted. That should suffice for a whole media life. The problem is to get mkudffs to work. Maybe it is reluctant to overwrite a valid ISO 9660 or UDF on the medium ? Try to overwrite it by brute force umount /dev/sr0 dd if=/dev/zero of=/dev/sr0 bs=2048 count=1024 mkudffs /dev/sr0 If 1024 blocks of 0s is not enough, then try to flood the whole medium dd if=/dev/zero of=/dev/sr0 bs=2048 count=11826176 Already tried that. dd complains: dd: opening `/dev/sr0': Read-only file system Any ideas anyone? You could use sequential burn programs like growisofs or xorriso. Both can add files to ISO 9660 filesystems on BD-RE. Those filesystems are mountable read-only. If you canafford to have the medium only readable on Linux, then you could try to format it by mkfs -t ext2. But that might reduce the lifetime of your BD-RE by overwriting the same blocks frequently. Actually your mkudffs approach should just work (with all its advantages and drawbacks towards ISO 9660 sessions.) I use udf so I can access the files directly. I have found it useful to do a cmp between the files on the HD and the BD-RE to ensure they copied correctly. If the cmp fails, I rsync the bad file (these are .tar.lzma archives that are often quite large). I try this 3 times before reporting a backup error. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5023e8c7.40...@rogers.com
Re: BD-RE mount problem
On 9 August 2012 17:43, Gary Dale garyd...@rogers.com wrote: Already tried that. dd complains: dd: opening `/dev/sr0': Read-only file system It sounds like it is mounted; try unmounting it, then try dd again. -- Sent from FOSS (Free Open Source Software) Debian GNU/Linux -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/cal36vgk4jwe5n+xlwtsrkp8pdg-ma6dqddgdwwsn8ctfrgd...@mail.gmail.com
Re: BD-RE mount problem
On 09/08/12 01:19 PM, Keith McKenzie wrote: On 9 August 2012 17:43, Gary Dalegaryd...@rogers.com wrote: Already tried that. dd complains: dd: opening `/dev/sr0': Read-only file system It sounds like it is mounted; try unmounting it, then try dd again. root@transponder:/home/garydale# umount /dev/sr0 umount: /dev/sr0: not mounted root@transponder:/home/garydale# dd of=/dev/sr0 bs=2048 count=1024 dd: opening `/dev/sr0': Read-only file system Also, root@transponder:/home/garydale# mkfs -t ext2 /dev/sr0 mke2fs 1.42.4 (12-Jun-2012) /dev/sr0 is entire device, not just one partition! Proceed anyway? (y,n) y /dev/sr0: Read-only file system while setting up superblock -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5023f33d.1000...@rogers.com
Re: BD-RE mount problem
On 09/08/12 12:08 PM, Thomas Schmitt wrote: Hi, [i am subscribed to cdwr...@other.debian.org, not to debian-user] You could use sequential burn programs like growisofs or xorriso. Both can add files to ISO 9660 filesystems on BD-RE. Those filesystems are mountable read-only. If you canafford to have the medium only readable on Linux, then you could try to format it by mkfs -t ext2. But that might reduce the lifetime of your BD-RE by overwriting the same blocks frequently. Actually your mkudffs approach should just work (with all its advantages and drawbacks towards ISO 9660 sessions.) Have a nice day :) Thomas Actually, I also tried using K3B to burn as udf. I started a Data Project then under Properties | Filesystem there are a couple of UDF options. Neither worked. Both say Could not determine size of resulting image file The debugging output is : Devices --- PIONEER BD-RW BDR-207D 1.10 (/dev/sr0, CD-R, CD-RW, CD-ROM, DVD-ROM, DVD-R, DVD-RW, DVD-R DL, BD-ROM, BD-R, BD-RE, DVD+R, DVD+RW, DVD+R DL) [DVD-ROM, DVD-R Sequential, DVD-R Dual Layer Sequential, DVD-R Dual Layer Jump, DVD-RW Restricted Overwrite, DVD-RW Sequential, DVD+RW, DVD+R, DVD+R Dual Layer, CD-ROM, CD-R, CD-RW, BD-ROM, BD-R Sequential (SRM), BD-R Random (RRM), BD-RE] [SAO, TAO, RAW, SAO/R96P, SAO/R96R, RAW/R16, RAW/R96P, RAW/R96R, Restricted Overwrite, Layer Jump, Random Recording, Sequential Recording, Sequential Recording + POW] [%7] K3b::IsoImager --- mkisofs print size result: 0 (0 bytes) System --- K3b Version: 2.0.2 KDE Version: 4.8.4 (4.8.4) QT Version: 4.8.2 Kernel: 3.2.0-3-amd64 Used versions --- mkisofs: 1.1.11 mkisofs --- /usr/bin/genisoimage: Unable to find previous session PVD '/dev/sr0'. mkisofs calculate size command: --- /usr/bin/genisoimage -cdrecord-params 0,0 -gui -graft-points -print-size -quiet -volid K3b data project -volset -appid K3B THE CD KREATOR (C) 1998-2010 SEBASTIAN TRUEG AND MICHAL MALEK -publisher -preparer -sysid LINUX -volset-size 1 -volset-seqno 1 -sort /tmp/kde-garydale/k3bM10144.tmp -rational-rock -hide-list /tmp/kde-garydale/k3ba10144.tmp -no-cache-inodes -udf -full-iso9660-filenames -iso-level 3 -path-list /tmp/kde-garydale/k3bu10144.tmp -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/5023f672.8010...@rogers.com
Re: BD-RE mount problem
On 9 August 2012 18:28, Gary Dale garyd...@rogers.com wrote: On 09/08/12 01:19 PM, Keith McKenzie wrote: On 9 August 2012 17:43, Gary Dalegaryd...@rogers.com wrote: Already tried that. dd complains: dd: opening `/dev/sr0': Read-only file system It sounds like it is mounted; try unmounting it, then try dd again. root@transponder:/home/garydale# umount /dev/sr0 umount: /dev/sr0: not mounted root@transponder:/home/garydale# dd of=/dev/sr0 bs=2048 count=1024 dd: opening `/dev/sr0': Read-only file system Also, root@transponder:/home/garydale# mkfs -t ext2 /dev/sr0 mke2fs 1.42.4 (12-Jun-2012) /dev/sr0 is entire device, not just one partition! Proceed anyway? (y,n) y /dev/sr0: Read-only file system while setting up superblock . it isn't mounted under /dev/cdrom or /dev/dvd ? -- Sent from FOSS (Free Open Source Software) Debian GNU/Linux -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/CAL36VGnwbN_PRNfHaFBpXXFXj921ztxeoOrMK_3P5zdVhF=r...@mail.gmail.com
Re: BD-RE mount problem
Hi, Yes, I have read-write permissions. Something does not work properly. Are any related messages to see in the output of dmesg ? I tried xorriso to fix the disc as well but it also fails. What did you try and what did it report when it failed ? (We could get a log of SCSI commands from xorriso by command -scsi_log on .) root@transponder:/home/garydale# dvd+rw-format -force=full /dev/sr0 * formatting .:-[ FORMAT UNIT failed with SK=5h/INVALID FIELD IN PARAMETER LIST]: Input/output error I've seen mention of this in some of my google searches on the various messages I've been getting. Can you elaborate on how to change the format type from the command line? If you use -force without =full then you get sub-type 3. From dvd+rw-format.cpp: if (full (formats[i+4+4]2)!=0x31) formats[i+4+4] |= 2;// Full Certificaton else if ((formats[i+4+4]2)==0x30) formats[i+4+4] |= 3;// Quick Certification But i do not see the formatting state of the medium as the cause of your problems. dd: opening `/dev/sr0': Read-only file system Something is wrong deep in the kernel or in the hardware. A BD-RE should be writable at least for the superuser. But how does this match your report that it fails on another system too ? Very riddling. Can you read raw data from the medium ? dd if=/dev/sr0 bs=2048 count=16 | wc Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/1135061281802749...@scdbackup.webframe.org
Re: BD-RE mount problem
Hi, I also tried using K3B to burn as udf. mkisofs print size result: 0 (0 bytes) This looks like a different problem. A size prediction of 0 is hardly to explain by any state of the target medium. How large should the result have been ? What do you get from xorriso -outdev /dev/sr0 -blank as_needed \ -md5 on -add /usr/local/bin -- (You may use any other existing directory. I have chosen /usr/local/bin because it is normally not too large for a quick test.) If this fails, then you can get very verbous message output by prepending -report_about and -scsi_log commands and by catching the messages in file /tmp/xorriso.log xorriso -report_about all -scsi_log on \ -outdev /dev/sr0 -blank as_needed \ -md5 on -add /usr/local/bin -- \ 21 | tee -i /tmp/xorriso.log That file xorriso.log would be of interest then, of course. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/379612444358986...@scdbackup.webframe.org
Re: BD-RE mount problem
On 09/08/12 01:46 PM, Keith McKenzie wrote: On 9 August 2012 18:28, Gary Dalegaryd...@rogers.com wrote: On 09/08/12 01:19 PM, Keith McKenzie wrote: On 9 August 2012 17:43, Gary Dalegaryd...@rogers.com wrote: Already tried that. dd complains: dd: opening `/dev/sr0': Read-only file system It sounds like it is mounted; try unmounting it, then try dd again. root@transponder:/home/garydale# umount /dev/sr0 umount: /dev/sr0: not mounted root@transponder:/home/garydale# dd of=/dev/sr0 bs=2048 count=1024 dd: opening `/dev/sr0': Read-only file system Also, root@transponder:/home/garydale# mkfs -t ext2 /dev/sr0 mke2fs 1.42.4 (12-Jun-2012) /dev/sr0 is entire device, not just one partition! Proceed anyway? (y,n) y /dev/sr0: Read-only file system while setting up superblock . it isn't mounted under /dev/cdrom or /dev/dvd ? No. The umount /dev/sr0 should handle that anyway, but I don't have the other devices on my system. I think it's been pretty much /dev/sr? for optical media for a couple of years now. -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/50240719.20...@rogers.com
Re: BD-RE mount problem
On 09/08/12 01:45 PM, Thomas Schmitt wrote: Hi, Yes, I have read-write permissions. Something does not work properly. Are any related messages to see in the output of dmesg ? Nothing in dmesg | tail or syslog just now when I tried a dvd+rw-format -force=full. I tried xorriso to fix the disc as well but it also fails. What did you try and what did it report when it failed ? (We could get a log of SCSI commands from xorriso by command -scsi_log on .) xorriso just reports failure. Here's the output with -scsi_log on: root@transponder:/home/garydale# xorriso -scsi_log on -dev /dev/sr0 -format full xorriso 1.2.2 : RockRidge filesystem manipulator, libburnia project. TEST UNIT READY 00 00 00 00 00 00 4 ms INQUIRY 12 00 00 00 24 00 From drive: 36b 05 80 05 32 5b 00 00 00 50 49 4f 4e 45 45 52 20 42 44 2d 52 57 20 20 20 42 44 52 2d 32 30 37 44 31 2e 31 30 8 ms MODE SENSE 5a 00 2a 00 00 00 00 00 1e 00 From drive: 30b 00 2a 00 00 00 00 00 00 2a 22 3f 17 f1 63 2b 23 af 96 01 00 0f a0 af 96 00 00 23 1e 23 1e 8 ms MODE SENSE 5a 00 2a 00 00 00 00 00 2c 00 From drive: 44b 00 2a 00 00 00 00 00 00 2a 22 3f 17 f1 63 2b 23 af 96 01 00 0f a0 af 96 00 00 23 1e 23 1e 00 01 00 00 00 00 23 1e 00 01 00 00 23 1e 4 ms GET CONFIGURATION 46 00 00 00 00 00 00 00 08 00 From drive: 8b 00 00 01 ac 00 00 00 43 8 ms GET CONFIGURATION 46 00 00 00 00 00 00 01 b0 00 From drive: 432b 00 00 01 ac 00 00 00 43 00 00 03 44 00 43 01 00 00 42 00 00 00 41 00 00 00 40 00 00 00 2b 00 00 00 1a 00 00 00 1b 00 00 00 16 00 00 00 15 00 00 00 13 00 00 00 14 00 00 00 11 00 00 00 02 01 00 00 10 00 00 00 0a 00 00 00 09 00 00 00 08 00 00 00 01 0b 08 00 00 00 07 01 00 00 00 00 02 07 04 02 00 00 00 00 03 07 04 39 00 00 00 00 04 09 04 02 00 00 00 00 10 01 08 00 00 08 00 00 20 01 00 00 1d 00 00 00 1e 08 04 03 00 00 00 00 1f 08 04 00 00 01 00 00 20 05 0c 00 b4 73 ff 00 00 08 00 00 20 01 00 00 21 0c 08 3f 01 07 01 00 00 00 00 00 23 09 08 08 00 00 00 00 00 00 00 00 24 05 04 80 00 00 00 00 26 00 00 00 2a 08 04 01 00 00 00 00 2b 00 04 01 00 00 00 00 2c 00 04 03 00 00 00 00 2d 08 04 46 00 3f 01 00 2e 04 04 6f 00 08 00 00 2f 08 04 4e 00 00 00 00 33 00 08 00 00 00 01 10 00 00 00 00 37 00 04 00 0f 00 00 00 38 00 04 00 00 00 00 00 3b 00 04 01 00 00 00 00 40 09 1c 01 00 00 00 00 06 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 02 00 00 00 00 00 00 00 41 05 14 01 00 00 00 00 04 00 00 00 00 00 00 00 02 00 00 00 00 00 00 01 00 03 00 01 03 00 04 07 00 00 01 01 04 04 04 00 00 00 00 01 05 07 04 01 00 00 00 01 06 00 04 00 00 00 01 01 07 15 04 3f 00 00 00 01 08 03 0c 4b 4b 44 4c 30 30 30 30 32 30 57 4c 01 0a 00 0c 46 44 43 00 53 44 43 00 54 4f 43 00 01 0b 00 04 00 00 00 01 01 0d 09 04 13 01 01 01 8 ms GET PERFORMANCE ac 00 00 00 00 00 00 00 00 00 03 00 From drive: 8b 00 00 00 14 00 00 00 00 4 ms GET PERFORMANCE ac 00 00 00 00 00 00 00 00 01 03 00 From drive: 24b 00 00 00 14 00 00 00 00 00 00 00 00 00 b4 73 ff 00 00 23 1e 00 00 23 1e 4 ms MODE SENSE 5a 00 01 00 00 00 00 00 0c 00 From drive: 12b 00 12 00 00 00 00 00 00 01 0a 00 03 4 ms PREVENT/ALLOW MEDIA REMOVAL 1e 00 00 00 00 00 4 ms START/STOP UNIT 1b 00 00 00 03 00 8 ms TEST UNIT READY 00 00 00 00 00 00 0 ms PREVENT/ALLOW MEDIA REMOVAL 1e 00 00 00 01 00 4 ms START/STOP UNIT 1b 01 00 00 01 00 4 ms TEST UNIT READY 00 00 00 00 00 00 0 ms START/STOP UNIT 1b 00 00 00 01 00 8 ms INQUIRY 12 00 00 00 24 00 From drive: 36b 05 80 05 32 5b 00 00 00 50 49 4f 4e 45 45 52 20 42 44 2d 52 57 20 20 20 42 44 52 2d 32 30 37 44 31 2e 31 30 4 ms MODE SENSE 5a 00 2a 00 00 00 00 00 1e 00 From drive: 30b 00 2a 00 00 00 00 00 00 2a 22 3f 17 f1 63 2b 23 af 96 01 00 0f a0 af 96 00 00 23 1e 23 1e 8 ms MODE SENSE 5a 00 2a 00 00 00 00 00 2c 00 From drive: 44b 00 2a 00 00 00 00 00 00 2a 22 3f 17 f1 63 2b 23 af 96 01 00 0f a0 af 96 00 00 23 1e 23 1e 00 01 00 00 00 00 23 1e 00 01 00 00 23 1e 8 ms GET CONFIGURATION 46 00 00 00 00 00 00 00 08 00 From drive: 8b 00 00 01 ac 00 00 00 43 8 ms GET CONFIGURATION 46 00 00 00 00 00 00 01 b0 00 From drive: 432b 00 00 01 ac 00 00 00 43 00 00 03 44 00 43 01 00 00 42 00 00 00 41 00 00 00 40 00 00 00 2b 00 00 00 1a 00 00 00 1b 00 00 00 16 00 00 00 15 00 00 00 13 00 00 00 14 00 00 00 11 00 00 00 02 01 00 00 10 00 00 00 0a 00 00 00 09 00 00 00 08 00 00 00 01 0b 08 00 00 00 07 01 00 00 00 00 02 07 04 02 00 00 00 00 03 07 04 39 00 00 00 00 04 09 04 02 00 00 00 00 10 01 08 00 00 08 00 00 20 01 00 00 1d 00 00 00 1e 08 04 03 00 00 00 00 1f 08 04 00 00 01 00 00 20 05 0c 00 b4 73 ff 00 00 08 00 00 20 01 00 00 21 0c 08 3f 01 07 01 00 00 00 00 00 23 09 08 08 00 00 00 00 00 00 00 00 24 05 04 80 00 00 00 00 26 00 00 00 2a 08 04 01 00 00 00 00 2b 00 04 01 00 00 00 00 2c 00 04 03 00 00 00 00 2d 08 04 46 00 3f 01 00 2e 04 04 6f 00 08 00 00 2f 08 04 4e 00 00 00 00 33 00 08 00 00 00 01 10 00 00 00 00 37 00 04 00 0f 00 00 00 38 00 04 00 00 00 00 00 3b 00 04 01 00 00 00 00 40 09 1c 01 00 00 00 00 06 00 00 00 00
Re: [Bulk] Re: BD-RE mount problem
On 09/08/12 02:39 PM, Thomas Schmitt wrote: Hi, I also tried using K3B to burn as udf. mkisofs print size result: 0 (0 bytes) This looks like a different problem. A size prediction of 0 is hardly to explain by any state of the target medium. How large should the result have been ? 59M or there about. The problem only shows up when I tell K3B to use udf, so I believe it is related. K3B and xorriso will burn iso9660. What do you get from xorriso -outdev /dev/sr0 -blank as_needed \ -md5 on -add /usr/local/bin -- (You may use any other existing directory. I have chosen /usr/local/bin because it is normally not too large for a quick test.) root@transponder:/home/garydale# xorriso -outdev /dev/sr0 -blank as_needed \ -md5 on -add /usr/local/bin xorriso 1.2.2 : RockRidge filesystem manipulator, libburnia project. Drive current: -outdev '/dev/sr0' Media current: BD-RE Media status : is blank Media summary: 0 sessions, 0 data blocks, 0 data, 22.6g free xorriso : NOTE : -blank as_needed: no need for action detected Added to ISO image: directory '/usr/local/bin'='/usr/local/bin' xorriso : UPDATE : Writing: 16s8.3% fifo 0% buf 0% libburn : NOTE : Write start address is 32 * 2048 xorriso : UPDATE : Writing: 16s8.3% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing: 80s 41.7% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.1xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB xorriso : UPDATE : Writing:192s 100.0% fifo 0% buf 0% 0.0xB ISO image produced: 30 sectors Written to medium : 192 sectors at LBA 32 Writing to '/dev/sr0' completed successfully. The problem doesn't seem to be affecting iso9660 burns. However, I don't want iso9660 because it is read only. I need udf because it is a writable file system. If this fails, then you can get very verbous message output by prepending -report_about and -scsi_log commands and by catching the messages in file /tmp/xorriso.log xorriso -report_about all -scsi_log on \ -outdev /dev/sr0 -blank as_needed \ -md5 on -add /usr/local/bin -- \ 21 | tee -i /tmp/xorriso.log That file xorriso.log would be of interest then, of course. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/50240b5c.7030...@rogers.com
Re: BD-RE mount problem
Hi, # xorriso -scsi_log on -dev /dev/sr0 -format full ... xorriso : FAILURE : libburn indicates failure with formatting. It should have reported the SCSI error (will have to dig for that). That error came with command FORMAT UNIT FORMAT UNIT 04 11 00 00 00 00 To drive: 12b 00 82 00 08 00 b4 74 00 c2 00 30 00 +++ sense data = 70 00 05 00 00 00 00 0E 00 00 00 00 26 00 00 89 00 08 +++ key=5 asc=26h ascq=00h ( 4 ms) This would be 5 26 00 INVALID FIELD IN PARAMETER LIST The drive does not want to format that medium. At least not with Format Type 0x30, Sub-type 2. Well, that's what dvd+rw-format tried too. The refusal to re-format does not necessarily have to be related to the failure to run mkudffs. The failure to format is just on this system, which is the only one I have locally with a BluRay writer. The other system was just a failure to mount after formatting. Formatting a BD-RE may or may not erase its data (i.e. the filesystem). I would consider it normal that a BD-RE cannot be mounted after a re-format with no successful mkudffs. So the theory that something in your computer broke down is not outruled yet. Did you tamper with udev ? Install new peripherals ? Why do all block device writers so obstinately scream read-only ? xorriso -outdev /dev/sr0 -blank as_needed \ -md5 on -add /usr/local/bin ... Writing to '/dev/sr0' completed successfully. Ok. It is not the drive to blame. It allowed several SCSI write commands. xorriso uses the generic SG_IO driver, which directly performs SCSI transactions with the drive. dd, mkudffs, et.al. use the block device driver, which itself would use the SG_IO driver ... if it was not broken on your machine. Expert question: What can make the kernel throw EROFS, probably on write(2) ? Device file permissions seem not to be the reason. Gary: Can you compile and run this C program ? --- #include sys/types.h #include sys/stat.h #include fcntl.h #include stdio.h #include errno.h #include string.h main() { int fd, ret; char buf[2048]; fd = open(/dev/sr0, O_RDWR); printf(open: fd= %d , errno= %d\n, fd, errno); if(errno) perror(open); memset(buf, 0, 2048); ret = write(fd, buf, 2048); printf(write: ret= %d , errno= %d\n, ret, errno); if(errno) perror(write); close(fd); } --- E.g. with code in file open_sr0.c : cc -g -o open_sr0 open_sr0.c and then ./open_sr0 With an empty drive i get open: fd= -1 , errno= 123 open: No medium found write: ret= -1 , errno= 9 write: Bad file descriptor I assume that you, with a BD-RE loaded, get errno= 30, Read-only file system at write. Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/14384612447337991...@scdbackup.webframe.org
Re: [Bulk] Re: BD-RE mount problem
On 09/08/12 04:36 PM, Thomas Schmitt wrote: Hi, # xorriso -scsi_log on -dev /dev/sr0 -format full ... xorriso : FAILURE : libburn indicates failure with formatting. It should have reported the SCSI error (will have to dig for that). That error came with command FORMAT UNIT FORMAT UNIT 04 11 00 00 00 00 To drive: 12b 00 82 00 08 00 b4 74 00 c2 00 30 00 +++ sense data = 70 00 05 00 00 00 00 0E 00 00 00 00 26 00 00 89 00 08 +++ key=5 asc=26h ascq=00h ( 4 ms) This would be 5 26 00 INVALID FIELD IN PARAMETER LIST The drive does not want to format that medium. At least not with Format Type 0x30, Sub-type 2. Well, that's what dvd+rw-format tried too. The refusal to re-format does not necessarily have to be related to the failure to run mkudffs. The failure to format is just on this system, which is the only one I have locally with a BluRay writer. The other system was just a failure to mount after formatting. Formatting a BD-RE may or may not erase its data (i.e. the filesystem). I would consider it normal that a BD-RE cannot be mounted after a re-format with no successful mkudffs. So the theory that something in your computer broke down is not outruled yet. Did you tamper with udev ? Install new peripherals ? No. The last peripheral I installed was the BluRay writer, to replace a DVD writer. Why do all block device writers so obstinately scream read-only ? xorriso -outdev /dev/sr0 -blank as_needed \ -md5 on -add /usr/local/bin ... Writing to '/dev/sr0' completed successfully. Ok. It is not the drive to blame. It allowed several SCSI write commands. xorriso uses the generic SG_IO driver, which directly performs SCSI transactions with the drive. dd, mkudffs, et.al. use the block device driver, which itself would use the SG_IO driver ... if it was not broken on your machine. Expert question: What can make the kernel throw EROFS, probably on write(2) ? Device file permissions seem not to be the reason. Gary: Can you compile and run this C program ? --- #includesys/types.h #includesys/stat.h #includefcntl.h #includestdio.h #includeerrno.h #includestring.h main() { int fd, ret; char buf[2048]; fd = open(/dev/sr0, O_RDWR); printf(open: fd= %d , errno= %d\n, fd, errno); if(errno) perror(open); memset(buf, 0, 2048); ret = write(fd, buf, 2048); printf(write: ret= %d , errno= %d\n, ret, errno); if(errno) perror(write); close(fd); } --- E.g. with code in file open_sr0.c : cc -g -o open_sr0 open_sr0.c and then ./open_sr0 With an empty drive i get open: fd= -1 , errno= 123 open: No medium found write: ret= -1 , errno= 9 write: Bad file descriptor I assume that you, with a BD-RE loaded, get errno= 30, Read-only file system at write. garydale@transponder:~$ ./open_sr0 open: fd= -1 , errno= 30 open: Read-only file system write: ret= -1 , errno= 9 write: Bad file descriptor garydale@transponder:~$ su Password: root@transponder:/home/garydale# ./open_sr0 open: fd= -1 , errno= 30 open: Read-only file system write: ret= -1 , errno= 9 write: Bad file descriptor -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/50242dd2.6030...@rogers.com
Re: BD-RE mount problem
Hi, fd = open(/dev/sr0, O_RDWR); root@transponder:/home/garydale# ./open_sr0 open: fd= -1 , errno= 30 open: Read-only file system This is surprising, because xorriso uses open(..., O_RDWR | O_NDELAY); when it acquires a drive. (I would have expected to see the error with write(), which xorriso does not use.) Whay happens if you change the test program -fd = open(/dev/sr0, O_RDWR); +fd = open(/dev/sr0, O_RDWR | O_NDELAY); compile it, and run again as superuser ? Whatever, a BD-RE device with rw-permission on its device file should not throw this error. We need kernel expertise to find out what happens here. Is anybody at debian-user able to give advise or propose experiments which shed light on the problem ? Have a nice day :) Thomas -- To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: http://lists.debian.org/23290612469270799...@scdbackup.webframe.org
Re: BD-RE mount problem
On 06/08/12 11:51 PM, Gary Dale wrote: I've been using BD-RE discs for backups on a Debian/Squeeze server for a couple of years now. In the last week or so the backups have been failing. I haven't modified my backup script so I thought about possible hardware issues. - I tried changing the BluRay writer but got the same problem. - I tried new discs but got the same problem. - I tried replacing the PCI-SATA controller that the machine needed for the BluRay writer, but still got the same problem. - the discs do formate correctly when I try dvd+rw-format -force=full /dev/sr0 Finally, I tried an entirely different machine with a different model of BluRay writer and I'm still getting the same problem. This new machine has a different architecture (AMD64) and is running Debian/Wheezy. Why am I getting the same problem? I tried a new disc again, and this time formatted it through K3B instead of using dvd+rw-format directly. It appeared to format correctly - and no longer shows as an empty BD-RE disc when I insert it - but still wouldn't mount. All the mount attempts give exactly the same result: # mount /media/dvd mount: block device /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so The /etc/fstab entry is the same between the two machines: /dev/sr0/media/dvd udf user 0 0 I'm using Memorex BD-RE 2x discs. I've used an LG, ASUS and Pioneer BluRay writer - the first two on the older machine. The ASUS and Pioneer are brand new writers. Any ideas? Further to above, I did a file copy using K3B onto one of the BD-RE discs that won't mount. K3B appeared to recognize that there was a udf file system on the disc. After it finished, it automounted as /media/cdrom0 with fs type iso9660. However, I could also mount it as /media/dvd. Switching to root, I was also able to mount it using mount -t udf /dev/sr0 /media/dvd Running mount shows that it is mounted as a udf file system. However, I can't mount it -rw. It insists that the file system is read-only. Also, I booted my computer from a USB key containing system rescue CD. Again, the mount fails. Here's a sequence I just tried: root@transponder:/home/garydale# mkudffs /dev/sr0 Error opening device: Read-only file system root@transponder:/home/garydale# mount /media/dvd mount: block device /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so root@transponder:/home/garydale# mount /media/cdrom0 mount: block device /dev/sr0 is write-protected, mounting read-only mount: wrong fs type, bad option, bad superblock on /dev/sr0, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so Afterward, I started up k3B and tried tools | format. The format dialog has a pulldown for the media which shows Complete Data BD-RE. It wouldn't do a format - said it didn't need to do one - unless I do a force, which I decided against. I was able to burn a data project, after which the BluRay disc automounts as /media/cdrom0 again. The mount command (no options) shows it as: /dev/sr0 on /media/cdrom0 type iso9660 (ro,nosuid,nodev,noexec,relatime) I can also mount it as /media/dvd, where the mount command shows it mounted as: /dev/sr0 on /media/dvd type udf (ro,nosuid,nodev,noexec,relatime,utf8) Trying to format the disk using dvd+rw-format is now giving me: root@transponder:/home/garydale# dvd+rw-format -force=full /dev/sr0 * BD/DVD±RW/-RAM format utility by ap...@fy.chalmers.se, version 7.1. * 24.2GB BD media detected. * formatting .:-[ FORMAT UNIT failed with SK=5h/INVALID FIELD IN PARAMETER LIST]: Input/output error I get the same if I try to -blank or -format as well. And of course, the device shows as 100% full under df, since it seems to really be an iso9660 formatted disc. Here's the dvd+rw-mediainfo: root@transponder:/home/garydale# dvd+rw-mediainfo /dev/sr0 INQUIRY:[PIONEER ][BD-RW BDR-207D][1.10] GET [CURRENT] CONFIGURATION: Mounted Media: 43h, BD-RE Media ID: RITEK/BW1 Current Write Speed: 2.0x4495=8990KB/s Write Speed #0:2.0x4495=8990KB/s Speed Descriptor#0:00/11826175 R@2.0x4495=8990KB/s W@2.0x4495=8990KB/s READ DISC INFORMATION: Disc status: complete Number of Sessions:1 State of Last Session: complete Number of Tracks: 1 READ FORMAT CAPACITIES: formatted: 11826176*2048=24220008448 00h(3000): 11826176*2048=24220008448 30h(3000): 11826176*2048=24220008448 30h(5000):