Re: Floppy written in CentOS won't mount in FC3

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> P.S. On the box that the floppy was created, when booting up today, and
> doing a cd /media/floppy and a ls it displays the content of the floppy,
> and cat "file name" displays the content of the file on the
> floppy..thing is, the floppy wasn't even in the floppy drive at the
> time..why does it keep a copy of something like that.? Is this to do
> with Linux as a filesystem, even for blocks(meaning, because it was
> mounted, and I guess not mounted, it still exits, virtually .?)...

Andy was probably correct in that you copied "into" the mountpoint
directory and not actually onto the floppy.  You can test that by trying
to mount the floppy into a different mountpoint and seeing if you
still see the files.

But as for your observation that you can apparently read files after
removing the floppy; yes, that can frequently occur.  This is because
of Linux's filesystem caching that normally happens.  Whenever you
read part of a disk (whether it be a floppy, hard disk, or CompacFlash)
the kernel will remember those data blocks in it's buffer cache.  It
may even read more than you've requested in anticipation that
you'll soon be reading it too.  So when you did an "ls" of the floppy,
it cached all those blocks needed to do that (FAT table, filenames,
etc.), and when you cat'ed a file later it probably already had those
blocks in memory.  Remember that a floppy is pretty small, and it
can quite easily become entirely cached.

If only part of the floppy is cached and it needs to read more, but
you've removed the floppy without unmounting, you'll get errors.

One of the things to be careful of is writing to floppies.  Writes are
often delayed, being stored in cache first.  Now if you properly
unmount the floppy before removal the pending writes are flushed
to the disk.  But you can force this at any time by using the
sync(1) command.

If you go underneath the filesystem layer and directly at the raw
device (say with the dd(1) command), you'll bypass this caching.

Deron Meranda


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux