Why does lsblk on LXC container show full host disk size? reddit / selfhosted ---------------------------------------------------------------------- sano_banano · 2023-11-09 23:03 How is it possible that "lsblk" command ran on LXC container shows the full host disk size? Shouldn't it be the size I've chosen when creating the container (8 GB)? I know I'm probably missing something, but even after Googling I can't find an answer. Thank you! https://preview.redd.it/k4wfk2evkezb1.png?width=371&format=png&auto=we bp&s=e6e9d9ea23dbcca529f45f1142763388108f9660 ---------------------------------------------------------------------- C0rn3j · 2023-11-09 23:59 You asked it to list block devices, it did so accurately. `df -h` could be more representative of what you want if you're looking to check file size, depending on the file system used. ---------------------------------------------------------------------- Former-Hotel9791 · 2023-11-10 01:11 Check /etc/fstab i think you are in Read only ---------------------------------------------------------------------- thekrautboy · 2023-11-10 01:20 Why would read-only make any difference to the reported size? *smh* /u/C0rn3j already provided the correct answer. ---------------------------------------------------------------------- suinkka · 2023-11-10 01:55 Here's a thread from LXD's forums about the same thing: https://discuss.linuxcontainers.org/t/how-to-hide-of-host-root-device- from-container-lsblk/6103 In essence, the kernel doesn't provide a way to isolate block devices (like a namespace) ---------------------------------------------------------------------- ithakaa · 2023-11-10 03:19 SMH isn’t going to foster much help if you can’t be civil If you take that attitude you may find yourself on your own. ---------------------------------------------------------------------- thekrautboy · 2023-11-10 03:23 Oh no! ---------------------------------------------------------------------- ithakaa · 2023-11-10 03:24 Why bother even posting for help?