Discussion:
[fhs-discuss] Question regarding "correct" filestructure
Harald Heigl
2012-02-29 23:44:40 UTC
Permalink
Hi,
I don't know if this is the right list for my question, but I think many
people know FHS quite well here, so I'll give it a try.

I have a root disk and some additional discs: disc1, disc2 and some folders
in these discs (audio, video, photo, .)
What would be the proposed way?
1) Mount my discs to /media/discs1 and /media/discs2
2) Mount them again from /media/discs1/video to /srv/video
3) Mount them further to /srv/samba/video and /srv/nfs/video

Or should I mount discs1, disc2 directly to /srv and then do my remounts
from there? I've also thought about /mnt, but FHS says I shouldn't put
subfolders there, correct?

The specification about /srv seems quite unclear to me. It more or less
states "The methodology used to name subdirectories of /srv is unspecified
as there is currently no consensus on how this should be done.", this was
the information back in 2003 with version 2.3 and now 9 years later no real
change in draft 3.0, is there really no "consensus"?

So what would be best practice in your opinion, how do you handle that? If
this is the wrong list for such questions, please provide me others lists or
forums (I've read through ubuntuforums, cause I'm using Ubuntu amongst
others, but everyone seems to have his own "standard")

Thanks in advance!
Jan Engelhardt
2012-03-01 07:45:57 UTC
Permalink
Post by Harald Heigl
Or should I mount discs1, disc2 directly to /srv and then do my remounts
from there? I've also thought about /mnt, but FHS says I shouldn't put
subfolders there, correct?
You can put Directories into /mnt, but you need to be aware that whatever
you put there may not survive a reboot.
Post by Harald Heigl
The specification about /srv seems quite unclear to me. It more or less
states "The methodology used to name subdirectories of /srv is unspecified
as there is currently no consensus on how this should be done.", this was
the information back in 2003 with version 2.3 and now 9 years later no real
change in draft 3.0, is there really no "consensus"?
Given all the bikeshedding going on, one wonders if there is any consensus
left.
But basically, /srv is just like /home ("do whatever you like").
/var/www just was not considered the right place, since /var is
for machine-specific local data, which webpages and such generally are not.
Post by Harald Heigl
So what would be best practice in your opinion, how do you handle that?
Turns out that on a naslike device, I mounted all extra disks into
/mnt/<shortname> directories (because that's short), and later only bind
mounted them into /srv/ftp/<descriptive name, but still a directory not a
/folder :-p>.
Randy Kramer
2012-03-01 14:52:28 UTC
Permalink
Post by Jan Engelhardt
You can put Directories into /mnt, but you need to be aware that whatever
you put there may not survive a reboot.
I don't understand--I can't recall ever having to recreate a (sub)directory
in /mnt after a reboot.

If you're referring to actually mounting a device to such subdirectories,
afaik, if you do the mount from fstab (and if the device is present on a
reboot), that mount will survive (i.e., be remounted). If you do a mount at
the CLI, you'd have to remount the directory after a reboot.

But, afaik, all of those statements are true of any directory or mount,
whether it is under /mnt or somewhere else.

Randy Kramer
Harald Heigl
2012-03-01 17:45:52 UTC
Permalink
Hi,
thanks for your fast answers!
-----Urspr?ngliche Nachricht-----
Von: Jan Engelhardt [mailto:jengelh at medozas.de]
Gesendet: Donnerstag, 01. M?rz 2012 08:46
An: Harald Heigl
Cc: fhs-discuss at lists.linux-foundation.org
Betreff: Re: [fhs-discuss] Question regarding "correct" filestructure
Post by Harald Heigl
Or should I mount discs1, disc2 directly to /srv and then do my remounts
from there? I've also thought about /mnt, but FHS says I shouldn't put
subfolders there, correct?
You can put Directories into /mnt, but you need to be aware that whatever
you put there may not survive a reboot.
I never heard of that before, I used /mnt sometimes, as far as I remember
even automount uses subdirs here. Is it possible that you mix this with /tmp
dir (for example Ubuntu clears the /tmp dir on every reboot, fedora
doesn't)?
Post by Harald Heigl
The specification about /srv seems quite unclear to me. It more or less
states "The methodology used to name subdirectories of /srv is unspecified
as there is currently no consensus on how this should be done.", this was
the information back in 2003 with version 2.3 and now 9 years later no real
change in draft 3.0, is there really no "consensus"?
Given all the bikeshedding going on, one wonders if there is any consensus
left.
But basically, /srv is just like /home ("do whatever you like").
/var/www just was not considered the right place, since /var is
for machine-specific local data, which webpages and such generally are not.
Post by Harald Heigl
So what would be best practice in your opinion, how do you handle that?
Turns out that on a naslike device, I mounted all extra disks into
/mnt/<shortname> directories (because that's short), and later only bind
mounted them into /srv/ftp/<descriptive name, but still a directory not a
/folder :-p>.
Ok I think I'll do something similar using /mnt and /srv. I just was a bit
unclear about the /mnt and the /media dir, while /mnt "should be used for
temporarily mounting", /media should be used for "removable media", but in
my case it would be neither, the discs will be mounted there all the time
...


Another question:
I have some own scripts and config-files which only will be used on one
machine, but also other scripts which will be used on multiple machines
(mainly ubuntu and fedora). I've thought about putting them all in
/usr/local and syncing /usr/local between all machines (or I could mount the
same /usr/local to all computers). That will work ok for everything that
should be on multiple machines, but what do I do with my real local scripts?
Put them into /root or in a subdir like /usr/local/local which I don't sync?
Or something totally different? How would you do that?

Thanks again,
Harald
Jeff Licquia
2012-03-01 19:38:31 UTC
Permalink
Post by Harald Heigl
Hi,
I don't know if this is the right list for my question, but I think many
people know FHS quite well here, so I'll give it a try.
I have a root disk and some additional discs: disc1, disc2 and some folders
in these discs (audio, video, photo, .)
What would be the proposed way?
1) Mount my discs to /media/discs1 and /media/discs2
2) Mount them again from /media/discs1/video to /srv/video
3) Mount them further to /srv/samba/video and /srv/nfs/video
/media is more for transient/removable things, like USB sticks or DVDs.
On most modern distros, /media is handled automatically by software.

If the disks are permanent, mount them wherever it makes sense. It
sounds like somewhere under /srv makes the most sense there.
Post by Harald Heigl
Or should I mount discs1, disc2 directly to /srv and then do my remounts
from there? I've also thought about /mnt, but FHS says I shouldn't put
subfolders there, correct?
FHS (both 2.3 and the draft 3.0) basically says "installers and distros
shouldn't touch /mnt". That should make it safe for you to use, either
directly or with sub-directories.
Post by Harald Heigl
The specification about /srv seems quite unclear to me. It more or less
states "The methodology used to name subdirectories of /srv is unspecified
as there is currently no consensus on how this should be done.", this was
the information back in 2003 with version 2.3 and now 9 years later no real
change in draft 3.0, is there really no "consensus"?
To the extent that a consensus has emerged, it seems to be centered
around organizing it by service. This is probably because the main
sources of "measuring consensus" are the distributions, who won't
obviously be creating stuff like /srv/dropbox or
/srv/jims-old-home-directory.

That said, I don't think there's any need to follow the distros
slavishly unless there's some benefit. If symlinking or bind-mounting
to /srv/nfs gives you automatic NFS sharing (for example), then great.
Otherwise, I'd just put /srv/disc1 (or whatever) into your /etc/exports.
Ditto for Samba config.
--
Jeff Licquia
The Linux Foundation
+1 (317) 915-7441
licquia at linuxfoundation.org

Linux Foundation Events Schedule: events.linuxfoundation.org
Linux Foundation Training Schedule: training.linuxfoundation.org
Harald Heigl
2012-03-11 22:33:04 UTC
Permalink
Hi!
Just wanted to say thanks for shedding some light in my issue.
I've changed my system last week and now I use /srv/fs/partiion1 and
/srv/fs/partition2 for permanent mounting local partitions on my fileserver.
What I share on samba and nfs is a little bit different, so I still use some
remounting on /srv/nfs and /srv/smb, but having all organized in /srv seems
to clean up the system quite a bit and if I search something directly on my
fileserver I only have to look at one location for now.
For now /mnt will only be used on my clients to access my shares from my
fileserver.
So this all makes more sense ...

Thanks again,
Harald
-----Urspr?ngliche Nachricht-----
Von: fhs-discuss-bounces at lists.linux-foundation.org [mailto:fhs-discuss-
bounces at lists.linux-foundation.org] Im Auftrag von Jeff Licquia
Gesendet: Donnerstag, 01. M?rz 2012 20:39
An: fhs-discuss at lists.linux-foundation.org
Betreff: Re: [fhs-discuss] Question regarding "correct" filestructure
Post by Harald Heigl
Hi,
I don't know if this is the right list for my question, but I think many
people know FHS quite well here, so I'll give it a try.
I have a root disk and some additional discs: disc1, disc2 and some folders
in these discs (audio, video, photo, .)
What would be the proposed way?
1) Mount my discs to /media/discs1 and /media/discs2
2) Mount them again from /media/discs1/video to /srv/video
3) Mount them further to /srv/samba/video and /srv/nfs/video
/media is more for transient/removable things, like USB sticks or DVDs.
On most modern distros, /media is handled automatically by software.
If the disks are permanent, mount them wherever it makes sense. It
sounds like somewhere under /srv makes the most sense there.
Post by Harald Heigl
Or should I mount discs1, disc2 directly to /srv and then do my remounts
from there? I've also thought about /mnt, but FHS says I shouldn't put
subfolders there, correct?
FHS (both 2.3 and the draft 3.0) basically says "installers and distros
shouldn't touch /mnt". That should make it safe for you to use, either
directly or with sub-directories.
Post by Harald Heigl
The specification about /srv seems quite unclear to me. It more or less
states "The methodology used to name subdirectories of /srv is
unspecified
Post by Harald Heigl
as there is currently no consensus on how this should be done.", this was
the information back in 2003 with version 2.3 and now 9 years later no real
change in draft 3.0, is there really no "consensus"?
To the extent that a consensus has emerged, it seems to be centered
around organizing it by service. This is probably because the main
sources of "measuring consensus" are the distributions, who won't
obviously be creating stuff like /srv/dropbox or
/srv/jims-old-home-directory.
That said, I don't think there's any need to follow the distros
slavishly unless there's some benefit. If symlinking or bind-mounting
to /srv/nfs gives you automatic NFS sharing (for example), then great.
Otherwise, I'd just put /srv/disc1 (or whatever) into your /etc/exports.
Ditto for Samba config.
--
Jeff Licquia
The Linux Foundation
+1 (317) 915-7441
licquia at linuxfoundation.org
Linux Foundation Events Schedule: events.linuxfoundation.org
Linux Foundation Training Schedule: training.linuxfoundation.org
_______________________________________________
fhs-discuss mailing list
fhs-discuss at lists.linux-foundation.org
https://lists.linuxfoundation.org/mailman/listinfo/fhs-discuss
Loading...