Issues with and suggestions for network mounting of partitions
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Issues with and suggestions for network mounting of partitions
I recently purchased a low power computer to be used for some light-duty server use at home. For background, it is running an Atom D525 with 4GB RAM and 64GB SSD (Crucial CT064M4SSD2). I installed Debian stable.
I have network storage I want to use for storage of the actual content and have successfully mounted drives via CIFS for testing. I know enough to be dangerous, so was looking for advice / strategy on partitions to mount.
Items I am not sure about...
I'd planned to minimize use of the local SSD. I'm not sure how concerned to be as older threads used tmpfs for swap or had none, turned off logging, etc. That seems to be less a concern with more recent drives. How much should I care?
I at least want to mount /var/www from the network storage (much more space, backed up, etc) A quick test using fstab resulted with boot up "waiting for /var/www..." and eventually failing. I tried using the _netdev option to no avail. It mounts fine after I login and run "mount -a" This looks to be a network issue and a problem with trying to mount the network device before network is up. Is there a best practice for how to approach this?
It looks like I could use rc.local or other methods, but I am not sure of the impact. Will Apache fail to load if it is not mounted when it tries to start? I also had hanging on shutdown, apparently from network going down before the drives were unmounted.
Related, is it possible to move /var/log, or other /var directories to a network mount? Will services fail if they can't reach /var/log? Or just right in the /var/log directory that would be used as the mount point?
There are permissions issues to consider as well - is there a recommended method for mounting (NFS/CIFS/other) and any security or stability issues to be aware of?
I need to mount /var/www (or a subset) to have enough storage. I'd prefer to mount more just to keep use off of the SSD, but perhaps that is unnecessary.
/var/www would be used if you are running a web server. If this is a samba server, create your shares under /var/samba or /home. The point of a file server is for clients to save and read their files, not to expose directories of the servers OS.
For a server used as nas storage, you'll probably reserve most of the space for the /var partition.
If you will create an nfs server, NFSv4 expects all shares to be located under an nfsroot directory. You can use -bind mounts to mount directories there.
I think I was not clear. I already have a NAS. The new device will be used as a small webserver. I want to mount directories from the NAS, at the very least /var/www. The device will not be a Samba server, but I planned to use CIFS/NFS/something to mount directories from the already existing NAS to this new, small webserver.
Unless I misunderstand, your answer was from the point of view of sharing the directories from the webserver to other machines via Samba or similar. I want the webserver to (at the very least) mount its /var/www directory from the NAS (i.e. NAS is file host, not web server).
You are correct. I thought the new device was to be a file server.
A directory with a network share mounted on it doesn't occupy space, but I don't know how well it would work to serve up the contents of an smb share. Make sure the users match on both, and that the NAS supports the CIFS extensions. Ownership, group, and even setfacl permissions are possible if both are Linux based. What filesystem does the NAS storage use. Fat32 doesn't support ownership or groups.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.