rootfs questions

Apr 26, 2018
111
10
23
I noticed in some CentOS 7 containers an init boot failure with systemd-remount-fs.service. Not fatal but I traced the cause to /etc/fstab, which contains the following:

Code:
/dev/root / rootfs defaults 0 0

When logging into the CentOS container, /dev/root does not exist. Commenting out that entry in fstab resolves the init boot failures.

1. Is the /etc/fstab entry still valid or is this from an old CentOS template?

2. My understanding is I should be able to view the file system of a container from the Proxmox host at /var/lib/lxc/$cid/rootfs. Yet there is nothing in that directory. If possible how do I enable that feature?

I looked in the wiki and admin manual but I am not seeing how to do this.

In /etc/pve/lxc/$cid.conf I see entries like this:

rootfs: local-lvm:vm-$cid-disk-1,size=120G

In /var/lib/lxc/$cid/config I see entries like this:

lxc.rootfs.path = /var/lib/lxc/$cid/rootfs

I seem to recall earlier versions (3.x?, 4.x?) of Proxmox populating the rootfs directory. The containers have been in service since then. Perhaps with subsequent Proxmox releases I need to tweak the configs?
 
2. My understanding is I should be able to view the file system of a container from the Proxmox host at /var/lib/lxc/$cid/rootfs. Yet there is nothing in that directory. If possible how do I enable that feature?
you can browser the directory if you have zfs as storage (then the disk is a subvolume) or it gets mounted with 'pct mount' but this more intended for emergency operation
 
I am trying to access the rootfs of all my live containers, how do I do that? Alternatively, I want to create a container that resides on the disk, on a directory, like regular LXC containers. How do I do that? I need to bring in several LXC containers from another regular box with LXC. I do this routinelly with RSYNC
 
I'm just trying to decide (for monitoring) if I should just ignore the error, or does it mean something is broken? Blinking red lights are hard to ignore.
 

Attachments

  • error.png
    error.png
    9.7 KB · Views: 9