Stop Microsoft

Operating Systems => Linux and UNIX => Topic started by: Calum on 18 August 2002, 00:36

Title: disk full up!!! why???
Post by: Calum on 18 August 2002, 00:36
right, i filled up my floppy disk with stuff (using linux) and then i used rm to delete it all, except one file that uses 38 bytes. When i try to copy stuff onto the disk, i get this message: "no space left on device", in desperation i reboot into windows, and find explorer.exe telling me that there is 714kb used out of a possible 714kb. Now since winME does not format 720 kb disks, i have to reboot into linux to even do that. i do not want to format every time i want to use the disk again, what is the matter here? i use supermount by the way, does this make any odds?

why?

thanks............
Title: disk full up!!! why???
Post by: creedon on 18 August 2002, 04:06
quote:
Originally posted by Calum:
right, i filled up my floppy disk with stuff (using linux) and then i used rm to delete it all, except one file that uses 38 bytes. When i try to copy stuff onto the disk, i get this message: "no space left on device", in desperation i reboot into windows, and find explorer.exe telling me that there is 714kb used out of a possible 714kb. Now since winME does not format 720 kb disks, i have to reboot into linux to even do that. i do not want to format every time i want to use the disk again, what is the matter here? i use supermount by the way, does this make any odds?

why?

thanks............

Stab in the dark; could it be that, since everything is seen as a file in Linux, you have to delete all the data on the disk in order for Linux to see it as an empty file?  I know that sounds stupid, but it kinda makes SOME sense.
Feel free to flame me on this one.
Title: disk full up!!! why???
Post by: voidmain on 18 August 2002, 08:42
How are you copying files to the floppy? Are you mounting the floppy disk then copying files to it, then deleting files and removing the disk without first "unmounting the disk"?  In Linux (and most other UNIX systems) a lot of IO is cached (delayed writes).  Makes things much faster.  However, if you remove a disk without unmounting it then your "deletes" may have been cached and never actually occured.  Also, the "sync" command will flush all of the cached disk IO.
Title: disk full up!!! why???
Post by: creedon on 18 August 2002, 19:39
quote:
Originally posted by VoidMain:
How are you copying files to the floppy? Are you mounting the floppy disk then copying files to it, then deleting files and removing the disk without first "unmounting the disk"?  In Linux (and most other UNIX systems) a lot of IO is cached (delayed writes).  Makes things much faster.  However, if you remove a disk without unmounting it then your "deletes" may have been cached and never actually occured.  Also, the "sync" command will flush all of the cached disk IO.
YEAH!  What HE said!!!
Title: disk full up!!! why???
Post by: Calum on 13 September 2002, 15:06
quote:
Originally posted by VoidMain:
How are you copying files to the floppy? Are you mounting the floppy disk then copying files to it, then deleting files and removing the disk without first "unmounting the disk"?  In Linux (and most other UNIX systems) a lot of IO is cached (delayed writes).  Makes things much faster.  However, if you remove a disk without unmounting it then your "deletes" may have been cached and never actually occured.  Also, the "sync" command will flush all of the cached disk IO.


aha! something like this is most likely the problem, however i am not doing any of this disk hotswapping that you suggest. i am using supermount for the floppy and cd drives, which is supposed to make the mounting and unmounting transparent in the same way as they are in windows (most of the time). It works fine with the CD drive, where the system gets a message every time you eject or put a new CD in, but with the floppy it is a little odder. i can not umount or mount unless root, with supermount, and if i do either of those, supermount no longer attempts to mount and umount for me and i must do all of that by hand.

nevertheless, i am not doing anything unusual. in many cases i have shutdown the computer with a 'shutdown -h now' while the floppy is still in the drive, so the system should have had ample time to complete its de-caching.

Another problem has arisen in a similar vein:

when i try to copy or move files to or from my floppy drive using konqueror or xftree, and i think galeon as well (or whichever the gnome file manager thing is), i sometimes get the computer totally lock up in the middle of the operation. desktop freezes, mouse does not move cursor, ctrl-alt-backspace does not work, ctrl-alt-f1 does not work, ctrl-alt-del does not work, and i need to literally power off and reboot, which causes an fsck. i cannot recall ever having this problem while using 'cp' from a prompt or an xterm, and it only happens occasionally. any idea what's going on?

the case on my (onboard laptop) floppy drive is a little cracked and sometimes leads the system (whether it be windows or linux) to think that the disk is write protected when it is not. this is not usually a problem, once it realises it is not write protected, it carries on fine.

this morning, for example, i copied a folder of perl tutorials onto my floppy using konqueror, then i tried to copy a folder of C++ tutorials too, same circumstances, and... total freeze up, requiring reboot.

any ideas? Thanks, folks...
Title: disk full up!!! why???
Post by: Calum on 13 September 2002, 15:07
ps, re: that caching thing, is there a way to make linux perform all the deletes and so on in its cache to get them out of the way, by entering some command? also, is there a way to automate it, so it does it at , for example, ten minute intervals?
Title: disk full up!!! why???
Post by: flap on 13 September 2002, 15:19
quote:
Originally posted by VoidMain:
Also, the "sync" command will flush all of the cached disk IO.
Title: disk full up!!! why???
Post by: Calum on 13 September 2002, 15:46
yes, yes, yes! we're not all perfect you know!  ;)    :rolleyes:
Title: disk full up!!! why???
Post by: Master of Reality on 13 September 2002, 17:10
quote:
Originally posted by Calum/ halfbob:
yes, yes, yes! we're not all perfect you know!   ;)      :rolleyes:  

I am.... so is Bob. We will have a utopia, Bob.
Title: disk full up!!! why???
Post by: Calum on 13 September 2002, 18:49
ta, folks! now any ideas about my hideous copy/move/uh-oh-it-froze-again dilemma?
Title: disk full up!!! why???
Post by: voidmain on 13 September 2002, 19:53
I have no idea what could be causing your "freeze" problem.  Never seen such a thing. But as far as automount. Yes it will automount the floppy if you have it so configured but if you press the eject button while it's mounted you are going to have problems as there is no way the system can tell when you are planning on pressing the eject button. With CDs there is an "eject" command which will unmount the CD before ejecting.

There are several ways you can unmount the disk as a normal user. I would suggest the best way is to add the "user" tag in the options in /etc/fstab in the entry for your floppy. Now since you are using KDE if you have a floppy device ICON on your desktop you should also get the "unmount" option when you right click on it.

I suspect the "freeze" problem might be associated with ejecting the floppy while it is mounted and KDE expects to still see the file system there and it would have to wait for a time-out (could be a very long time).  Maybe I've never run across this problem because I always unmount before ejecting.. I don't know if there is a way to set a timeout to a lower setting, or what would even need to be adjusted.
Title: disk full up!!! why???
Post by: Pantso on 13 September 2002, 20:02
Ah! Unmounting. Might seem like one of those Linux oddities at first, but it's a very important and practical characteristic. It could prove to be a very important feature in a multi-user enviroment as well, where you have several programs and users wanting access to the same medium at the same time.

Basically what mount does is to incorporate or register the medium on the directory tree. And as void main said, never take the medium out of the drive before you unmount because your system would propably freeze.
Title: disk full up!!! why???
Post by: Calum on 13 September 2002, 22:16
voidmain, thank you for your thoughts however i think i may have inadvertantly handed you the wrong end of the stick,

i use XFce now as my desktop, so cannot have icons on the desktop, now the freezing i experience happens immediately a couple of seconds after i attempt to drag and drop from a /mnt/home/ window onto a /mnt/floppy window, but it only happens sometimes. maybe 20-30% of the time. it also happens in other file browsers too.

it's not an X thing either, and the floppy drive does not spin while doing it either.

do you think this may also be a caching issue? some sort of loop? where the files to be transferred get cached but do not get put on the disk, and maybe the data all back up against itself?

just a wild stab in the dark.

thanks for the thoughts anyway, chaps!  :D
Title: disk full up!!! why???
Post by: voidmain on 13 September 2002, 22:32
Does the same thing happen in KDE?  It should have nothing to do with caching because that is all done well below the window manager level and is something that shouldn't even be known to the window manager. If it doesn't have problems copying files to the floppy at a shell prompt or from any other Window manager then I would suggest the problem lies with XFce. Now, since the floppy is a much slower device maybe that is exposing a problem with XFce. Let me know if the problem also exists outside of XFce and I'll do a little research for ya.
Title: disk full up!!! why???
Post by: KernelPanic on 13 September 2002, 23:00
this is probably completely wrong (is it void main?) but couldnt you use the CLI copy command in a terminal window and copy from /home/calum to /dev/fd0.
Title: disk full up!!! why???
Post by: voidmain on 13 September 2002, 23:07
Well, you wouldn't want to copy to /dev/fd0 as that is the raw device. You would first want to mount the floppy ("mount /mnt/floppy" for instance), then copy files to the floppy:

$ cp somefile.txt /mnt/floppy

Depending on your mount options in /etc/fstab as to whether your normal user account has permissions to write to the floppy. But if it works there, it should work in XFce. Of course I do all file operations from a shell so...
Title: disk full up!!! why???
Post by: Sleeping Dog on 15 September 2002, 21:51
Just a Diagnostic Suggestion

On your dual boot system, try loading DrDOS and a DOS utility called LREAD (if you have a little compatable space.)  Using LREAD under DrDOS you can view, modify, copy, etc. UNIX and LINUX files.  Try copying the file(s) in question to the floppy.  This will give you a good indication whether your issue is hardware or formatting related.  It might help you to at least eliminate one or more of the possibilities.

Just a thought.  Hope that it helps.

Sleeping Dog
Title: disk full up!!! why???
Post by: Centurian on 17 September 2002, 08:05
Hey Calum,

To me this sounds simular to a problem I had a while back. I also removed a floppie without unmounting it (I was in a hurry and just didn't think about it) and the entire system froze up. Nothing worked at all. I had to hard boot the system. After that the system became slower and slower as time passed. It was like the system was becoming more and more loaded down as time went on. After 5 days and dozens of reboots this still continued so I decided that something serious was wrong. (Kernel damage maybe not sure) I reformatted the linux disks and reinstalled Mandrake 8.1. After that it started working perfectly again. To say the least I have never again forgotten to unmount a drive.  (http://smile.gif)  I use usermount now all the time.
Title: disk full up!!! why???
Post by: Centurian on 17 September 2002, 08:29
Been sitting here thinking about this since I posted and maybe I can explain why the problem exists.

In dos everytime you access the floppie it mounts it, does what you ask of it, then unmounts the floppie. For CD's when the CD is put in the drive it mounts and when it come out it unmounts.

Linux expects you to tell it when you mount/unmount a floppie or CD. It makes no checks but simply assumes you know what you are doing. That could potentially cause alot of problems. Consider this now you remove a floppie without unmounting it then the computer continues to think it is mounted. I don't know if linux unmounts floppies at shutdown or not but somehow I doubt it does. That would have the potential to cause an endless loop within linux which would consistently slow down the computer and would cause freezes and other crashes as it slowly eats up memory. The thing there is that although after reboot the system sees the floppie as unmounted but I am guessing it also sees another non-existant floppie that is still mounted and continually attempts to access that floppie.

If that is correct it could cause an infinite amount of problems over time. In the almost 1 year that I have been using linux that is the only serious flaw I have seen in it. I know it caused me to re-install.
Title: disk full up!!! why???
Post by: mobrien_12 on 17 September 2002, 21:15
You might want to start using mtools for your simple floppy disk i/o.

mdir
mdel
mcopy
mformat

etc etc man mtools
Title: disk full up!!! why???
Post by: Calum on 17 September 2002, 14:52
hmm. the crashes do not occur because i take the disk out without unmounting it. they occur when i copy, sometimes.

to check whether it is a problem in kde, i will have to use kde for a while instead of xfce (since the problem is erratic), which i will do for a week or two, to see if the problem persists.

re: rebooting after freezing causing mounting difficulties, well this may be the case, anybody have any ideas how to check/fix this?
Title: disk full up!!! why???
Post by: Calum on 12 October 2002, 22:13
okay. i have been using kde for a few weeks. Now. the freezing problem happens every now and again for NO REASON. last night it happened while i was typing in a reply to this bulletin board, and today it happened while i was trying to copy a file from one directory to another on the hard drive.

Now when this happens the screen freezes, and ctrl-alt-backspace does not restart X. xtrl-alt-f1 does not change me to a text prompt, and ctrl-alt-del does nothing. i need to hard reboot using the power button to make it work. when i do this, i get an fsck which, after going up to about 89%, tells me to run it again in non interactive mode. at this point it hangs, requiring another hard reboot. the second time the same thing happens except that after exiting at 89%, i get asked if i want to run fsck in non interactive mode, y/n to which i answer yes.

Not good, anybody know how to sort this?
Title: disk full up!!! why???
Post by: Calum on 14 October 2002, 15:50
no takers?
Title: disk full up!!! why???
Post by: Calum on 14 October 2002, 18:51
it doesn;t. i have been fighting with windows millenium for a year or two now, i am familiar with its MANY idiosyncracies. Unlike windows 2000, windows 98 and so on, that is not one of its functions.

also, your comments about linux being duff and so on are pretty redundant, and are too late. My most recent post showed that the disk thing was not the cause, and i am beginning to suspect that it is a hardware fault, possibly something to do with my video card, possibly something to do with the motherboard (since the video card is integrated, and since these SiS chips are known to be full of hardware bugs anyway i am not surprised).

A N Y W A Y . . . . .
i have since installed GNU automount and amd and have had NO problem with floppies whatsoever, it seems that Mandrake supermount is the flaky product, and what with my version of it being about a year old, i will be eager to see how the new version that comes with mandake 9.0 fares.

i think you and gooseberry clock should get together and have an irrelevancy fest, although i appreciate that you are nowhere near as irritating or as irrelevant as him, you seem to be coming close today...
Title: disk full up!!! why???
Post by: Calum on 14 October 2002, 21:20
hey, zombie, as luck and the gods would have it i just had EXACTLY THE SAME PROBLEM in windows 2000 on an IBM T22. That's some of the most normal, middle of the road hardware and software, so what's the deal? it must just be my typing style i think...

either that or windows is shit... no, couldn't be that, could it? NOW, does anybody have a sensible answer to my linux related question?

thanks in advance...
Title: disk full up!!! why???
Post by: Nobber on 13 November 2002, 00:25
I don't have a sensible answer, but I can sympathise with you! My other half uses Mandrake 8.2 on a pretty standard 3-year-old desktop machine, and she kept having problems copying stuff to floppies from within Konqueror. The machine would completely lock up just as you described. Turning off supermount for the floppy drive appears to have solved the problem, but of course that means you have to be careful to unmount a floppy disk after using it, which can be a bit irksome.

How's your experience with Mandy 9.0 been?
Title: disk full up!!! why???
Post by: Calum on 13 November 2002, 01:34
very good, but no major innovations over 8.2. I can't complain, it cost me
Title: disk full up!!! why???
Post by: DC on 13 November 2002, 05:05
quote:
Originally posted by Ex Eleven / b0b:
I guess you could put sync in your /etc/crontab...

Sure... but useless. The disk is synchronized once in a while anyway - sync and unmount just forces it at *that* moment. So you don't need to automated - it does it for you! (wow, technology these days...)

Zombie: the system doesn't crash when you don't unmount, the FS gets destroyed if you're unlucky (which isn't that bad on floppies usually).
And Linux can format disks in whatever format you want - even 1.7MB (if the disk supports that - mine does for example).

Centurion, all disks are remounted at shutdown, even disks. And, due to the nature of mounts, there is no way in hell it 'saves' mounts, so it will not see a ghost-mounted floppy. Your endless loop is also bogus - if it can't sync the changes to disk it simply doesn't do that.

Worst case: you mount a floppy, change stuff, eject it (without unmount), insert another floppy, and unmount it - changes to the *first* disk is written to the second disk, trashing the first or both disks. At NO point is memory, the system in general, or other filesystems affected in ANY WAY.
Title: disk full up!!! why???
Post by: voidmain on 13 November 2002, 05:17
You are correct that the kernel will sync the disks periodically during low activity. Also the "umount" command will cause an automatic sync prior to the actual unmount.

But there is mount cache that keeps track of what file systems are currently mounted. It's /etc/mtab. If you eject a floppy or CD without unmounting it the entry will still be in /etc/mtab and the system will expect there to be a file system under that mount point. If there isn't then you most certainly will get at minimum I/O errors, a sync will certainly not be able to flush the cached writes, etc.

But you are correct that it will not cause a problem with other file systems. Maybe the leftover entry in /etc/mtab is what he was referring to as a "ghost". Usually manually removing that entry from /etc/mtab. For instance when you type "mount" to see what file systems are currently mounted, it gets it's info from /etc/mtab.

[ November 12, 2002: Message edited by: void main ]

Title: disk full up!!! why???
Post by: DC on 13 November 2002, 05:25
quote:
Originally posted by void main:
If you eject a floppy or CD without unmounting it the entry will still be in /etc/mtab and the system will expect there to be a file system under that mount point. If there isn't then you most certainly will get at minimum I/O errors, a sync will certainly not be able to flush the cached writes, etc.

But you are correct that it will not cause a problem with other file systems. Maybe the leftover entry in /etc/mtab is what he was referring to as a "ghost". Usually manually removing that entry from /etc/mtab. For instance when you type "mount" to see what file systems are currently mounted, it gets it's info from /etc/mtab.

[ November 12, 2002: Message edited by: void main ]



Well yes - that happens in the worst case scenario I presented. But that effects very little, at most one other disk in the same device. And mtab isn't used during a reboot, that was the ghost he was talking about.
Title: disk full up!!! why???
Post by: beltorak0 on 13 November 2002, 11:22
a few random shots in the dark....

in slackware, the startup script (rc.S) deletes "/etc/mtab" since any info there is bound to be out of date.  I'm not sure if the other distros do it, or what the Sys V startup script is; check your inittab.  hence, no mount info is carried across reboots.  (well, almost, but that is an entirely different story.)

the up to date mount table is "/proc/mounts", but i don't know how that will help you.  Anyway, since it is kernel space, it will be more up to date than "/etc/mtab".

the man page for mount states that a corrupt file system might crash the system....

how are your cpu temps?  I only ask this because you said that is begining to happen more sporradically, not just when doing disk io.  I know nothing of laptop internals, but you might want to oil the fans and check the heat sinks just in case....

enough of my ignorant ramblings.

-t.