[SOLVED] Trouble bind mounting (mpX)

fraktal

New Member
Jul 25, 2019
19
1
3
124
I'm trying to bind-mount some disks into an Ubuntu container, but I keep getting errors about the format of the conf file.

100.conf:
Code:
#port 32400
arch: amd64
cmode: shell
cores: 1
hostname: plex
memory: 2048
mp0: /mnt/drives/drive_b, mp=/mnt/drive_b
#mp1: /mnt/drives/drive_c, mp=/mnt/drive_c
#mp2: /mnt/drives/drive_g, mp=/mnt/drive_g
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=52:FD:08:F0:92:79,ip=dhcp,ip6=dhcp,type=veth
ostype: ubuntu
parent: hw_enc_drive_mount_test
rootfs: local-lvm:vm-100-disk-0,size=8G
swap: 512
lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/100/mount_hook.sh

[hw_enc_drive_mount_test]
arch: amd64
cmode: shell
cores: 1
hostname: plex
memory: 2048
mp0: /mnt/drives/drive_b, mp=/mnt/drive_b
#mp1: /mnt/drives/drive_c, mp=/mnt/drive_c
#mp2: /mnt/drives/drive_g, mp=/mnt/drive_g
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=52:FD:08:F0:92:79,ip=dhcp,ip6=dhcp,type=veth
ostype: ubuntu
parent: plex_hw_encoding
rootfs: local-lvm:vm-100-disk-0,size=8G
snaptime: 1564909614
swap: 512
lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/100/mount_hook.sh

[plex_hw_encoding]
#Installed but not tested
arch: amd64
cmode: shell
cores: 1
hostname: plex
memory: 2048
net0: name=eth0,bridge=vmbr0,firewall=1,hwaddr=52:FD:08:F0:92:79,ip=dhcp,ip6=dhcp,type=veth
ostype: ubuntu
rootfs: local-lvm:vm-100-disk-0,size=8G
snaptime: 1564521013
swap: 512
lxc.cgroup.devices.allow: c 226:0 rwm
lxc.cgroup.devices.allow: c 226:128 rwm
lxc.cgroup.devices.allow: c 29:0 rwm
lxc.autodev: 1
lxc.hook.autodev: /var/lib/lxc/100/mount_hook.sh

Here's the error (although it does start):
Code:
root@silicon:~# pct start 100
vm 100 - unable to parse value of 'mp0' - format error
 mp: property is not defined in schema and the schema does not allow additional properties
mp: property is missing and it is not optional
vm 100 - unable to parse value of 'mp0' - format error
mp: property is missing and it is not optional
 mp: property is not defined in schema and the schema does not allow additional properties
Is it trying to tell me that


the folder exists in the container:
Code:
root@plex:~# ls /mnt/
drive_b  drive_c  drive_g

and the disk is mounted to the host:
Code:
root@silicon:~# mount
[spoiler]
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=3980768k,nr_inodes=995192,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=801336k,mode=755)
/dev/mapper/pve-root on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/perf_event type cgroup (rw,nosuid,nodev,noexec,relatime,perf_event)
cgroup on /sys/fs/cgroup/hugetlb type cgroup (rw,nosuid,nodev,noexec,relatime,hugetlb)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=34,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=499)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
/dev/nvme0n1p2 on /boot/efi type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
configfs on /sys/kernel/config type configfs (rw,relatime)
lxcfs on /var/lib/lxcfs type fuse.lxcfs (rw,nosuid,nodev,relatime,user_id=0,group_id=0,allow_other)
/dev/fuse on /etc/pve type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
[/spoiler]
/dev/sda on /mnt/drives/drive_b type ext4 (rw,relatime)
/dev/sdb on /mnt/drives/drive_g type ext4 (rw,relatime)
/dev/sdc on /mnt/drives/drive_c type ext4 (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=801332k,mode=700)

Here's lsblk (for fun):
Code:
root@silicon:~# lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
sda                            8:0    0 931.5G  0 disk /mnt/drives/drive_b
sdb                            8:16   0 465.8G  0 disk /mnt/drives/drive_g
sdc                            8:32   0   1.4T  0 disk /mnt/drives/drive_c
nvme0n1                      259:0    0 119.2G  0 disk 
├─nvme0n1p1                  259:1    0  1007K  0 part 
├─nvme0n1p2                  259:2    0   512M  0 part /boot/efi
└─nvme0n1p3                  259:3    0 118.8G  0 part 
  ├─pve-swap                 253:0    0     7G  0 lvm  [SWAP]
  ├─pve-root                 253:1    0  29.5G  0 lvm  /
  ├─pve-data_tmeta           253:2    0     1G  0 lvm  
  │ └─pve-data-tpool         253:4    0  65.5G  0 lvm  
  │   ├─pve-data             253:5    0  65.5G  0 lvm  
  │   ├─pve-vm--100--disk--0 253:6    0     8G  0 lvm  
  │   └─pve-vm--103--disk--0 253:7    0     2G  0 lvm  
  └─pve-data_tdata           253:3    0  65.5G  0 lvm  
    └─pve-data-tpool         253:4    0  65.5G  0 lvm  
      ├─pve-data             253:5    0  65.5G  0 lvm  
      ├─pve-vm--100--disk--0 253:6    0     8G  0 lvm  
      └─pve-vm--103--disk--0 253:7    0     2G  0 lvm
 
Well, solved it.

turns out that unlike what you read online, the space after the comma makes it all fall over.

Correct:
Code:
mp0: /mnt/drives/drive_b,mp=/mnt/drive_b
wrong:
Code:
mp0: /mnt/drives/drive_b, mp=/mnt/drive_b

This is what the documentation says so no complaints, but as the space following a comma is often allowed (e.g. fstab) it might be unexpected.
 
Last edited:

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!