15 hours ago15 hr Hello. I am wondering if it's possible to create hardlinks within an Ubuntu VM I have running on unraid, specifically hardlinks to a share i've mounted in the vm with virtiofs?e.g. hard linking /mnt/unraid_share/folder1/file.jpg --> /mnt/unraid_share/folder2/other_file.jpg. My use case has the hardlinks always staying in the same mount point, not hardlinking from my mounted unraid share to local vm disk.I couldn't find much info about this use case online.
14 hours ago14 hr Yes, virtiofs supports hard links within the mounted share. For your example, run this inside Ubuntu:ln /mnt/unraid_share/folder1/file.jpg /mnt/unraid_share/folder2/other_file.jpgThe destination directory must already exist, and other_file.jpg must be a new name. You also need suitable permissions.The main restriction is that both names must refer to a file on the same underlying filesystem. An Unraid user share can combine multiple disks, so one mount point in Ubuntu does not remove that restriction.You can check the result with:stat -c 'device=%d inode=%i links=%h %n' /mnt/unraid_share/folder1/file.jpg /mnt/unraid_share/folder2/other_file.jpg Both should show the same device and inode numbers, with a link count of at least two. These are two names for the same file, so edits through either name affect the same data.If ln fails, please post the exact error, your Unraid version, and the host directory exported through virtiofs.
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.