[SOLVED] BTRFS mount point in LXC

Aida

New Member
Dec 17, 2021
4
0
1
54
Hello,

I am migrating from running nextcloudpi on a raspberrypi, to running it inside a debian based lxc.

I pulled the external drive from the pi which has my nextcloud data directory and backups etc., and plan on using that drive as the main storage for my new container. This drive is formated with the btrfs filesystem which works well with nextcloudpi's backup utilities.

I added the external drive as a btrfs to my datacenter, and when navigating via the proxmox shell I am able to see the contents of the drive.

I then added a mount point in the container (from the proxmox gui) that maps to the drive. When in the container, if I navigate to the mount point, I only see the "lost+found," not the drives contents. The filesystem format of it also appears as ext4.

I assume that I am making some profound mistake or configuring something incorrectly. I'd much appreciate any advice on how to troubleshoot or resolve this issue!

Bash:
Filesystem                       Type      Size  Used Avail Use% Mounted on
/dev/mapper/pve-vm--100--disk--0 ext4      7.8G  2.1G  5.4G  28% /
/dev/loop0                       ext4      2.0T   32K  1.9T   1% /mediaseagate
 
Hi,
I then added a mount point in the container (from the proxmox gui) that maps to the drive. When in the container, if I navigate to the mount point, I only see the "lost+found," not the drives contents. The filesystem format of it also appears as ext4.
How exactly did you add the mount point?

I assume that I am making some profound mistake or configuring something incorrectly. I'd much appreciate any advice on how to troubleshoot or resolve this issue!

Bash:
Filesystem                       Type      Size  Used Avail Use% Mounted on
/dev/mapper/pve-vm--100--disk--0 ext4      7.8G  2.1G  5.4G  28% /
/dev/loop0                       ext4      2.0T   32K  1.9T   1% /mediaseagate
From this output, I'm guessing you created a dedicated raw volume (which gets formatted to ext4 automatically) on top of the BTRFS storage to be used as a mount point, rather than a bind mount point (which is likely what you wanted). Note that it's not possible to add bind mounts via GUI.
 
  • Like
Reactions: Aida
That fixed it, thank you!

Is there any way for the filesystem to appear as btrfs inside an lxc? Nextcloudpi uses btrfs for the "external" data drive so I suspect that most utilities will only work if the container sees it as a btrfs system.
 
It does for me
Code:
root@pve701 ~ # findmnt /mybtrfs
TARGET   SOURCE   FSTYPE OPTIONS
/mybtrfs /dev/sdk btrfs  rw,relatime,space_cache,subvolid=5,subvol=/
root@pve701 ~ # pct set 132 -mp1 /mybtrfs,mp=/mybtrfs
root@pve701 ~ # pct start 132
root@pve701 ~ # pct enter 132
root@CT132:~# findmnt /mybtrfs/
TARGET   SOURCE   FSTYPE OPTIONS
/mybtrfs /dev/sdk btrfs  rw,relatime,space_cache,subvolid=5,subvol=/
root@CT132:~#
 
  • Like
Reactions: Aida
you are right... same here, thank you! I've sought help on the nextcloud forum.
 

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!