Sample Header Ad - 728x90

How to create a union mount (bind two or more directories to one mountpoint) on illumos / solaris?

0 votes
0 answers
648 views
I have been using union mounts, such as unionfs on FreeBSD or mergerfs on Linux, and now I would need to do the same on illumos (SmartOS). Reading [illumos](https://illumos.org/man/) or [SmartOS](https://smartos.org/man/) man pages is not helpful. Same with searching them [via external search engine](https://www.google.com/search?hl=en&q=site%3Ahttps%3A%2F%2Fillumos.org%2Fman%2F) . If possible, how can one create a union mount (bind two or more directories to one mountpoint) on illumos / solaris? If not possible, is there anything close to same effect? ## Why In my humble opinion, union-like filesystems are used in relatively complex scenarios. Describing some here would be out of scope for this question. I would like to know if this is possible _a-priori_ in any case, as I would not want an answer solving only a subset of all unionfs possible use-cases. As an example: I need to pick and choose _from the subdirectories_ of read-only zfs datasets, mounted DVD and readonly USB drives, overlaid with read-write datasets. The resulting mount point needs to be available as a cifs share. It would need to be done programmatically after boot, depending on various system factors. For the interested, see referenced articles with some use cases. There are many such sysadmin scenarios. --- https://whattheserver.com/what-are-unionfs-mounts-and-how-to-use-them/ https://medium.com/@knoldus/unionfs-a-file-system-of-a-container-2136cd11a779
Asked by gsl (298 rep)
Jul 11, 2020, 01:45 PM
Last activity: Jul 12, 2020, 02:51 PM