[opensuse] Filesystem Hierachy - Correct Mount Location
Hi All, I have a single 1TB disk on a server at the moment mounted at root (/). I have run out of space so I have installed a 4TB hard disk along side the existing one. I will name this new disk media so it will be /mount-location/media I am trying to work out the correct location to mount this disk. It will contain data to be server to the network e.g. music and videos. So data will not change often. I though /mnt but that is apparently for temporarily mounted filesystems. perhaps either /var or /srv Where would best practice indicate I should mount this disk? Thanks -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Le 22/10/2018 à 17:33, Paul Groves a écrit :
Where would best practice indicate I should mount this disk?
don't know for others, but I used to mount my data disks on /home/somename to keep it far out of /, much easier for backup or upgrades jdd -- http://dodin.org -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/10/18 11:33 AM, Paul Groves wrote:
Hi All,
I have a single 1TB disk on a server at the moment mounted at root (/). I have run out of space so I have installed a 4TB hard disk along side the existing one. I will name this new disk media so it will be /mount-location/media
I am trying to work out the correct location to mount this disk. It will contain data to be server to the network e.g. music and videos. So data will not change often.
I though /mnt but that is apparently for temporarily mounted filesystems. perhaps either /var or /srv
Where would best practice indicate I should mount this disk?
I feel your pain. Decades ago I kept suffering from this, then I used IBM's AIX and became a convert to the Veritas System. In Linux terms this is LVM. You format a drive as a LVM container and you get a new kind of flexibility. Not only does the whole issue of preallocation of partition sizes (and hence location) go away, but files, not just file systems, can span multiple drives in a variety of way. Not just RAID, but even simple thing like striping or overflow. You need a bigger partition? So long as there is space in the set of all containers (that means *all* drives) you can grow the partition and hence the tile system on it. (Some file systems let you shrink as well<smirk>). I made the decision to put everything except a swap area and /boot under LVM on my primary drive. That included the "/" as well as separate "/home" and "/var" and stuff under "/home/anton" like "~/Photographs", so as to simplify logical backup/restore. So when I run out of space with my primary 1G drive and get 4G drive that costs about half what I paid for the old 1G, I don't have to worry about a 'mount point'. It just goes into the LVM pool and gets allocated as needed. If, perhaps, I want to convert my "~/Photographs" to a striped partition new, across both drives, them I create the new partition and came "LVM move" the old to the new, WITHOUT SHUTTING DOWN OR GOING TO SINGLE USE MODE even if I'm using the file system at the time. Yes, LVM is wonderful and solves so many issues with allocation etc etc. Converting from a drive that doesn't have LVM to a pair that does is not difficult. It just takes care and planning and like everything else, it is best to have backups. If you want to follow up on that please ask me off-line. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/10/2018 17.33, Paul Groves wrote:
Hi All,
I have a single 1TB disk on a server at the moment mounted at root (/). I have run out of space so I have installed a 4TB hard disk along side the existing one. I will name this new disk media so it will be /mount-location/media
I am trying to work out the correct location to mount this disk. It will contain data to be server to the network e.g. music and videos. So data will not change often.
I though /mnt but that is apparently for temporarily mounted filesystems. perhaps either /var or /srv
Where would best practice indicate I should mount this disk?
Anything that is not already used for something. /mnt is typically temporary mounts /media is typically automatically mounted external media /srv is typically server structures, like web or ftp. /var I don't remember the definition but is a system reserved directory. You could add your own somewhere inside. I use "/data". Thus /data/movies would be the movies hard disk. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas))
Paul, et al -- ...and then Paul Groves said... % % Hi All, Good morning! % % I have a single 1TB disk on a server at the moment mounted at root % (/). I have run out of space so I have installed a 4TB hard disk ... % % I though /mnt but that is apparently for temporarily mounted % filesystems. perhaps either /var or /srv % % Where would best practice indicate I should mount this disk? IMHO it is very much up to you. Yes, /mnt if typicall for temp stuff, but SuSE doesn't automunt anything there, so you won't be in the way. Yes, /media is often for removable ephemeral devices, but it doesn't HAVE to me. Here how my disk farm looks diskfarm:root:18:~> df -kh | grep /mnt/ /dev/md0p1 11T 8.3T 2.7T 76% /mnt/4Traid5md /dev/md127p1 1.4T 1.1T 342G 76% /mnt/750Graid5md /dev/sdd4 229G 69G 161G 31% /mnt/scratch_reiserfs /dev/sda2 128M 33M 96M 26% /mnt/slices/4reiserfs /dev/sdb2 120M 1.6M 112M 2% /mnt/slices/4ext3 /dev/sde2 122M 6.7M 115M 6% /mnt/slices/4xfs /dev/sdf2 128M 0 128M 0% /mnt/slices/4vfat /dev/sdd3 128M 33M 96M 26% /mnt/slices/7reiserfs /dev/sdg3 120M 1.6M 112M 2% /mnt/slices/7ext3 /dev/sdh3 122M 6.7M 115M 6% /mnt/slices/7xfs /dev/loop0 233G 205G 28G 89% /mnt/4Traid5md/Backups/Scrp0250-72-att1..2017-post/mnt /dev/loop1 233G 147G 87G 63% /mnt/4Traid5md/Backups/Scrp0250-72-att2..2017-post/mnt /dev/sdj1 112G 102G 11G 91% /mnt/pix (including mounting two disk-dump images -- at /mnt subdirs, you'll notice ;-) and here's how my laptop (just one drive) looks davidtg@wench:~> df -kh | grep /mnt/ /dev/sda4 64G 38G 27G 59% /mnt/windows /dev/sda3 819G 804G 15G 99% /mnt/data since I obviously favor /mnt for mount points :-) Enjoy figuring out your favorite flavor! HAND :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/22/2018 11:06 AM, Carlos E. R. wrote:
I use "/data". Thus /data/movies would be the movies hard disk.
+1 Either /data or /home/data (but with /home/data, /home must be mounted before /home/data (obviously)) For multiple drive additions /data1, /data2, etc.... -- David C. Rankin, J.D.,P.E.
On 10/22/18 11:33 AM, Paul Groves wrote:
Hi All,
I have a single 1TB disk on a server at the moment mounted at root (/). I have run out of space so I have installed a 4TB hard disk along side the existing one. I will name this new disk media so it will be /mount-location/media
I am trying to work out the correct location to mount this disk. It will contain data to be server to the network e.g. music and videos. So data will not change often.
I though /mnt but that is apparently for temporarily mounted filesystems. perhaps either /var or /srv
Where would best practice indicate I should mount this disk?
Thanks
I use purposed partitions. The video partition mounts to /home/<user>/Videos, the music partition to /home/<user>/Music, and the data partition to /home/<user>/data. Of course this requires /home to be mounted first. Previously I used mount points in /mnt, which isn't an issue with SuSE. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/22/18 6:50 PM, David T-G wrote:
diskfarm:root:18:~> df -kh | grep /mnt/ ... davidtg@wench:~> df -kh | grep /mnt/
You seem to like "df -kh". FWIW the later -h option overrides -k: case 'h': https://git.sv.gnu.org/cgit/coreutils.git/tree/src/df.c?id=6bc89f5f85fd#n159... vs. case 'k': https://git.sv.gnu.org/cgit/coreutils.git/tree/src/df.c?id=6bc89f5f85fd#n160... so 'df -kh' is identical to 'df -h'. ;-) Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 22/10/18 04:20 PM, DennisG wrote:
I use purposed partitions. The video partition mounts to /home/<user>/Videos, the music partition to /home/<user>/Music, and the data partition to /home/<user>/data. Of course this requires /home to be mounted first. Previously I used mount points in /mnt, which isn't an issue with SuSE.
Yes! PURPOSED partitions add clarity. $ ls ~anton Downloads/ lib/ mnt/ PDF/ Templates/ Desktop/ Dropbox/ logs/ MyMovies/ opt/ Photographs/ tmp/ bin/ Mail/ MyMusic/ ownCloud/ Public/ Documents/ Media/ Names/ public_html/ Of course there is infrastructure, under Documents, PDF, Desktop, MyMovies, MyMusic, Photographs. Photographs are by project or year. Each year is a mounted file system. Music is by genre, again mounted file systems where volume warrants. The same applies to movies. Of course I have localization of my own applications in ~/bin and ~/lib and relevant logging, as well as localization of ~/mnt, under which there is a symlink for USB to /var/run/media/anton/ All very flexible using LVM. $ mount (edited) /dev/mapper/vgmain-vROOT4 on / /dev/sda1 on /boot /dev/mapper/vgmain-vSRV on /srv /dev/mapper/vgmain-vVAR on /var /dev/mapper/vgmain-vOPT on /opt /dev/mapper/vgmain-vLOCAL on /usr/local /dev/mapper/vgmain-vTMP on /tmp type /dev/mapper/vgmain-vUser4 on /usr/share /dev/mapper/vgmain-vISO.JFS on /ISO /dev/mapper/vgmain-vHome on /home /dev/mapper/vgmain-vMail on /home/anton/Mail /dev/mapper/vgmain-vMedia.JFS on /home/anton/Media /dev/mapper/vgmain-vPDF.JFS on /home/anton/PDF /dev/mapper/vgmain-vMyMusic.JFS on /home/anton/MyMusic /dev/mapper/vgmain-vRocknroll.JFS on /home/anton/MyMusic/RocknRoll /dev/mapper/vgmain-vDownloads on /home/anton/Downloads /dev/mapper/vgmain-vMyMovies.JFS on /home/anton/MyMovies /dev/mapper/vgmain-vCamera on /home/anton/Photographs /dev/mapper/vgmain-vPhotoByYear on /home/anton/Photographs/ByYear /dev/mapper/vgmain-vPhoto2017.JFS on /home/anton/Photographs/ByYear/2017 /dev/mapper/vgmain-vPhoto2014.JFS on /home/anton/Photographs/ByYear/2014 /dev/mapper/vgmain-vPhoto2015.JFS on /home/anton/Photographs/ByYear/2015 /dev/mapper/vgmain-vPhoto2016.JFS on /home/anton/Photographs/ByYear/2016 /dev/mapper/vgmain-vPhoto2018.JFS on /home/anton/Photographs/ByYear/2018 Yes, I know, there are people who argue that having /boot separate makes debugging problems with / more difficult. I have never found that to be the case. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/10/2018 00.02, Anton Aylward wrote:
Yes, I know, there are people who argue that having /boot separate makes debugging problems with / more difficult. I have never found that to be the case.
It is the case IF you use btrfs, because you can not revert the boot toa previous state if it is on a different partition. -- Cheers / Saludos, Carlos E. R. (from 42.3 x86_64 "Malachite" (Minas Tirith))
Berny -- ...and then Bernhard Voelker said... % % On 10/22/18 6:50 PM, David T-G wrote: % > diskfarm:root:18:~> df -kh | grep /mnt/ % ... % > davidtg@wench:~> df -kh | grep /mnt/ % % You seem to like "df -kh". Yep! % % FWIW the later -h option overrides -k: ... % so 'df -kh' is identical to 'df -h'. ;-) Thanks, and that's a fair point. The -k is ingrained because I use it everywhere, and I prefer the -h when it's available but not all flavors have it. Meanwhile, though, there are times when I want sort-able numbers and so no human-readable help and I drop the -h, but the -k stays. % % Have a nice day, % Berny You, too! :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/23/18 4:14 AM, David T-G wrote:
% % FWIW the later -h option overrides -k: ... % so 'df -kh' is identical to 'df -h'. ;-)
Thanks, and that's a fair point. The -k is ingrained because I use it everywhere, and I prefer the -h when it's available but not all flavors have it. Meanwhile, though, there are times when I want sort-able numbers and so no human-readable help and I drop the -h, but the -k stays.
Right, -h is a GNU extension which is not necessarily available in other implementations. WRT sorting: at least if you have GNU df, then you also have GNU sort which knows 'h'-sorting (since almost 10 years now, so not available e.g. on SLES11): $ df -h | sort -k2,2h Filesystem Size Used Avail Use% Mounted on /dev/loop0 31M 31M 0 100% /FULL_PARTITION_TMPDIR tmpfs 2.0G 24K 2.0G 1% /run/user/463 tmpfs 2.0G 48K 2.0G 1% /run/user/1000 devtmpfs 9.8G 8.0K 9.8G 1% /dev tmpfs 9.8G 0 9.8G 0% /sys/fs/cgroup tmpfs 9.8G 18M 9.8G 1% /run tmpfs 9.8G 55M 9.8G 1% /dev/shm /dev/sda2 20G 16G 3.5G 82% / /dev/sda3 99G 89G 4.4G 96% /home /dev/sda5 591G 293G 298G 50% /media/big_data ;-) Admittedly, I use it more often with 'du', e.g.: $ du -hcx -d3 --threshold=+1G / | sort -h 1.1G /lib/modules 1.4G /lib 1.5G /var/tmp/build-root 2.8G /usr/lib64 3.1G /usr/share 3.3G /var/tmp 4.9G /var 8.3G /usr 15G / 15G total Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Berny -- ...and then Bernhard Voelker said... % % On 10/23/18 4:14 AM, David T-G wrote: % > % > Thanks, and that's a fair point. The -k is ingrained because I use it % > everywhere, and I prefer the -h when it's available but not all flavors % > have it. Meanwhile, though, there are times when I want sort-able % > numbers and so no human-readable help and I drop the -h, but the -k stays. % % Right, -h is a GNU extension which is not necessarily available in % other implementations. Yep. AIX is delightful in that way :-| % % WRT sorting: at least if you have GNU df, then you also have GNU sort % which knows 'h'-sorting (since almost 10 years now, so not available % e.g. on SLES11): [snip] True, and that does make things readable, but ... see above :-) Thanks for the tips, though! HAND / Guten Tag :-D -- David T-G See http://justpickone.org/davidtg/email/ See http://justpickone.org/davidtg/tofu.txt -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/10/2018 12:20, Peter Suetterlin wrote:
Carlos E. R. wrote:
I use "/data". Thus /data/movies would be the movies hard disk.
+1
If something is intended for NFS access, I usually name it /export
/data seems the simplest to me. I wonder why there is no standard mount location for secondary filesystems.. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On Tue, 23 Oct 2018 12:20:56 +0100 Peter Suetterlin <pit@astro.su.se> wrote:
Carlos E. R. wrote:
I use "/data". Thus /data/movies would be the movies hard disk.
+1
If something is intended for NFS access, I usually name it /export
I use /nfs - both on the exporting host and the importing hosts, so my programs will work on any host. For both /nfs and /data I use subdirectories for each individual filesystem/whatever. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 10/23/18 5:46 PM, Paul Groves wrote:
/data seems the simplest to me.
I wonder why there is no standard mount location for secondary filesystems..
He, he, there is one: C:, D:, etc. So on Linux one could use /c:, /d:, etc I think a 'standard' in this case would mean a self-limiting rule. :-))) Have a nice day, Berny -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/10/18 11:46 AM, Paul Groves wrote:
I wonder why there is no standard mount location for secondary filesystems..
There is. There always has been. back in the UNIX V6/V7 days the standard mount point -- this was before the advent of "/home" -- and we had disks of 2.5meg or less like the original RK03 or RK05, the "/usr" was the standard mount point. Until recently and the advent of systemd's demands, for many of us it still was. And of course now we treat "/home" as a standard. I'll leave the nature of the BtrFS "one FS to rule them all" sub-volumes as mount points to the imagination of the user. Sensibly, "/opt" and "/srv" can be though of as candidates for logical mount points. Web site files are something that can be sensibly localized. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/10/2018 17.46, Paul Groves wrote:
On 23/10/2018 12:20, Peter Suetterlin wrote:
Carlos E. R. wrote:
I use "/data". Thus /data/movies would be the movies hard disk.
+1
If something is intended for NFS access, I usually name it /export
/data seems the simplest to me.
I wonder why there is no standard mount location for secondary filesystems..
Because those filesystems are not part of "the system". It is the administrator decission. You can have /video, /audio, /photos, /documents, etc. I did that in the past, but then decided that it was easier for backups and maintenance to put them under a single directory, for example /data. Thus /data/video, /data/audio, /data/photos, /data/documents, etc. Or /data/bigdisk, /data/biggerdisk. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas))
On 23/10/2018 19:20, Carlos E. R. wrote:
Because those filesystems are not part of "the system".
Agreed. Also, several times, the original developers of UNIX back in the late '60s and early '70s picked semi-arbitrary names (e.g. /etc and /usr) that then became fossilised as permanent parts of the UNIX directory tree. After a while they stopped formalising this.
It is the administrator decission. You can have /video, /audio, /photos, /documents, etc. I did that in the past, but then decided that it was easier for backups and maintenance to put them under a single directory, for example /data. Thus /data/video, /data/audio, /data/photos, /data/documents, etc. Or /data/bigdisk, /data/biggerdisk.
Good point. 30y ago, in my 1st few jobs, we used to use /opt and then sometimes /opt2, /opt3 etc. More recently, I put extra drives under /home somewhere, and create a matching disabled user so the name is reserved. -- Liam Proven - Technical Writer, SUSE Linux s.r.o. Corso II, Křižíkova 148/34, 186-00 Praha 8 - Karlín, Czechia Email: lproven@suse.com - Office telephone: +420 284 241 084 -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/10/2018 19.24, Liam Proven wrote:
On 23/10/2018 19:20, Carlos E. R. wrote:
More recently, I put extra drives under /home somewhere, and create a matching disabled user so the name is reserved.
I do something related: I use faked users under /home, in the home partition, to bind mount to some large structures, taking them out of the root partition. Example: /home/_var_lib_mysql. This I do on laptops, which have a single disk. -- Cheers / Saludos, Carlos E. R. (from openSUSE 15.0 (Legolas))
Anton Aylward wrote:
Sensibly, "/opt" and "/srv" can be though of as candidates for logical mount points. Web site files are something that can be sensibly localized.
/opt not really, that is for (complete) packages that bring their own file system structure like /opt/<app>/{bin,lib,etc} and so on. /srv - yes, especially if you export it in some way. But as it is a standard system location I try to not use it for my 'local' extensions.... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
I have settled on /data I have the 1TB HDD mounted to / my 4TB HDD mounted to /data/media Then when I next run out of space (if that ever happens) I could put a third HDD in for, lets say my clonezilla stuff, and mount it to /data/pxe I think this is a good solution. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
On 23/10/18 01:46 PM, Peter Suetterlin wrote:
/srv - yes, especially if you export it in some way. But as it is a standard system location I try to not use it for my 'local' extensions....
It depends what you mean by that. /srv/www is where, by default, any web applications that you might choose to install, even 3rd party ones or ones that you write yourself, go. # rpm -qf /srv/www/htdocs filesystem-13.1-9.5.x86_64 # zypper info filesystem Information for package filesystem: ----------------------------------- Repository : openSUSE-Leap-42.3-Oss Name : filesystem Version : 13.1-9.5 Arch : x86_64 Vendor : openSUSE Installed Size : 0 B Installed : Yes Status : up-to-date Source package : filesystem-13.1-9.5.src Summary : Basic Directory Layout Description : This package installs the basic directory structure. It also includes the home directories of system users. # rpm -qf /srv/www/htdig htdig-3.2.0b6-242.1.x86_64 # zypper info htdig Information for package htdig: ------------------------------ Repository : openSUSE-Leap-42.3-Oss Name : htdig Version : 3.2.0b6-242.1 Arch : x86_64 Vendor : openSUSE Installed Size : 3.3 MiB Installed : Yes Status : up-to-date Source package : htdig-3.2.0b6-242.1.src Summary : WWW Index and Search System Description : The ht://Dig system is a complete World Wide Web index and search system for a small domain or intranet. This system is not meant to replace the need for powerful Internet-wide search systems like Lycos, Infoseek, Webcrawler, or AltaVista. Instead it is meant to cover the search needs of a single company, campus, or even a particular subsection of a Web site. # rpm -qf /srv/ftp filesystem-13.1-9.5.x86_64 # rpm -qf /srv/www/cgi-bin/ filesystem-13.1-9.5.x86_64 # rpm -qf /srv/tftpboot/ dnsmasq-2.78-13.1.x86_64 So yes, /srv has a dedicated system function, primarily where the web application you might install live and operate under /srv/www See also /etc/apache2/default-server.conf -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
Anton Aylward wrote:
On 23/10/18 01:46 PM, Peter Suetterlin wrote:
/srv - yes, especially if you export it in some way. But as it is a standard system location I try to not use it for my 'local' extensions....
It depends what you mean by that. /srv/www is where, by default, any web applications that you might choose to install, even 3rd party ones or ones that you write yourself, go.
.....
So yes, /srv has a dedicated system function, primarily where the web application you might install live and operate under /srv/www
Yes, I know what it's used for. This is why /srv/export (used by nfs-server) might be a reasonable location, whereas /srv/myownlocaldata somewhat less.... All only IMHO, as the thread has shown there are no real fixed rules for this... -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse+owner@opensuse.org
participants (11)
-
Anton Aylward
-
Bernhard Voelker
-
Carlos E. R.
-
Dave Howorth
-
David C. Rankin
-
David T-G
-
DennisG
-
jdd@dodin.org
-
Liam Proven
-
Paul Groves
-
Peter Suetterlin