[systemd-devel] mount failed because the mount point dir doesn't exist
Lennart Poettering
lennart at poettering.net
Fri Dec 19 04:42:18 PST 2014
On Fri, 19.12.14 10:58, Baoquan He (bhe at redhat.com) wrote:
> Hi,
>
> Now I encountered a prlblem. When I add an entry in /etc/fstab to mount
> a disk on a dir like below, mount can be done successfully though /aa/bb
> doesn't exist.
> _ _ _ _ _
> /dev/disk/by-uuid/xxx-xxx /aa/bb xfs defaults 0 2
>
>
> However when I make a initramfs for kdump kernel, I add an entry to
> $mntimg/etc/fstab like below, mount will fail if /sysroot/var/crash
> doesn't exist.
> _ _ _ _ _
> /dev/disk/by-uuid/xxx-xxx /sysroot/var/crash xfs rw,relatime,...,x-initrd.mount 0 2
>
> Does anyone know why this happen and how to fix it, or any
> suggestion/idea?
First of all, you really shouldn't access /sys/root/var from the
initrd. /var is a directory that if split out is mounted after the
transition to the host. Hence, if you try to access it from the
initrd, you actively break setups with /var split out.
Now, my guess that the reason that your code fails is that /sysroot/
is read-only when your code is invoked, and hence the subdir cannot be
created.
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list