If a disk is gone (USB maybe, or NFS), and I call df, or any program that looks onto the disk, it hangs forever and I can't kill the process. Is this behaviour necessary and why?
Up until a few years ago it would panic(9). Removing filesystems when they're mounted is never a good idea. It's like pulling the rug from under the table.
It is unclear what you mean here. The system does not distinguish between "system" and "non-system" disks; if a filesystem is in use, then suddenly disappears, bad things happen.
You should provide more information as to what is happening and what behavior you expect to see. Check your logs to see what might be happening with the drive/filesystem in question. If a disk is properly removed, the system will no longer see it and no operation will be performed on it. What you are describing is behavior that occurs when a physical disk is improperly removed, which occurs under one of two circumstances: either you removed it improperly yourself, or the hardware/firmware failed in some way. If the filesystem is an NFS share then there is a network connection problem, and the process probably hangs because it is waiting while the system attempts to re-establish a connection for the mount point but cannot. Any of these cases is undesirable and should be avoided or fixed at the source. It is not reasonable to expect the operating system to be reliable when the hardware it performs operations on is not.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.