* I can eject a mounted CD
@ 2001-04-13 22:12 Giuliano Pochini
[not found] ` <3AD78C81.51D8ED35@lvcm.com>
2001-04-19 21:36 ` Tomas Jura
0 siblings, 2 replies; 18+ messages in thread
From: Giuliano Pochini @ 2001-04-13 22:12 UTC (permalink / raw)
To: linux-kernel, linuxppc-dev
My fstab:
/dev/cdrom /mnt/cdrom iso9660
noauto,user,ro 0 0
/dev/cdrom /mnt/cdmac hfs
noauto,user,ro 0 0
I insert an apple cd (hfs) and mount /mnt/cdmac
If I type eject /mnt/cdrom the cd momes out but
df shows it's still mounted:
/dev/sr0 667978 667978 0 100% /mnt/cdmac
It's funny it don't let me eject cdmac
[Giu@Jay Giu]$ eject /mnt/cdmac/
umount: /dev/sr0 is not in the fstab (and you are not root)
eject: unmount of `/dev/sr0' failed
Bye.
^ permalink raw reply [flat|nested] 18+ messages in thread[parent not found: <3AD78C81.51D8ED35@lvcm.com>]
* Re: I can eject a mounted CD
[not found] ` <3AD78C81.51D8ED35@lvcm.com>
@ 2001-04-16 19:16 ` Giuliano Pochini
2001-04-17 20:50 ` Alan Cox
2001-04-18 8:42 ` Anthony D. Saxton
0 siblings, 2 replies; 18+ messages in thread
From: Giuliano Pochini @ 2001-04-16 19:16 UTC (permalink / raw)
To: linux-kernel; +Cc: lna
> > My fstab:
> >
> > /dev/cdrom /mnt/cdrom iso9660
> > noauto,user,ro 0 0
> > /dev/cdrom /mnt/cdmac hfs
> > noauto,user,ro 0 0
>
> Change your fstab to read instead:
>
> /dev/cdrom /mnt/cdrom auto noauto,user,ro 0 0
>
> And remove the other cdrom listing. This will allow mounting any
> supported format and eliminate the duel support for one device.
That's not the point. The kernel should not allow someone to
eject a mounted media.
Bye.
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: I can eject a mounted CD
2001-04-16 19:16 ` Giuliano Pochini
@ 2001-04-17 20:50 ` Alan Cox
2001-04-18 7:25 ` Giuliano Pochini
2001-04-18 8:42 ` Anthony D. Saxton
1 sibling, 1 reply; 18+ messages in thread
From: Alan Cox @ 2001-04-17 20:50 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: linux-kernel, lna
> > /dev/cdrom /mnt/cdrom auto noauto,user,ro 0 0
> >
> > And remove the other cdrom listing. This will allow mounting any
> > supported format and eliminate the duel support for one device.
>
> That's not the point. The kernel should not allow someone to
> eject a mounted media.
rpm -e magicdev
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-17 20:50 ` Alan Cox
@ 2001-04-18 7:25 ` Giuliano Pochini
2001-04-18 9:00 ` Tim Peeler
2001-04-18 12:23 ` Alan Cox
0 siblings, 2 replies; 18+ messages in thread
From: Giuliano Pochini @ 2001-04-18 7:25 UTC (permalink / raw)
To: Alan Cox; +Cc: lna, linux-kernel
>> > /dev/cdrom /mnt/cdrom auto noauto,user,ro 0 0
>> >
>> > And remove the other cdrom listing. This will allow mounting any
>> > supported format and eliminate the duel support for one device.
>>
>> That's not the point. The kernel should not allow someone to
>> eject a mounted media.
>
> rpm -e magicdev
Magicdev is not installed.
Ok, I'm the only one with this problem, I'll manage to find the bug by myself.
Bye.
Giuliano Pochini ->)|(<- Shiny Network {AS6665} ->)|(<-
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: I can eject a mounted CD
2001-04-18 7:25 ` Giuliano Pochini
@ 2001-04-18 9:00 ` Tim Peeler
2001-04-18 9:17 ` Giuliano Pochini
2001-04-18 12:23 ` Alan Cox
1 sibling, 1 reply; 18+ messages in thread
From: Tim Peeler @ 2001-04-18 9:00 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: linux-kernel
On Wed, Apr 18, 2001 at 09:25:43AM +0200, Giuliano Pochini wrote:
>
> >> > /dev/cdrom /mnt/cdrom auto noauto,user,ro 0 0
> >> >
> >> > And remove the other cdrom listing. This will allow mounting any
> >> > supported format and eliminate the duel support for one device.
> >>
> >> That's not the point. The kernel should not allow someone to
> >> eject a mounted media.
> >
> > rpm -e magicdev
>
> Magicdev is not installed.
> Ok, I'm the only one with this problem, I'll manage to find the bug by myself.
eject(1) line 36:
If the device is currently mounted, it is unmounted before
ejecting.
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-18 9:00 ` Tim Peeler
@ 2001-04-18 9:17 ` Giuliano Pochini
2001-04-18 13:24 ` Jeremy Jackson
0 siblings, 1 reply; 18+ messages in thread
From: Giuliano Pochini @ 2001-04-18 9:17 UTC (permalink / raw)
To: Tim Peeler; +Cc: linux-kernel
>> >> That's not the point. The kernel should not allow someone to
>> >> eject a mounted media.
>> >
>> > rpm -e magicdev
>>
>> Magicdev is not installed.
>> Ok, I'm the only one with this problem, I'll manage to find the bug by myself.
>
> eject(1) line 36:
>
> If the device is currently mounted, it is unmounted before
> ejecting.
But it doesn't get unmounted. I eject the disk but I can still see
and read the (cached) files !
Bye.
Giuliano Pochini ->)|(<- Shiny Network {AS6665} ->)|(<-
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: I can eject a mounted CD
2001-04-18 9:17 ` Giuliano Pochini
@ 2001-04-18 13:24 ` Jeremy Jackson
0 siblings, 0 replies; 18+ messages in thread
From: Jeremy Jackson @ 2001-04-18 13:24 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: Tim Peeler, linux-kernel
Giuliano Pochini wrote:
> >> >> That's not the point. The kernel should not allow someone to
> >> >> eject a mounted media.
> >> >
> >> > rpm -e magicdev
> >>
> >> Magicdev is not installed.
> >> Ok, I'm the only one with this problem, I'll manage to find the bug by myself.
> >
> > eject(1) line 36:
> >
> > If the device is currently mounted, it is unmounted before
> > ejecting.
>
> But it doesn't get unmounted. I eject the disk but I can still see
> and read the (cached) files !
>
> Bye.
> Giuliano Pochini ->)|(<- Shiny Network {AS6665} ->)|(<-
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
> Please read the FAQ at http://www.tux.org/lkml/
hdparm has an option controlling door locking; try locking it manually
to see if the drive can even lock the door. then try setting it
to match mounted/unmounted status of device; maybe it defaults
to always unlocked for some reason.
hdparm -L 1 /dev/hdc
also try commenting out one of those fstab lines... may be confusing things.
it should work the way you have it - you say mount /mnt/fstype and
depending of fstype it picks the right line, but just for the sake of debugging
try loosing one temporarily.
Cheers
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-18 7:25 ` Giuliano Pochini
2001-04-18 9:00 ` Tim Peeler
@ 2001-04-18 12:23 ` Alan Cox
2001-04-18 12:25 ` Jens Axboe
2001-04-18 13:03 ` Giuliano Pochini
1 sibling, 2 replies; 18+ messages in thread
From: Alan Cox @ 2001-04-18 12:23 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: Alan Cox, lna, linux-kernel
> > rpm -e magicdev
>
> Magicdev is not installed.
> Ok, I'm the only one with this problem, I'll manage to find the bug by myself.
vmware and one or two other apps I've also seen do this. WHen you unlock the
cdrom door as root you can unlock it even if a file system is mounted
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-18 12:23 ` Alan Cox
@ 2001-04-18 12:25 ` Jens Axboe
2001-04-18 13:03 ` Giuliano Pochini
1 sibling, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2001-04-18 12:25 UTC (permalink / raw)
To: Alan Cox; +Cc: Giuliano Pochini, lna, linux-kernel
On Wed, Apr 18 2001, Alan Cox wrote:
> > > rpm -e magicdev
> >
> > Magicdev is not installed.
> > Ok, I'm the only one with this problem, I'll manage to find the bug by myself.
>
> vmware and one or two other apps I've also seen do this. WHen you unlock the
> cdrom door as root you can unlock it even if a file system is mounted
yes, unlocking is definitely possible and then of course a manual eject.
Only by root of course, however an ioctl eject should fail unless the
cdrom really isn't busy (ie mounted or has other opens).
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-18 12:23 ` Alan Cox
2001-04-18 12:25 ` Jens Axboe
@ 2001-04-18 13:03 ` Giuliano Pochini
2001-04-18 13:06 ` Jens Axboe
1 sibling, 1 reply; 18+ messages in thread
From: Giuliano Pochini @ 2001-04-18 13:03 UTC (permalink / raw)
To: Alan Cox; +Cc: linux-kernel, lna
> vmware and one or two other apps I've also seen do this. WHen you unlock the
> cdrom door as root you can unlock it even if a file system is mounted
Right, so I'll check what eject(1) does. It might eject the disk even if it
failed to unmount.
Bye.
Giuliano Pochini ->)|(<- Shiny Network {AS6665} ->)|(<-
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: I can eject a mounted CD
2001-04-18 13:03 ` Giuliano Pochini
@ 2001-04-18 13:06 ` Jens Axboe
2001-04-18 21:03 ` Guest section DW
0 siblings, 1 reply; 18+ messages in thread
From: Jens Axboe @ 2001-04-18 13:06 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: Alan Cox, linux-kernel, lna
On Wed, Apr 18 2001, Giuliano Pochini wrote:
>
> > vmware and one or two other apps I've also seen do this. WHen you unlock the
> > cdrom door as root you can unlock it even if a file system is mounted
>
> Right, so I'll check what eject(1) does. It might eject the disk even if it
> failed to unmount.
It shouldn't be able to. But check and see what happens.
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-18 13:06 ` Jens Axboe
@ 2001-04-18 21:03 ` Guest section DW
2001-04-18 21:36 ` Jens Axboe
2001-04-19 7:49 ` Giuliano Pochini
0 siblings, 2 replies; 18+ messages in thread
From: Guest section DW @ 2001-04-18 21:03 UTC (permalink / raw)
To: Jens Axboe, Giuliano Pochini; +Cc: Alan Cox, linux-kernel, lna
On Wed, Apr 18, 2001 at 03:06:22PM +0200, Jens Axboe wrote:
> On Wed, Apr 18 2001, Giuliano Pochini wrote:
> > > vmware and one or two other apps I've also seen do this. WHen you unlock the
> > > cdrom door as root you can unlock it even if a file system is mounted
> >
> > Right, so I'll check what eject(1) does. It might eject the disk even if it
> > failed to unmount.
>
> It shouldn't be able to. But check and see what happens.
(1) There are many different programs all called eject(1).
I find at least four of them on this machine.
(2) I missed the start of the discussion; if this is a SCSI cdrom then
many eject programs will use raw SCSI commands and the kernel does not
try to parse raw SCSI commands so does not know that it is ejecting
a mounted cdrom.
Andries
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-18 21:03 ` Guest section DW
@ 2001-04-18 21:36 ` Jens Axboe
2001-04-19 7:49 ` Giuliano Pochini
1 sibling, 0 replies; 18+ messages in thread
From: Jens Axboe @ 2001-04-18 21:36 UTC (permalink / raw)
To: Guest section DW; +Cc: Giuliano Pochini, Alan Cox, linux-kernel, lna
On Wed, Apr 18 2001, Guest section DW wrote:
> On Wed, Apr 18, 2001 at 03:06:22PM +0200, Jens Axboe wrote:
> > On Wed, Apr 18 2001, Giuliano Pochini wrote:
>
> > > > vmware and one or two other apps I've also seen do this. WHen
> > > > you unlock the cdrom door as root you can unlock it even if a
> > > > file system is mounted
> > >
> > > Right, so I'll check what eject(1) does. It might eject the disk
> > > even if it failed to unmount.
> >
> > It shouldn't be able to. But check and see what happens.
>
> (1) There are many different programs all called eject(1). I find at
> least four of them on this machine.
>
> (2) I missed the start of the discussion; if this is a SCSI cdrom then
> many eject programs will use raw SCSI commands and the kernel does not
> try to parse raw SCSI commands so does not know that it is ejecting a
> mounted cdrom.
#2 can be done on any CDROM these days in fact, if eject uses
CDROM_SEND_PACKET then it can _always_ open the tray as well regardless
of mount status etc.
--
Jens Axboe
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-18 21:03 ` Guest section DW
2001-04-18 21:36 ` Jens Axboe
@ 2001-04-19 7:49 ` Giuliano Pochini
1 sibling, 0 replies; 18+ messages in thread
From: Giuliano Pochini @ 2001-04-19 7:49 UTC (permalink / raw)
To: Guest section DW; +Cc: lna, linux-kernel, Alan Cox, Jens Axboe
>> > Right, so I'll check what eject(1) does. It might eject the disk even if it
>> > failed to unmount.
>>
>> It shouldn't be able to. But check and see what happens.
>
> (1) There are many different programs all called eject(1).
> I find at least four of them on this machine.
>
> (2) I missed the start of the discussion; if this is a SCSI cdrom then
> many eject programs will use raw SCSI commands and the kernel does not
> try to parse raw SCSI commands so does not know that it is ejecting
> a mounted cdrom.
Yes, eject(1) (version 2.0.2, I don't remember the author) sends a SCSI
command to eject the disk, but it's broken because it doesn't even try to
umount the partition. It gets confused by my unusual fstab. I'll fix it as
soon as I have some spare time.
Bye.
Giuliano Pochini ->)|(<- Shiny Network {AS6665} ->)|(<-
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-16 19:16 ` Giuliano Pochini
2001-04-17 20:50 ` Alan Cox
@ 2001-04-18 8:42 ` Anthony D. Saxton
1 sibling, 0 replies; 18+ messages in thread
From: Anthony D. Saxton @ 2001-04-18 8:42 UTC (permalink / raw)
To: Giuliano Pochini; +Cc: linux-kernel
Giuliano Pochini wrote:
> > > My fstab:
> > >
> > > /dev/cdrom /mnt/cdrom iso9660
> > > noauto,user,ro 0 0
> > > /dev/cdrom /mnt/cdmac hfs
> > > noauto,user,ro 0 0
> >
> > Change your fstab to read instead:
> >
> > /dev/cdrom /mnt/cdrom auto noauto,user,ro 0 0
> >
> > And remove the other cdrom listing. This will allow mounting any
> > supported format and eliminate the duel support for one device.
>
> That's not the point. The kernel should not allow someone to
> eject a mounted media.
>
> Bye.
The kernel actually should allow a misconfigured system to behave as
configured. Basically, your /etc/fstab is telling the kernel that you have
two different devices occupying the same device address. In my case, I
have two cdrom drives. With the original configuration, either one would
mount to /mnt/cdrom. I changed /etc/fstab to identify the first drive as
being at /dev/scd0, mounted to /mnt/cdrom and the second at /dev/scd1,
mounted to /mnt/cd-r. Now I can have to independent drives. I could have
just as easily setup the fstab as above, but I would not be able to use
both drives.
One cannot expect any program to behave properly when configured
improperly. Your kernel was behaving exactly as it had been programmed it
to.
Anthony D. Saxton
LnA Concepts
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: I can eject a mounted CD
2001-04-13 22:12 I can eject a mounted CD Giuliano Pochini
[not found] ` <3AD78C81.51D8ED35@lvcm.com>
@ 2001-04-19 21:36 ` Tomas Jura
2001-04-20 7:49 ` Giuliano Pochini
1 sibling, 1 reply; 18+ messages in thread
From: Tomas Jura @ 2001-04-19 21:36 UTC (permalink / raw)
To: Giuliano Pochini, linux-kernel, linuxppc-dev
On Sat, Apr 14, 2001 at 12:12:28AM +0200, Giuliano Pochini wrote:
>
> My fstab:
>
> /dev/cdrom /mnt/cdrom iso9660 noauto,user,ro 0 0
> /dev/cdrom /mnt/cdmac hfs noauto,user,ro 0 0
>
> I insert an apple cd (hfs) and mount /mnt/cdmac If I type eject /mnt/cdrom
> the cd momes out but df shows it's still mounted:
>
> /dev/sr0 667978 667978 0 100% /mnt/cdmac
>
> It's funny it don't let me eject cdmac
>
> [Giu@Jay Giu]$ eject /mnt/cdmac/ umount: /dev/sr0 is not in the fstab (and
> you are not root) eject: unmount of `/dev/sr0' failed
>
I have similar problem with my swim3 floppy drive. Digging deeply I found that
when I make do folowing steps then disk is lost and I have to reboot to get it
back:
floppy = open(/dev/fd0);
ioctl( floopy, FDGETDRVPRM, &fdp) /* some *invalid* ioctl */
exit
Device is lost for root too. It is impossible to make any operation on this
device anymore. And adding some debuging messages showed me that there is no
problem in swim3 device driver. Still digging...(but have no much time to do
this ;-( )
Hw&Sw: PowerPC G3 beige, kernel 2.4.3, devfs
Tomas
P.S. CC to me, I'm not in linux-kernel list. Only in linux-ppc
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: I can eject a mounted CD
2001-04-19 21:36 ` Tomas Jura
@ 2001-04-20 7:49 ` Giuliano Pochini
[not found] ` <kara.2760-0.987788475@kara.hadess.net>
0 siblings, 1 reply; 18+ messages in thread
From: Giuliano Pochini @ 2001-04-20 7:49 UTC (permalink / raw)
To: Tomas Jura; +Cc: linuxppc-dev, linux-kernel
>> [Giu@Jay Giu]$ eject /mnt/cdmac/ umount: /dev/sr0 is not in the fstab (and
>> you are not root) eject: unmount of `/dev/sr0' failed
Eject(1) is suid.
> I have similar problem with my swim3 floppy drive. Digging deeply I found that
> when I make do folowing steps then disk is lost and I have to reboot to get it
> back:
I can't try this case because I haven't a floppy. When I ehect the cd I can
recover it by unmounting it. But the CD is read-only. I can try with a MO, but
the actual problem is that eject is buggy. It's not a kernel bug. I'll fix it...
Bye.
Giuliano Pochini ->)|(<- Shiny Network {AS6665} ->)|(<-
^ permalink raw reply [flat|nested] 18+ messages in thread
end of thread, other threads:[~2001-04-20 17:45 UTC | newest]
Thread overview: 18+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2001-04-13 22:12 I can eject a mounted CD Giuliano Pochini
[not found] ` <3AD78C81.51D8ED35@lvcm.com>
2001-04-16 19:16 ` Giuliano Pochini
2001-04-17 20:50 ` Alan Cox
2001-04-18 7:25 ` Giuliano Pochini
2001-04-18 9:00 ` Tim Peeler
2001-04-18 9:17 ` Giuliano Pochini
2001-04-18 13:24 ` Jeremy Jackson
2001-04-18 12:23 ` Alan Cox
2001-04-18 12:25 ` Jens Axboe
2001-04-18 13:03 ` Giuliano Pochini
2001-04-18 13:06 ` Jens Axboe
2001-04-18 21:03 ` Guest section DW
2001-04-18 21:36 ` Jens Axboe
2001-04-19 7:49 ` Giuliano Pochini
2001-04-18 8:42 ` Anthony D. Saxton
2001-04-19 21:36 ` Tomas Jura
2001-04-20 7:49 ` Giuliano Pochini
[not found] ` <kara.2760-0.987788475@kara.hadess.net>
2001-04-20 17:41 ` Bastien Nocera
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox