(no subject)

From: Brian Reichle (reply@the.newsgroup)
Date: 09/05/02


From: Brian Reichle <reply@the.newsgroup>
Date: Thu, 05 Sep 2002 10:20:35 +1000

Dave Leigh wrote:

> Kasper Dupont wrote:
>
>
>>Daniel James wrote:
>>
>>>Er, yes. Quite right. That shows how often I've had to use a
>>>floppy on my linux box.
>>>
>>>So where do you click to *umount* it, when you want to change
>>>disks? You can't just change the disk and click refresh (not on
>>>KDE on SUSE 7.3, anyway).
>>>
>>This is one area, where I would really like to see Linux adopt
>>the AmigaOS principle. At least to the extent hardware allows
>>for that. I don't know any system with better removable media
>>handling than AmigaOS. It is not trivial to implement in a
>>multiuser environment, but I think it is possible.
>>
>
> In a multiuser environment I wouldn't recommend letting ordinary users have
> access to the removable media at all.
>
> But this reminds me... in a mailing list someone described a very nice
> feature of AmigaOS. Reportedly, on the Amiga you could refer to a disk by
> its drivename, or by the volume name of the disk itself. So (speaking in
> Linux terms) you could refer to the same disk as /mnt/floppy or
> /mnt/named/recipes, where "recipes" is the volume of the disk. That same
> disk would be /mnt/named/recipes no matter what drive it's in.
>
> I pointed out that you can script Linux to do something similar (although
> I'd love to see the feature implemented more professionally in the future).
> To do it, mount the disk as normal, then check the volume label with
> mlabel. If there's no label, then end. Otherwise, create a new directory
> under /mnt/named using the label that was extracted. Then call mount
> *again*, mounting it into the new location. (I suggest making it a
> subdirectory of "/mnt/named/" to prevent conflicts in case your disk label
> is something like "floppy" or "cdrom")
>
> To unmount, first check the volume label. If a label is found then unmount
> /mnt/named/label and delete the directory, otherwise skip those two steps.
> Then unmount the device. Create a script for each removable device (or one
> parameterized script). Then create a .kdelnk file for each device and use
> your own desktop icons instead of those provided by KDE. (modify
> appropriately for GNOME).
>
> Also you should provide a maintenance script to delete all /mnt/named/*
> directories in the event that power is recycled without a shutdown.
>
> The only potential problem is what to do if you have two disks with the
> same label. I don't know how the Amiga addressed that. My solution is to
> simply skip the creation of the /mnt/named/? directory if it already
> exists. Only the first mounted disk with that label can be accessed by
> name. The end result is amiga-like naming behavior so long as you're
> mounting from the destop. Once it's done all the users know is that it
> works.
>
>

I like the idea but i think it would be better implemented as a
psudo-filesystem mounted at /mnt/named. when a device is mounted, it
automaticly creates a simlink (i think it would be safer this way) to
the mount point of the drive. when the drive is unmounted, the simlink
dissapears. as for multiple identical lables, we could use something like:

/mnt/named/recipies
/mnt/named/recipies01
/mnt/named/recipies02

or

/mnt/named/recipies/00
/mnt/named/recipies/01
/mnt/named/recipies/02



Relevant Pages

  • Re: Floppy Disk Mystery
    ... I am completely new to Linux, ... Do read the manuals, ... > I did not unmount the disk, as I've never seen a need to. ... Various systems, Linux included, don't immediately write to a disk. ...
    (alt.os.linux.redhat)
  • Re: Screw Linux, Im going back to Windows!
    ... >> floppy on my linux box. ... You can't just change the disk and click refresh (not on ... If there's no label, then end. ...
    (comp.os.linux.security)
  • Re: SOLARIS 8 problem
    ... >i think its depending on the harddisk label. ... i tried erasing all partitions with the linux fdisk program. ... The -s might bypass whatever is reading the Linux partition and give ... partition, and label the disk. ...
    (comp.unix.solaris)
  • Re: Cannot remove flash memory
    ... He said Linux is way ahead of Microsoft when it comes to Hot Swapping ... it's true that you can pull off a device when nothing is ... So the very thing to do is to unmount your disk to be sure that nothing ... If it doesn't want to unmount the you can add the -l flag. ...
    (Ubuntu)
  • Re: Screw Linux, Im going back to Windows!
    ... >>> floppy on my linux box. ... You can't just change the disk and click refresh (not on ... to unmount the floppy fast enough unless it does it too fast. ...
    (comp.os.linux.security)