How does filling a disk to capacity affect performance?

Rick Schubert rns at se-sd.sandiego.NCR.COM
Wed Apr 13 07:17:08 AEST 1988


In article <92 at iravcl.ira.uka.de> fsinf at iravcl.ira.uka.de writes:
>In article <460 at osupyr.mast.ohio-state.edu>, czei at osupyr.mast.ohio-state.edu (Michael S Czeiszperger) writes:
>I've heard (but not verified) you can crash *every* unix-system using the
>CP-command when there is not enough space on disk. CP will not check
>whether the disk is full and overwrite blocks which are not free. The original
>data will be lost; also the machine is likely to go down.
>
>If this isn't right, please correct.

You will probably get tons of corrections on this, but I'd like to add some
information that I think may be useful in this and other situations.
Commands like "cp" are just programs.  In general (i.e. unless the file is
setuid to "root"), such programs cannot perform magic.  That is, they cannot
do anything that you couldn't write a program to do if you knew how.
"cp" may be "dumb" (not meant to be derogatory to "cp" or to people who
are unable to speak) enough not to check whether or not a write was successful
(I haven't bothered to test whether or not it is because that's not my point),
but it doesn't have the permission to start writing over blocks that are not
free, just as you could not naively (or maliciously) write a program that
would do that kind of damage to the system (you could write programs that
would do damage to your files and to other unprotected files, however) --
UNIX(tm) does provide a reasonable (no flames, please) amount of security
in this area.  One thing I think is nice about UNIX in terms of understanding
and using it IS that all commands are just programs (even the various shells),
and, except for things that need to run as root (or some other userid),
any program can do anything that a "command" can do.

-- Rick Schubert



More information about the Comp.unix.wizards mailing list