sag@lemm.ee to Linux@lemmy.ml · edit-26 months agoLinux Directory Structure - FHSlemm.eeexternal-linkmessage-square188fedilinkarrow-up11arrow-down10cross-posted to: [email protected]
arrow-up11arrow-down1external-linkLinux Directory Structure - FHSlemm.eesag@lemm.ee to Linux@lemmy.ml · edit-26 months agomessage-square188fedilinkcross-posted to: [email protected]
minus-squarecaseyweederman@lemmy.calinkfedilinkarrow-up0·6 months agoProbably so that you don’t accidentally write to a directory by mistake when it isn’t mounted, and then lose access when you mount something over it, all while services are looking for files that are only there sometimes.
minus-squareToribor@corndog.sociallinkfedilinkEnglisharrow-up0·6 months agoI’ve had exactly this happen to me. It was my own fault but it took a bit of work figure out.
minus-squarebaseless_discourse@mander.xyzlinkfedilinkarrow-up0·edit-26 months ago/run is a temporary fs, so if the mount, filesystem or even the entire system crashed, all the mounted data will be cleaned up after a reboot. On the contrary, if the mount crashed, it might leave a folder or data on /media, making subsequent mount problematic. Here is a well-written comment about the rationale behind this mount point: https://www.reddit.com/r/linuxquestions/comments/tzo984/comment/i40e2za/
What’s the reason?
Probably so that you don’t accidentally write to a directory by mistake when it isn’t mounted, and then lose access when you mount something over it, all while services are looking for files that are only there sometimes.
I’ve had exactly this happen to me. It was my own fault but it took a bit of work figure out.
/run is a temporary fs, so if the mount, filesystem or even the entire system crashed, all the mounted data will be cleaned up after a reboot.
On the contrary, if the mount crashed, it might leave a folder or data on /media, making subsequent mount problematic.
Here is a well-written comment about the rationale behind this mount point: https://www.reddit.com/r/linuxquestions/comments/tzo984/comment/i40e2za/