Skip to content

CIFS/SMB-Share for unprivileged LXC-Container #21

Description

@mcuiobroker

Bitte mal prüfen, Danke.

LXC(unprivileged Container)
id iobroker -> uid, gid 1002

cd /mnt
sudo mdkir nas2


HOST(PVE)
mkdir -p /mnt/pve/lxc_shares/nas

/etc/fstab
-> Eintrag
//192.168.178.XXX/iobroker /mnt/pve/lxc_shares/nas cifs user,credentials=/root/.credentials/windowsuser,uid=101002,gid=101002 0 0

mount -a

root@pve:/mnt/pve/lxc_shares# ls -la
total 16
drwxr-xr-x 3 root root 4096 Jul 11 15:56 .
drwxr-xr-x 8 root root 4096 Jul 11 15:56 ..
drwxr-xr-x 2 101002 101002 8192 Jul 7 23:30 nas

150.conf
-> Eintrag hinzufügen
lxc.mount.entry: /mnt/pve/lxc_shares/nas mnt/nas2/ none bind,create=dir,optional 0 0

Restart LXC 150

Ich weiß nicht, ob es notwendig ist, aber falls es nicht laufen sollte, dann in
/etc/subuid und /etc/subgid
iobroker:1002:1 hinzufügen

image

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