Hacker News new | past | comments | ask | show | jobs | submit login

> The 1TB SSD is formatted as a btrfs file system and mounted to /storage.

That makes me cringe. If a server's purpose involves serving files, those files should go in /srv.

https://tldp.org/LDP/Linux-Filesystem-Hierarchy/html/srv.htm...




Would /srv be for files that are served up mostly unmodified? Or would you also put the database for a web application under, for example /srv/db? In a sense, the database contains objects that get served up but they get transformed by the web app, so it seems they should go into something under /var (like /var/lib/data/[db_vendor_name]).


> This main purpose of specifying this is so that users may find the ___location of the data files for particular service,...

If I read the docs right, if a database needs to keep data permanently, /srv seems to be an ideal place. It's not restricted to static files being served on a network, just where data (regardless of format or transformations) should be stored.

More abstractly, if any daemon, service, or file share needs to store any data that is read/written to/from a network, that data should be in /srv. Probably.


[dead]


Meanwhile, your $HOME's dotfiles want a word about cleanliness...

And your /usr/bin wants to argue with /usr/local/bin and both of those cringe when they see /bin.

No, mentioning and sticking to standards is a good thing and I think is very on-topic.


The good thing about standards is that there are so many of them to chose from.

Besides, if a man wants to have /storage on his owned machine, who are we to tell him otherwise?


> if a man wants to have /storage on his owned machine, who are we to tell him otherwise?

Nothing wrong with a man putting /storage on his owned machine.

But if I were using my own machine and I put /storage there (actually, I used /opt/<site>), it would be because I didn't know there was a standard place for things. Then someone told me about /srv and its purpose. So now I use /srv even on my own machine so that I'm familiar with /srv in a professional environment.


I'm all for filesystem standards but "serving" is such an ephemeral concept that I don't think it makes sense to mandate that "files" that are "served" must be mounted under /srv. That's just being excessively pedantic.


Yup, and while I'm not likely to ever again build a Linux fileserver, TIL.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: