logoalt Hacker News

mnahkies • yesterday at 8:26 PM • 1 reply • view on HN

One thing I'm struggling with at the moment which I may as well ask here.

Many of my projects use pnpm, which ideally uses hard links from a shared store of dependencies.

One of my goals is to reduce the disk overhead of VM based isolation, so I'd like a shared pnpm store across projects (and the same for maven, etc as well)

With https://virtio-fs.gitlab.io/ mounts, each mount inside the VM is a separate FS, and I can't hard link across them. I've tried playing around with ideas like bind mounting the directory structure from the host in a folder to have a single virtio-fs mount inside the VM - but the bind mounts still can't be hard linked across it seems.

I'm basically wondering if I'm missing something or just trying to do something that isn't possible.

All the host folders are on the same FS - but I don't want to organise the host system around the VM mounting needs, and I also don't want to mount extraneous directories into the VM (eg: simple solution could be just mount ~/projects but kinda self defeating)

(Fedora workstation host)


Replies

genxy • yesterday at 10:52 PM

Use a host fs that supports CoW.