-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bcachefs support #84
Comments
There is interesting hook for dracut to checking, if bcachefs device complete: |
I briefly looked into this, I think the main issue I found was the source device notation bcachefs uses. Do you know if that's used by any other system? I'm wondering if I should make it more generic or make a separate parsing method for bcachefs. I've found most common filesystems use https://github.com/desultory/ugrd/blob/main/src/ugrd/fs/mounts.py#L215 It does simple parsing by reading /proc/mounts and splitting it, it will see With btrfs multidevice, you can just |
As I know, no other.
From version 2.39 of libblkid it is possible to use UUID="", but with both of source notation systemd (mount generator) have problems.
Yes, The command
This module don't check encryption. It is just try to mount it readonly. If one of slave not available mount will fail and process returns to initqueue for waiting. When udev enumerate all bcachefs type devices and |
Thanks for that info, I will try to test this soon. One thing to consider is that ugrd does not use udev, so it would have to do something to manually bring devices online at boot time. It pulls blkid (currently 2.39.4 on gentoo), so using UUID notation for the filesystem may just be the most straightforward method. If you want to test, you can add If bcachefs says it's encrypted somewhere in the fs info under sys, it should be easy to make a simple hook that runs |
currently I can not build initramfs with ugrd:
|
Ah, I think you may have to disable |
Yes. root ~ # mount -t bcachefs
root ~ #
root ~ # blkid |grep ba4e85e0-9511-487b-b8af-f89725e8dcc8
/dev/loop1: UUID="ba4e85e0-9511-487b-b8af-f89725e8dcc8" BLOCK_SIZE="512" UUID_SUB="5fa315fa-d56a-46a6-9313-0d6eb734257b" TYPE="bcachefs"
/dev/loop2: UUID="ba4e85e0-9511-487b-b8af-f89725e8dcc8" BLOCK_SIZE="512" UUID_SUB="a41d9d75-0eba-46b7-b9e9-483291e9239b" TYPE="bcachefs"
root ~ # mount -t bcachefs UUID=ba4e85e0-9511-487b-b8af-f89725e8dcc8 /mnt/bcachefs/
root ~ # mount -t bcachefs
/dev/loop1:/dev/loop2 on /mnt/bcachefs type bcachefs (rw,relatime,metadata_replicas=2,data_replicas=2) in my case: root ~ # blkid -v
blkid from util-linux 2.39.4 (libblkid 2.39.4, 04-Apr-2024)
root ~ # mount -V
mount from util-linux 2.39.4 (libmount 2.39.4: selinux, btrfs, verity, namespaces, idmapping, statx, assert, debug)
root ~ # bcachefs version
1.12.0
root ~ # qlist -Iv bcachefs-tools
sys-fs/bcachefs-tools-1.13.0 as failback you can try to mount direct with bcachefs userspace utility: If you have old userspace utility you can try to use |
The issue systemd/systemd#8234 not directly related to this, but can get some more information. My question: does ugrd wait to all the devices comes up? With dracut we need hooks which used by |
this is with |
there is some more error related with musl libc:
musl provides
...
get_options() {
LDSO_CONF=""
while getopts "vnNXf:C:r:p" opt "$@"; do
case $opt in
v)
echo "ldconfig for musl in Gentoo"
VERBOSE=1
;;
r)
ROOT=${OPTARG}
;;
f)
LDSO_CONF=${OPTARG}
;;
X)
UPDATE_LINKS=0
;;
\?)
echo "Invalid option: -${opt}" >&2
exit 1
;;
n|N|C|p)
echo "Unimplemented option: -${opt}" >&2
exit 1
;;
esac
done
if [[ -z ${LDSO_CONF} ]]; then
LDSO_CONF=${ROOT}${EPREFIX}${LDSO_CONF_FILE}
fi
if [[ ${UPDATE_LINKS} == 1 ]]; then
echo "Updating links is not implemented."
fi
}
... |
Yes, this "critical" is mostly visual, there is a toggle to not look for glibc, but it warns otherwise. Maybe that error should say glibc instead of GCC.
Yes, this was the issue I'm facing. For multi-device bcachefs filesystems, you seemingly MUST mount by From that branch, you should be able to use the recovery console to manually mount it, you can do like |
It seems there is no mount helper in initramfs exists: |
I'm trying to add mount helper and with
Can you add correct symlink with appropriate module? |
You should be able to do
for binaries you don't use the absolute path, it resolves it from the PATHS defined in the environment where it was run. pycpio sets the file size to 0 and makes a hardlink if there is a hash match, so that is fine. You can double check by opening the CPIO archive or using the recovery shell. This is in the dev branch and should be automatically activated if a bcachefs mount is configured: https://github.com/desultory/ugrd/blob/4e2cae6897f6dd1e0cd2aa6b4818fe5cdb0cb6fb/src/ugrd/fs/bcachefs.toml |
Without
|
I was able to do something like
You're able to manually define a symlink, but it won't end up running 2024-10-22.10-40-14.mp4 |
# strace mount -vvv -t bcachefs UUID=ba4e85e0-9511-487b-b8af-f89725e8dcc8 /mnt/bcachefs/ 2>&1|grep mount.bcachef
statx(AT_FDCWD, "/sbin/mount.bcachefs", AT_STATX_DONT_SYNC|AT_NO_AUTOMOUNT, STATX_TYPE|STATX_MODE|STATX_INO, {stx_mask=STATX_BASIC_STATS|STATX_MNT_ID, stx_attributes=0, stx_mode=S_IFREG|0755, stx_size=3194568, ...}) = 0
clone(child_stack=NULL, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xe9421fd0b90) = 1403669
wait4(1403669, [INFO src/commands/mount.rs:303] mounting with params: device: /dev/loop1:/dev/loop2, target: /mnt/bcachefs, options: rw
[INFO src/commands/mount.rs:43] mounting filesystem
[{WIFEXITED(s) && WEXITSTATUS(s) == 0}], 0, NULL) = 1403669
--- SIGCHLD {si_signo=SIGCHLD, si_code=CLD_EXITED, si_pid=1403669, si_uid=0, si_status=0, si_utime=0, si_stime=2 /* 0.02 s */} ---
# ls -l /sbin/mount.bcachefs
lrwxrwxrwx. 1 root root 8 Oct 18 20:56 /sbin/mount.bcachefs -> bcachefs As you can see generic mount calls mount helper |
I think this is related to udev not being used here, bcachefs seems to require that for multi-device mounts. I'm hoping bcachefs can support this without udev, otherwise I will have to make something that gets device paths from blkid output |
mount helper bcachefs binary honor BCACHEFS_BLOCK_SCAN variable to scan for devices. More info here: koverstreet/bcachefs-tools#308 (comment) |
Add bcachefs rootfs support please.
bcachefs have features wich can be used in initrd:
/dev/sdc:/dev/sdb:/dev/sda on MOUNTPOINT type bcachefs
;The text was updated successfully, but these errors were encountered: