I have recently built a small homeserver, that I want to use as a NAS besides other applications like hosting VMs etc. The disk space should be accessible via NFS, SAMBA (and SSHFS), but that's not part of the question. One of the reasons to start this project was that I have had left over a bunch of HDDs. Because these HDDs are of different models and sizes, I don't want to use them as part of a [software] RAID or use them to create LVM.
My first attempt was to create a folder named
share as a subfolder of
/mnt where I mount all the HDDs like this:
/mnt /share /disk_a /disk_b /...
share folder should be made accessible via NFS and SAMBA.
After reading the NFS article from the ArchWiki, where the
--bind option of
mount was mentioned, I changed the directory structure to make the
shared folder independent from the mounting points:
/mnt /disk_a /disk_b ... /nas /disk_a # mount --bind /mnt/disk_a /nas/disk_a ...
In this solution the
/nas folder would be shared.
My question is, what's the best directory structure for sharing these disks? Are there any other best practices to know, when setting up such a network storage?