Partitioning Recommendations

NethServer Version: 7.4.1708 plus all updates
Module: N/A

(By way of background, I have played with Nethserver in the past but always on a virtual machine and always just with a single root partition (plus /boot and swap of course)

Having just acquired some reasonable hardware to run a Nethserver on, I have set about setting up a machine. The ‘default’ partitioning seems to include a separate partition for /home which seemed very reasonable and normal until I realised that all user homes, shares etc are created under /var/lib/nethserver. As this is the case, the separate partition for /home seems irrelevant and a waste of disk since the bulk of disk usage will go on the /root partition (I’d allocated 1.4T for /home).

Is the above thinking correct? Or is something subtle happening that I haven’t picked up on?
Did I miss an obvious step in installation to create a partition at /var/lib/nethserver?
Am I missing something else?


1 Like

May I ask what disk(s) you have in your server?
If you want to use an alternative partitioning schema, you will need to choose a manual install during setup and create a partition for /var/lib/nethserver in order to have your homedirs and samba shares on a separate partition.
I would prefer to have 2 disks for /var/lib/nethserver and put them in mdadm raid1.
And I would use a single disk for / (and if you want seperate partitions for /boot and swap)

If you want to go fully virtualized I would have NS as VM on ProxMox… (my situation at home)

1 Like

I would make that: if at all feasible, go for virtualization as you will be able to take advantage of it’s features like snapshots and resizing disk files.

It all depends on the amount of disks present, and how they are setup tho. So please, add some specs to ‘reasonable hardware’ so we can think out loud.

Your assumption is correct. For nethserver, one mounts /var/lib/nethserver on a different diskset if you go non-virtual.

Thanks for pointing that out, @dwj

If we default to /home and it is never used, we may overthink the default partitioning scheme.

/home isn’t a separate partition (in a default installation). Rather, /var/lib/nethserver/home is mounted at /home, presumably so that software that expects users’ files to be in /home (like every piece of Unix software ever written) isn’t surprised.

Now, why Neth uses /var/lib/nethserver/home for this purpose at all is a separate question. I have to assume there’s some reason beyond gratuitous incompatibility, but I haven’t done enough reading to know what it is yet.

1 Like

Hi all.
Thanks for all the helpful comments. Have 1.6TB and 2TB disks. Wasn’t planning RAID, just managing through LVM. The thought about running NS as a VM is an interesting one.

I can’t see any link between /var/lib/nethserver/home and /home (either way) on my setups, but that would make sense, as you pointed out Dan (danb35)

In summary, from all the comments, seems either to link /var/lib/nethserver/home, back to /home, or partition at /var/lib/nethserver is best way to go. Since shared folders are placed at /var/lib/nethserver/ibay partitioning at nethserver may make more sense to ensure all ‘user’ data is off /root.

Thanks all.

It should show up in /etc/fstab.

1 Like

Thanks very much Dan for the insight. (A good learning experience!).

PS: But this still leave Shares on the root file system (…/nethserver/ipub). Is that considered OK practice these days? (‘old school’ thinking always said keep user data off root).

A couple of points to clarify if developers are reviewing…

  1. Not sure if its intentional, but if one builds standard CentOS first, then installs nethserver as per the instructions, …/nethserver/home does not get mounted on /home.
  2. It is the default CentOS build that makes /home as a separate partition by default.

Unsure about 1
About your 2nd point: NethServer uses default anaconda for partinioning so it would be an educated guess to assume this is the case.
Workaround would be to do the manual partition schema. This can be done during install with anaconda UI.

Thanks Rob. Yes understand we can do a manual partition schema. The complication is that by inadvertently accepting default (ie separate /home partition), /home and /var/lib/nethserver/home (in my experience) become isolated directories (ie /home not mounted on /var/lib/nethserver/home as per fstab). Then /home with a separate partition becomes more or less meaningless as all data is stored in …/nethserver.
Hopefully I’ve explained well enough.

…true …

The simple solution is call it maintenance time, disconnect the network, reboot for pete’s sake and to release any stubborn file locks (should not be needed, but meh, experience on windows makes one carefull) and after you unmount the /home partition, remount it elsewhere, copy the content from /var/lib/nethserver/home there.

Check if the content is identical, delete it from /var/lib/nethserver/home, and remount the partition there.

Make a backup if you are paranoid :wink: