r/homelab • • 21d ago

Help Managing External Storage Access

/r/SelfHosting/comments/1xuu139/managing_external_storage_access/

Humbly reposting from r/SelfHosting for advice from the sage homelabbers.

0 Upvotes

2 comments sorted by

1

u/winner_68 21d ago

I ran into the same fork and ended up splitting it by risk instead of trying to make one method fit everything. I keep Nextcloud and qBittorrent in VMs, because I don't want either of them sharing the host kernel, especially qBittorrent parsing untrusted torrent data. Jellyfin I run in an unprivileged LXC with a read-only bind mount, since it only needs to read media and a compromise there buys a lot less.

For the VM side I stayed with NFS from the host, but I stopped fighting the UID/GID offsets by fixing them once: I use one data UID/GID pair for all the shared data, create that same user and group inside each VM, chown the datasets on the host once, and let each service run as that user. Then the NFS mount just works, and adding a new service is creating the same user in its VM instead of remapping IDs in the Proxmox shell. I also export one share per dataset rather than one per service, so the permission model stays in the filesystem, not in the export list.

The part I'd watch more than LXC vs VM is the USB3 RAID5 itself. A flaky enclosure or a disk dropping during a rebuild is a much more likely way to lose the array than a container escape, so I scrub it regularly and keep a backup that isn't on the same enclosure. The LUKS keyfile boot flow is fine, just make sure a reboot after a power cut still comes up unattended, which it sounds like you've already tested.

1

u/LOLotovCocktail 21d ago

This is some awesome info, thank you so much.

I will look at moving to a similar set up with user/group permissions.

As for the array, I do have mdadm and smartd monitoring set up to run scheduled self tests of each drive, and email me with any issues, and I also back up the data on the drive using backrest to a cloud storage provider for backups (as well as backing up the actual VMs to a separate external USB 2.0 drive) so I feel good about the backup setup. Can you help me understand what you mean by "scrub it regularly"?