remove bcachefs multi devices in mounting mode

This commit is contained in:
Tobias Powalowski 2024-05-23 19:08:12 +02:00
parent 0bb06266af
commit 8b2c0407dc

View file

@ -355,6 +355,13 @@ _mountpoints() {
echo "${_DEV}|${_FSTYPE}|${_MP}|${_DOMKFS}|${_LABEL_NAME}|${_FS_OPTIONS}|${_BTRFS_DEVS}|${_BTRFS_LEVEL}|${_BTRFS_SUBVOLUME}|${_BTRFS_COMPRESS}" >>/tmp/.parts
elif [[ "${_FSTYPE}" == "bcachefs" ]]; then
echo "${_DEV}|${_FSTYPE}|${_MP}|${_DOMKFS}|${_LABEL_NAME}|${_FS_OPTIONS}|${_BCFS_DEVS}|${_BCFS_COMPRESS}" >>/tmp/.parts
# remove parts of multi devices
if [[ -z ${_DOMKFS} ]]; then
_BCFS_UUID="$(${_LSBLK} UUID -d "${_DEV}")"
for i in $({_LSBLK} NAME,SIZE -d "${_DEV}" | grep ${_BCFS_UUID} | cut -d ' ' -f1); do
_DEVS="${_DEVS//${i} _/}"
done
fi
else
echo "${_DEV}|${_FSTYPE}|${_MP}|${_DOMKFS}|${_LABEL_NAME}|${_FS_OPTIONS}" >>/tmp/.parts
fi