mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-22 00:00:03 +03:00
test: add failing sub-test w/ dev added post mkfs
The second mount works if the device is already part of the `bcachefs format` but fails if it's added afterwards. In particular the `blkid` output is interesting.
This commit is contained in:
parent
65f1c3f52a
commit
0e0be9baa6
@ -23,7 +23,10 @@ let
|
||||
nodes.machine =
|
||||
{ pkgs, ... }:
|
||||
{
|
||||
virtualisation.emptyDiskImages = [ 4096 ];
|
||||
virtualisation.emptyDiskImages = [
|
||||
4096
|
||||
1024
|
||||
];
|
||||
boot.supportedFilesystems = [ "bcachefs" ];
|
||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||
|
||||
|
@ -2,6 +2,7 @@
|
||||
set -euxo pipefail
|
||||
|
||||
blkdev="/dev/vdb"
|
||||
blkdev2="/dev/vdc"
|
||||
mnt=$(mktemp -d)
|
||||
pw=$(genpass)
|
||||
uuid=$(uuidgen)
|
||||
@ -24,14 +25,21 @@ echo "$pw" | bcachefs format \
|
||||
--replicas=2 \
|
||||
--uuid "$uuid" \
|
||||
--fs_label test-fs \
|
||||
"$blkdev"?
|
||||
"${blkdev}"{1,2}
|
||||
|
||||
udevadm settle
|
||||
|
||||
echo "$pw" | bcachefs mount "UUID=$uuid" "$mnt"
|
||||
|
||||
bcachefs device add "$mnt" "${blkdev}3"
|
||||
bcachefs device add "$mnt" "$blkdev2"
|
||||
|
||||
udevadm settle
|
||||
|
||||
blkid
|
||||
|
||||
keyctl search @u user "bcachefs:$uuid"
|
||||
|
||||
umount "$mnt"
|
||||
|
||||
bcachefs mount "${blkdev}1" "$mnt"
|
||||
bcachefs mount "UUID=$uuid" "$mnt"
|
||||
|
Loading…
Reference in New Issue
Block a user