# When disk disappears I have to reboot?



## laufdi (Nov 24, 2015)

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?


----------



## SirDice (Nov 24, 2015)

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.


----------



## laufdi (Dec 4, 2015)

and `zpool export -f` hangs forever, too.
It feels like Windows 98, not like a stable system.

... not even `reboot` works, I have to walk there and press the button ...


----------



## ANOKNUSA (Dec 5, 2015)

If disks are just disappearing and you can't perform basic filesystem maintenance, you've probably got a hardware problem.


----------



## laufdi (Dec 5, 2015)

Is it forbidden to have a hardware problem? I would expect from a stable system to survive non-system disks failing?


----------



## ANOKNUSA (Dec 5, 2015)

laufdi said:


> I would expect from a stable system to survive non-system disks failing?



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.


----------

