Skip to content

initramfs-scripts: more elegant canmount property handling? #17963

@Harry-Chen

Description

@Harry-Chen

A debian user reported a bug that datasets with property canomunt=noauto set would also be (or at least tried to be) mounted during boot by initramfs scripts.

This behavior is described in:

# Skip filesystems with canmount=off. The root fs should not have
# canmount=off, but ignore it for backwards compatibility just in case.
if [ "$fs" != "${ZFS_BOOTFS}" ]
then
canmount=$(get_fs_value "$fs" canmount)
[ "$canmount" = "off" ] && return 0
fi

I understand this logic is mainly for mounting rootfs which has noauto set. Maybe we could avoid mounting other similar datasets, e.g., by comparing the dataset name with the actual ROOT?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions