What Happens When Writing to a Completely Full Hard Drive?

Click For Summary

Discussion Overview

The discussion revolves around the behavior of a computer system when attempting to write data to a hard drive that is completely full. It includes considerations of operating system responses and programming implications, particularly in the context of a Fortran program.

Discussion Character

  • Technical explanation, Debate/contested

Main Points Raised

  • One participant questions what happens when a Fortran program attempts to write to a full hard drive, specifically whether existing files would be overwritten.
  • Another participant asserts that the issue is related to the operating system rather than the programming language, stating that a write request exceeding available disk space will fail on reasonable operating systems.
  • A further contribution clarifies that in DOS and Windows, the number of bytes written will be less than requested if the disk is full, and may return zero if no space is available.
  • A repeated assertion emphasizes that the command to write will fail if the hard drive is full.

Areas of Agreement / Disagreement

Participants generally agree that writing to a full hard drive will result in a failure of the write command, but there is some debate about the specifics of how different operating systems handle such situations.

Contextual Notes

The discussion does not resolve the nuances of how various operating systems manage write requests when disk space is exhausted, nor does it explore the implications for data integrity or recovery.

JoAuSc
Messages
197
Reaction score
1
Let's say you're running a Fortran program that writes to the hard drive. What happens when the hard drive is completely full? Do other files get written over?
 
Technology news on Phys.org
This is an operating system issue, not a Fortran issue. A write request that would more than consume all available disk space will fail on any reasonable operating system.
 
For DOS and Windows, the returned count of bytes written will be less than requested, and will be zero if the disk is already full.
 
JoAuSc said:
Let's say you're running a Fortran program that writes to the hard drive. What happens when the hard drive is completely full? Do other files get written over?

Your command will fail.
 

Similar threads

  • · Replies 2 ·
Replies
2
Views
3K
Replies
13
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
Replies
2
Views
2K
Replies
3
Views
2K
  • · Replies 9 ·
Replies
9
Views
2K
  • · Replies 49 ·
2
Replies
49
Views
5K
  • · Replies 32 ·
2
Replies
32
Views
4K
  • · Replies 2 ·
Replies
2
Views
2K
Replies
69
Views
11K