How modify fstab to add swap or other disk permanently?

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