Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
ejecting scsi cdrw
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
mstamat
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2002
Posts: 130
Location: Greece

PostPosted: Wed Jan 15, 2003 8:30 pm    Post subject: ejecting scsi cdrw Reply with quote

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 :wink: .

Any ideas?

TIA
_________________
Manolis
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Wed Jan 15, 2003 11:24 pm    Post subject: Reply with quote

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
View user's profile Send private message
mstamat
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2002
Posts: 130
Location: Greece

PostPosted: Thu Jan 16, 2003 11:04 am    Post subject: ejecting scsi cdrw Reply with quote

eject cdrw (as root) says:
eject: Unable to eject, last error: Operation not permitted
_________________
Manolis
Back to top
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Thu Jan 16, 2003 3:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
mstamat
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2002
Posts: 130
Location: Greece

PostPosted: Thu Jan 16, 2003 4:30 pm    Post subject: strace output Reply with quote

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
View user's profile Send private message
ElCondor
Guru
Guru


Joined: 10 Apr 2002
Posts: 520
Location: Vienna, Austria, Europe

PostPosted: Thu Jan 16, 2003 5:49 pm    Post subject: Reply with quote

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
View user's profile Send private message
mstamat
Tux's lil' helper
Tux's lil' helper


Joined: 09 May 2002
Posts: 130
Location: Greece

PostPosted: Thu Jan 16, 2003 6:21 pm    Post subject: Reply with quote

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
View user's profile Send private message
rommel
Veteran
Veteran


Joined: 19 Apr 2002
Posts: 1145
Location: Williamsburg Virginia

PostPosted: Fri Jan 17, 2003 9:33 am    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum