How modify fstab to add swap or other disk permanently?

Hi, i want to add a raid1 array as swap permanently but in fstab states that i cannot modify it manualy where to put those mount point? I now probably after this setting i need to launch signal-event fstab-update.
Also is there an option/best option to add a additional disk to use it as additional share folder through samba share?
-add sambashare_foldername(in web gui)
-mount disk as /var/lib/nethserver/ibay/sambashare_foldername
I need to have one separated share on one separated physical disk but other shares on standard base system disk.
Thanks in advance.

I’ve had no issues updating /etc/fstab directly. The warning in that file states:

# BE CAREFUL WHEN MODIFYING THIS FILE! It is updated automatically
# by the NethServer software. A few entries are updated during
# the template processing of the file and white space is removed,
# but otherwise changes to the file are preserved.

So it isn’t completely re-built like other files under the e-smith regime.



Thanks, and what with the second problem-samba share?
What is the best, less errorprone or just good looking option?
a) mounting disk as a directory under ibay and creating a share on it or
b) creating a symlink to disk mounted e.g. /mnt/disk (as posted e.g. How to add space to the samba shares?)

Thanks in advance. Cheers.

sorry @dj_marian, be kind: could you please detail the storage configuration of your nethserver installation?
Hardware, logical and… mountpoint also.

Did you installed from scratch with nethserver iso or did you installed NethServer over an existing CentOS?

Hi, thanks for Your reply. My Nethserver instaled from iso.
Disk config is:
-2 phisical drives in raid1
-on each drive i have 8 partitions one of them is
2.additional disks
-2 phisical disks in raid1
-on each drive just one partition
I need to have
/var/lib/nethserver/ibay/recordings on those separate two disks working in raid1

Raid is not a problem in my case.
Thanks in advance.

I’m testing now option a) if no problems i can write an howto if someone interested (if iI have some time for this) Thanks for now.


This would be great!

Follow this:

  1. create new share on web gui e.g newshare

  2. create filesystem:
    mkfs.xfs /dev/sdxx (where sdxx is partition on new disk, also can be mdxxx if You’re using raid)

  3. get disk filesystem UUID by:
    ls -la /dev/disk/by-uuid/
    echo "UUID=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx /var/lib/nethserver/ibay/newshare xfs defaults 0 0" >> /etc/fstab
    shutdown -h now

  4. change ownership of new share (in my case initially was root:root)
    chown youruser:yourgroup newshare
    or re-add sambashare newshare (change something and reload) to change permissions on newshare from group root to yourgroup (owner in that case stays root)

I hope this will help someone. Cheers

1 Like