brauner / mount-idmapped

46 stars 11 forks source link

Invalid argument when mapping from QEMU 9p virtio share #8

Open ktprograms opened 2 years ago

ktprograms commented 2 years ago

Hi, I found out about ID-mapped mounts from LWN and found this tool.

I was able to make it work mounting a regular directory, but when I tried to ID-map a directory mounted from QEMU 9p virtio share, I get an Invalid argument error. I'm on Alpine aarch64, with kernel 5.15.29. Commands ran and output below:

~/mount-idmapped (master)> doas mount -t 9p -o trans=virtio virt9pshare /mnt/ -oversion=9p2000.L
~/mount-idmapped (master)> doas ./mount-idmapped --map-mount=u:501:1000:1 --map-mount=g:20:1000:1 /mnt /mnt-mapped
Invalid argument - Failed to change mount attributes
brauner commented 2 years ago

Hey @ktprograms creating idmapped mounts requires filesystem support and 9p simply hasn't been converted to support idmapped mounts yet.

ktprograms commented 2 years ago

Ah, I see. From reading the description of it I thought it didn't require filesystem support.

Would there be any way to do ID-mapping for 9pfs?

brauner commented 2 years ago

In principle 9pfs can support this going forward.

ktprograms commented 2 years ago

What changes would need to be made?

Could you please link to the implementation for other filesystems so I can take a look? I wouldn't mind looking at trying to implement it.

brauner commented 2 years ago

Yeah, I can certainly help you there. Is it ok if I wait until after next week. I won't have time before that.

ktprograms commented 2 years ago

On Thu Jun 16, 2022 at 8:47 PM +08, Christian Brauner wrote:

Yeah, I can certainly help you there. Is it ok if I wait until after next week. I won't have time before that.

Thanks. Sure, I'm in no hurry to get it done.

-- Reply to this email directly or view it on GitHub: https://github.com/brauner/mount-idmapped/issues/8#issuecomment-1157621041 You are receiving this because you were mentioned.

Message ID: @.***>

ktprograms commented 2 years ago

Hi @brauner, do you have some links to documentation/other implementations?