14
edits
Changes
m
rm -f /vz/private/123/etc/mtab ln -s sf /proc/mounts /vz/private/123/etc/mtab
→/etc/mtab: Tidy, remove useless rm
Link <code>/etc/mtab</code> to <code>/proc/mounts</code>, for <code>df</code> to work properly:
{{out|The problem here is container's root filesystem (<code>/</code>) is mounted not from the container itself, but rather from the host system. That leaves <code>/etc/mtab</code> in container without a record for <code>/</code> being mounted, thus df doesn't show it. By linking <code>/etc/mtab → /proc/mounts</code> we make sure /etc/mtab shows what is really mounted in a container.