Skip to content

[DRBD9] [LXC] drbd in unprivileged container #138

Open

Description

@galeksandrp

Hi.

  • WHAT : I have some block device in LXC unprivileged container that i want to put under DRBD9.

  • SO : let's try it wit obvious result

root@debian12:~# drbdadm -vvv adjust zxt
New resource zxt
New minor 1008 (vol:0)
scheduling new-resource(zxt) as [0x62ba99e02510]
scheduling new-minor(zxt) depending on new-resource(zxt)[0x62ba99e02510] as [0x62ba99e02560]
scheduling attach(zxt) depending on new-minor(zxt)[0x62ba99e02560] as [0x62ba99e025b0]
drbdsetup new-resource zxt 0 --on-no-quorum=io-error --quorum=off
zxt: Operation not permitted
Command 'drbdsetup new-resource zxt 0 --on-no-quorum=io-error --quorum=off' terminated with exit code 20
  • QUESTION : What exactly I should share with container to at allow my block device as part of DRBD9?

  • EXAMPLE : ZFS folks managed this by presenting /dev/zfs to the whole wide world [ crw-rw-rw- ] and managing permissions inside /dev/zfs [ zfs allow for good days, zfs set zoned=on, zfs zone, zfs unzone for bad days ]

Activity

  1. galeksandrp commented on Jul 2, 2026

    @galeksandrp
    Author

    UPDATE: obviously following did not worked

    lxc.apparmor.profile = unconfined
    lxc.cgroup2.devices.allow = a
    lxc.cap.drop =
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions