mirror of
https://github.com/koverstreet/bcachefs-tools.git
synced 2025-02-23 00:00:02 +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 =
|
nodes.machine =
|
||||||
{ pkgs, ... }:
|
{ pkgs, ... }:
|
||||||
{
|
{
|
||||||
virtualisation.emptyDiskImages = [ 4096 ];
|
virtualisation.emptyDiskImages = [
|
||||||
|
4096
|
||||||
|
1024
|
||||||
|
];
|
||||||
boot.supportedFilesystems = [ "bcachefs" ];
|
boot.supportedFilesystems = [ "bcachefs" ];
|
||||||
boot.kernelPackages = pkgs.linuxPackages_latest;
|
boot.kernelPackages = pkgs.linuxPackages_latest;
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
set -euxo pipefail
|
set -euxo pipefail
|
||||||
|
|
||||||
blkdev="/dev/vdb"
|
blkdev="/dev/vdb"
|
||||||
|
blkdev2="/dev/vdc"
|
||||||
mnt=$(mktemp -d)
|
mnt=$(mktemp -d)
|
||||||
pw=$(genpass)
|
pw=$(genpass)
|
||||||
uuid=$(uuidgen)
|
uuid=$(uuidgen)
|
||||||
@ -24,14 +25,21 @@ echo "$pw" | bcachefs format \
|
|||||||
--replicas=2 \
|
--replicas=2 \
|
||||||
--uuid "$uuid" \
|
--uuid "$uuid" \
|
||||||
--fs_label test-fs \
|
--fs_label test-fs \
|
||||||
"$blkdev"?
|
"${blkdev}"{1,2}
|
||||||
|
|
||||||
udevadm settle
|
udevadm settle
|
||||||
|
|
||||||
echo "$pw" | bcachefs mount "UUID=$uuid" "$mnt"
|
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"
|
keyctl search @u user "bcachefs:$uuid"
|
||||||
|
|
||||||
umount "$mnt"
|
umount "$mnt"
|
||||||
|
|
||||||
bcachefs mount "${blkdev}1" "$mnt"
|
bcachefs mount "UUID=$uuid" "$mnt"
|
||||||
|
Loading…
Reference in New Issue
Block a user