[SOLVED] Proxmox4 : LXC Bind Mounts (read only)

Discussion in 'What Virtual Appliances do you want to see?' started by belette_fr, Feb 11, 2016.

  1. belette_fr

    belette_fr New Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    Hello,

    In Proxmox 4, they are two method to mount a directory in a container "lxc.mount.entry" and "mpX" (https://pve.proxmox.com/wiki/LXC_Bind_Mounts).

    My problem :
    -mpX : Method doesn't support read only.
    -lxc.mount.entry : Method can only be used one time and it's doesn't recommanded option in manual.

    My question, is it possible to add a read only "r" option to mpX method?

    Regards.
     
    #1 belette_fr, Feb 11, 2016
    Last edited: Feb 11, 2016
  2. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    15,939
    Likes Received:
    244
    -mpX now supports read-only (pve-container 1.0-41)

    But not for bind mount.
     
  3. belette_fr

    belette_fr New Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    Hello Dietmar,

    Thanks you for your quick response.

    For precision and example, it's possible to mount an readonly lvm logical volume :
    ->mp0: pve_storage_name:lvm_logical_volume_name,/mnt/example,r

    But not possible mount directory (bind) from host :
    ->mp0: /mnt/host_directory,/mnt/example,r

    Is it good comprehension?

    Regards.
     
  4. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    15,939
    Likes Received:
    244
    yes (the flag is called "ro=1")
     
  5. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    15,939
    Likes Received:
    244
    Wolfgang just told me that we will support read-only bind mount soon.
     
  6. belette_fr

    belette_fr New Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    #pct start 1228
    vm 1228 - unable to parse value of 'mp0' - duplicate key in comma-separated list property: volume

    #dpkg -l | grep pve-container
    ii pve-container 1.0-41 all Proxmox VE Container management tool

    #grep mp0 /etc/pve/lxc/1228.conf
    mp0: container:vm-100-disk-1,/mnt/test,ro=1

    My syntax is correct?
     
  7. belette_fr

    belette_fr New Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    good job for support mount bind read only ;)
     
  8. dietmar

    dietmar Proxmox Staff Member
    Staff Member

    Joined:
    Apr 28, 2005
    Messages:
    15,939
    Likes Received:
    244
    The syntax is wrong - try:

    mp0: container:vm-100-disk-1,mp=/mnt/test,ro=1
     
  9. belette_fr

    belette_fr New Member

    Joined:
    Feb 11, 2016
    Messages:
    7
    Likes Received:
    0
    I'am sorry :confused:

    Thanks for support :)

    Hhave a nice week end
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice