Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Mount removable media sync?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
LuckySandal
n00b
n00b


Joined: 01 Feb 2004
Posts: 22

PostPosted: Thu Feb 05, 2004 9:53 pm    Post subject: Mount removable media sync? Reply with quote

I was wondering whether it is possible to mount a floppy or zip drive "sync" and have it just like Windows where you can remove the media when the light is off and there's no need to unmount. I know this can be done with supermount/automount, but I'm no big fan of those.
Back to top
View user's profile Send private message
tdb
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 293
Location: New Orleans, Louisiana, U.S.A. (what's left of it anyway...)

PostPosted: Thu Feb 26, 2004 6:05 am    Post subject: Reply with quote

"sync" is what you are looking for. Unmounting also flushes the buffer.

I don't think that Windows had a feature that would keep the light lit until it finished flushing the buffers. For zip disks at least, pushing the eject button would force a buffer flush before the drive kicked the disk. Either that or it would not release the disk.
_________________
Do you know what a usufruct is?
Back to top
View user's profile Send private message
LuckySandal
n00b
n00b


Joined: 01 Feb 2004
Posts: 22

PostPosted: Sat Mar 06, 2004 6:45 pm    Post subject: Reply with quote

Quote:
"sync" is what you are looking for. Unmounting also flushes the buffer.

So what you're saying is that "sync" will flush the buffer immediately? That means that the light will not turn off or I will not be able to eject before the write is complete? If that's true, then who need's automount?

Quote:
I don't think that Windows had a feature that would keep the light lit until it finished flushing the buffers.

Well, for floppy disks it did. Anyway, the point is that I don't accidently eject it while their is still data to commit, so that will do.
Back to top
View user's profile Send private message
tdb
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 293
Location: New Orleans, Louisiana, U.S.A. (what's left of it anyway...)

PostPosted: Sun Mar 07, 2004 6:45 am    Post subject: Reply with quote

[quote="LuckySandal"]
Quote:

So what you're saying is that "sync" will flush the buffer immediately? That means that the light will not turn off or I will not be able to eject before the write is complete? If that's true, then who need's automount?

sync will force any and all buffers to be flushed to disk. Now, as to whether this will make the disk eject depends on the media. For Zip disks, you need to unmount the disk before the drive will release the disk, regardless of whether the buffers have been flushed. A good compromise here is to use the "eject" command to kick the disk out. eject will first unmount the disk (which will force the buffers to be flushed) then send a command to the drive to kick the disk out. I know it works on zip drives and cd-roms. It may also work on other drives that can automatically eject their media. There is a spec that the drive has to comply with, I don't remember what it is called offhand.


As for just being able to eject the disk when the light is not lit, I'm not sure it is possible. The closest would be automount, which (IIRC) will automatically unmount the disk after a certain time of inactivity. (read Unix, Linux, BSD, etc...) Same for CDROM, tapes, and any other kind of media where the drive can automatically eject the disk. This is a result of the way the OS handles filesystems. I think that's the way it works.

Quote:

Quote:
I don't think that Windows had a feature that would keep the light lit until it finished flushing the buffers.

Well, for floppy disks it did. Anyway, the point is that I don't accidently eject it while their is still data to commit, so that will do.

Ok, ok. I think I see now. The light wil be lit anytime it is reading or writing to the media. The light doesn't tell you if there is data buffered somewhere, or if it is safe to eject. All it does is tell you when the head is engaged in reading or writing. In Windows, ejecting a disk while the light is off could lead to data loss, if there is data in the buffers. Zip drives, I think, don't have this problem since when you push the eject button, the drive signals the OS to flush the buffers before it ejects the disk. A zip drive, in essence, is "smarter" then a floppy drive. A zip drive will try not to eject the disk if there is still data in the buffers; a floppy will not. A floppy drive cannot control whether the disk is ejected. (it cannot "lock" the disk in the drive.)
_________________
Do you know what a usufruct is?
Back to top
View user's profile Send private message
LuckySandal
n00b
n00b


Joined: 01 Feb 2004
Posts: 22

PostPosted: Sun Mar 07, 2004 4:07 pm    Post subject: automount Reply with quote

The whole point of this was so that I didn't have to mount / unmount stuff. I knew about super/automount but I am an Ockham's Razor type. I just wish that the supermount syntax was more orthodox. e.g.

/device/node /mount/point vfat automount

rather than

none /mount/point automount dev=/device/node,fstype=vfat

Oh well. I guess automount it is! Thanks for all your expertise.
Back to top
View user's profile Send private message
tdb
Apprentice
Apprentice


Joined: 19 Sep 2002
Posts: 293
Location: New Orleans, Louisiana, U.S.A. (what's left of it anyway...)

PostPosted: Mon Mar 08, 2004 2:55 pm    Post subject: Re: automount Reply with quote

LuckySandal wrote:

Oh well. I guess automount it is! Thanks for all your expertise.

Yeah, I think you're working against the inherant design of a *nix system. Super/Automounts are the only two viable workarounds I know of. There are some projects working on this now, though. (I forget the names, but do a search for "love sources" and "supermount" and you'll find a discussion of the alternatives. I don't think any of them are ready for prime time yet.
_________________
Do you know what a usufruct is?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo 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