Mount NTFS Disk in LXC

Tomahawk

Member
Feb 11, 2022
17
0
6
41
Dear All,

I am trying to mount NTFS disk in LXC on PVE 7.4-17 without success. When mount disk with FAT fs it is possible and works fine.
I am mounting it thru fstab in PVE:

/dev/nvme1n1 /mnt/pve/tb1 ntfs-3g auto,nofail,rw,default,x-systemd.device-timeout=400 0 0

and it has properly mounted and visible in PVE. Then I configured LXC with:
mp1: /dev/nvme1n1,mp= /mnt/mediatb1

but the LXC failed to start. For FAT disks it works fine with the same process. Do you know what could be wrong with LXC NTFS disk mounting ?

When start LSC I am getting error:
run_buffer: 322 Script exited with status 16
lxc_init: 844 Failed to run lxc.hook.pre-start for container "103"
__lxc_start: 2027 Failed to initialize container "103"
TASK ERROR: startup for container '103' failed

root@pve:~# lxc-start -n 103 -F -l DEBUG -o /tmp/lxc-103.log
lxc-start: 103: ../src/lxc/conf.c: run_buffer: 322 Script exited with status 16
lxc-start: 103: ../src/lxc/start.c: lxc_init: 844 Failed to run lxc.hook.pre-start for container "103"
lxc-start: 103: ../src/lxc/start.c: __lxc_start: 2027 Failed to initialize container "103"
lxc-start: 103: ../src/lxc/tools/lxc_start.c: main: 306 The container failed to start
lxc-start: 103: ../src/lxc/tools/lxc_start.c: main: 311 Additional information can be obtained by setting the --logfile and --logpriority options
 
Last edited:
Thank you @leesteken ! I finally solved the issue when unmounted the disk from PVE. I am trying now change the owner of the folder to plex inside mounted mp= /mnt/mediatb1 but it is still remaining as root. Even if I am logged in as plex user and create a folder then it is going to be created with root ownership. Do you know how can I change the owner ?

1720448521978.png
 

Attachments

  • 1720448418575.png
    1720448418575.png
    10.3 KB · Views: 4
Last edited:
Thank you @leesteken ! I finally solved the issue when unmount the disk from PVE. I am trying now change the owner of the folder to plex inside mounted mp= /mnt/mediatb1 but it is still remaining as root. Do you know how can I change the owner ?
I think you need to change the owner on the Proxmox host. If the plex user inside the container has UID 1234 then do a chown on the host with 1001234. Or maybe (since it is not a Linux filesystem) set the owner as part of the NTFS mount command (on the host)?
 
I just did it with adding "none bind,create=dir 0 0" on the end in LXC config. Seems it is working

mp1: /dev/nvme1n1,mp=/mnt/mediatb1 none bind,create=dir 0 0

Many thanks!