this post was submitted on 19 Aug 2025
38 points (97.5% liked)

Selfhosted

51526 readers
412 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

Hi everyone, I've been working on my homelab for a year and a half now, and I've tested several approaches to managing NAS and selfhosted applications. My current setup is an old desktop computer that boots into Proxmox, which has two VMs:

  • TrueNAS Scale: manages storage, shares and replication.
  • Debian 12 w/ docker: for all of my selfhosted applications.

The applications connect to the TrueNAS' storage via NFS. I have two identical HDDs as a mirror, another one that has no failsafe (but it's fine, because the data it contains is non-critical), and an external HDD that I want to use for replication, or some other use I still haven't decided.

Now, the issue is the following. I've noticed that TrueNAS complains that the HDDs are Unhealthy and has complained about checksum errors. It also turns out that it can't run S.M.A.R.T. checks, because instead of using an HBA, I'm directly passing the entire HDDs by ID to the VM. I've read recently that it's discouraged to pass virtualized disks to TrueNAS, as data corruption can occur. And lately I was having trouble with a selfhosted instance of gitea, where data (apparently) got corrupted, and git was throwing errors when you tried to fetch or pull. I don't know if this is related or not.

Now the thing is, I have a very limited budget, so I'm not keen on buying a dedicated HBA just out of a hunch. Is it really needed?

I mean, I know I could run TrueNAS directly, instead of using Proxmox, but I've found TrueNAS to be a pretty crappy Hypervisor (IMHO) in the past.

My main goal is to be able to manage the data that is used in selfhosted applications separately. For example, I want to be able to access Nextcloud's files, even if the docker instance is broken. But maybe this is just an irrational fear, and I should instead backup the entire docker instances and hope for the best, or maybe I'm just misunderstanding how this works.

In any case, I have some data that I want to store and want to reliably archive, and I don't want the docker apps to have too much control over it. That's why I went with the current approach. It has also allowed for very granular control. But it's also a bit more cumbersome, as everytime I want to selfhost a new app, I need to configure datasets, permissions and mounting of NFS shares.

Is there a simpler approach to all this? Or should I just buy an HBA and continue with things as they are? If so, which one should I buy (considering a very limited budget)?

I'm thankful for any advice you can give and for your time. Have a nice day!

top 50 comments
sorted by: hot top controversial new old
[–] possiblylinux127@lemmy.zip 9 points 4 weeks ago (6 children)

I hope you have backups

Never should you pass disks though by VM. The disk and SMART data is not passed though so ZFS has no way of knowing disk status. It also has more overhead than just passing though a PCIe device.

I would strongly recommend that you fix this ASAP

load more comments (6 replies)
[–] MangoPenguin@lemmy.blahaj.zone 6 points 4 weeks ago (8 children)

Proxmox supports ZFS natively with management in the WebUI. So you could get rid of TrueNAS entirely and not need to deal with HBA pass-through or anything.

You also wouldn't need NFS or have to deal with shares, as the data is available directly to Proxmox Containers via bind mounts.

load more comments (8 replies)
[–] Cyber@feddit.uk 6 points 4 weeks ago (5 children)

You should have all your data separately stored, it shouldn't be locked inside containers, and using a VM hosted on a device to serve the data is a little convoluted

I personally don't like TrueNAS - I'm not a hater, it just doesn't float my boat (but I suspect someone will rage-downvote me 😉)

So, as an alternative approach, have a look at OpenMediaVault

It's basically a Debian based NAS designed for DIY systems, which serves the local drives but it also has docker on, so feels like it might be a better fit for you.

load more comments (5 replies)
[–] 3dcadmin@lemmy.relayeasy.com 4 points 4 weeks ago (12 children)

Debian supports zfs so why the extra hassle of truenas? Seems to be a lot of extra work to add a vm when you could just use zfs in Debian. Or install something like Minio in Debian and use that to manage the data in s3 style buckets, again no vm needed

load more comments (12 replies)
[–] rumba@lemmy.zip 4 points 4 weeks ago (2 children)

I would probably shy away from passing the raw disk. There are a few dozen ways to skin that, But in the end I would probably just mount the disc through NFS,smb, whatever it takes. Reading that smart data is paramount for your situation. You could have a bad cable and never know it.

You could run a couple of VMs K8S and longhorn the data, It's capable of backing up to an S3 compliant storage.

For my home stuff at the moment I'm running unraid with a BTRFS and a parity disc. The first every month I run a scrub if I had any corruption it would find it for me and alert me. It's slow as balls but more protection is better than less. You can also buy some recycled discs and keep a offline store. I don't love the recycled discs but for backup purposes that aren't running 24x7 they're better than nothing.

load more comments (2 replies)
[–] ikidd@lemmy.world 3 points 4 weeks ago (4 children)

I run a docker host in Proxmox using ZFS datasets for the VM storage for things like my mailserver and NexcloudAIO. When I backup the docker VM, it snapshots the VM at a point in time, and backs up the snapshot to PBS. I've restored from that backup and it's like the machine had just shut down as far as the data is concerned. It journals itself back to a consistent state and no data loss.

I wouldn't run TrueNAS at all because I have no idea how that's managing it's storage and wouldn't trust the result.

load more comments (4 replies)
[–] alexgreen@techhub.social 3 points 1 month ago (1 children)

@thelemonalex I usually find that sata cable or connector are bad.

Personally I use proxmox as a host and share bulky nfs mounts for each VM like Immich, Plex/Jellyfin. For gitea and other small VM - use VM virtual drive and back it up periodically

[–] thelemonalex@lemmy.world 2 points 4 weeks ago* (last edited 4 weeks ago) (1 children)

So if I understand correctly, you're managing the storage directly within Proxmox, instead of using a VM for that, right? Are the tools good? Does it support ZFS replication, SMB and things like that? Edit: I'll also check the SATA cables, thanks!

[–] alexgreen@techhub.social 3 points 4 weeks ago (1 children)

@thelemonalex I use native linux nfs server. Manage shares using /etc/exports file.

For SMB, I use vm with samba and mount a few folders over nfs from proxmox (it just gives me a static IP in case if I decide to change something from proxmox side).

I manage zfs on the proxmox host. I think you can't export zfs dataset to be managed by VM (except drive passthrough).

My infra has 1 proxmox bulky node with 2 HDD (zfs) and 3 nodes with small ssd/nvme in the cluster.

[–] thelemonalex@lemmy.world 1 points 3 weeks ago

Okay, good to know, thanks!

[–] philoko@ani.social 3 points 1 month ago (4 children)

I was in somewhat of a similar situation but some of the SATA ports were bad and ended up buying a cheap SATA to PCIE card and passing it instead but that still had some issues so I ended up moving TrueNAS to its own dedicated machine and haven’t had any problems since.

Just my two cents.

[–] Nollij@sopuli.xyz 4 points 4 weeks ago (8 children)

To anyone reading, do NOT get a PCIe SATA card. Everything on the market is absolute crap that will make your life miserable.

Instead, get a used PCIe SAS card, preferably based on LSi. These should run about $50, and you may (depending on the model) need a $20 cable to connect it to SATA devices.

[–] possiblylinux127@lemmy.zip 2 points 4 weeks ago* (last edited 4 weeks ago) (1 children)

I have a cheap PCIe card I bought and it works fine.

It cost like $15 and has been rock solid. What is the issue?

[–] Nollij@sopuli.xyz 3 points 4 weeks ago

The one I had would frequently drop the drives, wreaking havoc on my (software) RAID5. I later found out that it was splitting 2 ports into 4 in a way that completely broke spec.

load more comments (7 replies)
load more comments (3 replies)
[–] carzian@lemmy.ml 2 points 1 month ago (1 children)

If you're only doing a VM or two, I'd get rid of proxmox and run truenas directly. It's gotten better for VMs.

Also make sure you read up on the ecc requirements for truenas if you're not using ecc ram

load more comments (1 replies)
[–] frongt@lemmy.zip 2 points 1 month ago (3 children)

If you pass a whole raw disk, not virtualized, then TrueNAS should not complain. I don't know if you can do that in proxmox, I haven't tried.

Personally I'd get rid of TrueNAS. Even if docker is down, the VM with the data is still up and accessible over anything running on the VM, like scp via ssh.

[–] thelemonalex@lemmy.world 2 points 4 weeks ago

I passed the whole raw disk in theory, but I've read that even if you do that, it's still virtualized somehow. But I don't know enough about it, I'm just basing this on the research I've done so far. About skipping TrueNAS, maybe you're right, but if I also want to set up SMB shares? Is there a tool or something that makes it easy for someone with limited experience? It would also need to handle replication of data, and the advantage of ZFS Replication over using something like rsync, is that you can simply push the delta between snapshots, instead of replacing entire files, or at least that's how I've understood this.

[–] non_burglar@lemmy.world 2 points 4 weeks ago

If you pass a whole raw disk, not virtualized, then TrueNAS should not complain.

Although Smart data counters live on each individual disk, it is accessed via the disk controller interface. No controller, no smart data.

[–] possiblylinux127@lemmy.zip 2 points 4 weeks ago

If you pass the disk the meta data isn't passed though including SMART data so it is a ticking time bomb.

[–] IronKrill@lemmy.ca 2 points 4 weeks ago (1 children)

I have two identical HDDs as a mirror, another one that has no failsafe (but it's fine, because the data it contains is non-critical)

On separate pools, I hope? My understanding of ZFS is that the loss of any vdev will mean the loss of the pool, so your striped vdev should be in its own pool that you don't mind losing.

[–] thelemonalex@lemmy.world 2 points 4 weeks ago

Correct, they're two separate pools, and the stripe one doesn't contain any valuable data.

[–] Moonrise2473@feddit.it 2 points 3 weeks ago (1 children)

you can install dockge in truenas and then all your docker data is not "locked" inside their application data

load more comments (1 replies)
load more comments
view more: next ›