View previous topic :: View next topic |
Author |
Message |
mstamat Tux's lil' helper
Joined: 09 May 2002 Posts: 130 Location: Greece
|
Posted: Wed Jan 15, 2003 8:30 pm Post subject: ejecting scsi cdrw |
|
|
Hi,
How do I eject my scsi cdrw tray using the eject command? I edited my /etc/devfsd.conf so that /dev/cdrw is a ling to /dev/sg0 and /dev/sg0 is a link to /dev/scsi/blah/blah. I have tried using all of them as a parameter to eject but nothing works.
A way to do that is to use "cdrecord --eject", but I'd prefer to find a way to do that with eject command .
Any ideas?
TIA _________________ Manolis |
|
Back to top |
|
|
ElCondor Guru
Joined: 10 Apr 2002 Posts: 520 Location: Vienna, Austria, Europe
|
Posted: Wed Jan 15, 2003 11:24 pm Post subject: |
|
|
does eject /dev/cdrw not work??
* ElCondor pasa * _________________ Here I am the victim of my own choices and I'm just starting! |
|
Back to top |
|
|
mstamat Tux's lil' helper
Joined: 09 May 2002 Posts: 130 Location: Greece
|
Posted: Thu Jan 16, 2003 11:04 am Post subject: ejecting scsi cdrw |
|
|
eject cdrw (as root) says:
eject: Unable to eject, last error: Operation not permitted _________________ Manolis |
|
Back to top |
|
|
ElCondor Guru
Joined: 10 Apr 2002 Posts: 520 Location: Vienna, Austria, Europe
|
Posted: Thu Jan 16, 2003 3:55 pm Post subject: |
|
|
brute force: strace eject to find out, what operation this is ..
* ElCondor pasa * _________________ Here I am the victim of my own choices and I'm just starting! |
|
Back to top |
|
|
mstamat Tux's lil' helper
Joined: 09 May 2002 Posts: 130 Location: Greece
|
Posted: Thu Jan 16, 2003 4:30 pm Post subject: strace output |
|
|
I ran as root "strace /dev/cdrw". Here are the last lines of the output:
Code: | .
.
.
brk(0x8052000) = 0x8052000
brk(0x8053000) = 0x8053000
brk(0x8054000) = 0x8054000
open("/dev/scsi/host0/bus0/target0/lun0/generic", O_RDONLY|O_NONBLOCK) = 3
ioctl(3, 0x5309, 0xbffff790) = -1 EPERM (Operation not permitted)
ioctl(3, FIBMAP, 0xbffff640) = -1 EPERM (Operation not permitted)
ioctl(3, FDEJECT, 0xbffff790) = -1 EPERM (Operation not permitted)
ioctl(3, SNDCTL_MIDI_MPUMODE, 0xbffff780) = -1 EPERM (Operation not permitted)
write(2, "eject: unable to eject, last err"..., 60eject: unable to eject, last error: Operation not permitted
) = 60
_exit(1) = ? |
I get the same output when runing "strace eject cdrw" as gzaxar (the user logged on the console). I don't know what these ioctls mean. Here is the ls output for the device.
Code: |
roadrunner mstamat # ls -al /dev/scsi/host0/bus0/target0/lun0/generic
crw-rw---- 1 gzaxar root 21, 0 Jan 1 1970 /dev/scsi/host0/bus0/target0/lun0/generic |
_________________ Manolis |
|
Back to top |
|
|
ElCondor Guru
Joined: 10 Apr 2002 Posts: 520 Location: Vienna, Austria, Europe
|
Posted: Thu Jan 16, 2003 5:49 pm Post subject: |
|
|
I have no real scsi here, justs scsi-emulation, but: Code: | warum@PHIEPS warum $ l /dev/scsi/host0/bus0/target0/lun0/cd
brw------- 1 warum cdrom 11, 0 1970-01-01 01:00 /dev/scsi/host0/bus0/target0/lun0/cd
| it's a block-device here, not a character-device. thats the only difference I can tell so far. sorry.
* ElCondor pasa * _________________ Here I am the victim of my own choices and I'm just starting! |
|
Back to top |
|
|
mstamat Tux's lil' helper
Joined: 09 May 2002 Posts: 130 Location: Greece
|
Posted: Thu Jan 16, 2003 6:21 pm Post subject: |
|
|
The block device is /dev/scsi/host0/bus0/target0/lun0/disc. But I get a different failure when I do that.
Code: | roadrunner ~# strace eject /dev/scsi/host0/bus0/target0/lun0/disc
.
.
.
brk(0x8052000) = 0x8052000
brk(0x8053000) = 0x8053000
brk(0x8054000) = 0x8054000
open("/dev/scsi/host0/bus0/target0/lun0/disc", O_RDONLY|O_NONBLOCK) = 3
ioctl(3, 0x5309, 0xbffff770) = -1 EINVAL (Invalid argument)
ioctl(3, FIBMAP, 0xbffff620) = 134217730
ioctl(3, FDEJECT, 0xbffff770) = -1 EINVAL (Invalid argument)
ioctl(3, SNDCTL_MIDI_MPUMODE, 0xbffff760) = -1 EINVAL (Invalid argument)
write(2, "eject: unable to eject, last err"..., 53eject: unable to eject, last error: Invalid argument
) = 53
_exit(1) = ? |
_________________ Manolis |
|
Back to top |
|
|
rommel Veteran
Joined: 19 Apr 2002 Posts: 1145 Location: Williamsburg Virginia
|
Posted: Fri Jan 17, 2003 9:33 am Post subject: |
|
|
hey you dont have supermount working do you? supermount doesnt work witht the program eject if you have configured it. if not sorry for the useless comment....lol |
|
Back to top |
|
|
|