[Only the options being used by GParted are quoted here from the help
output. More options are available.]
$ bcachefs fsck --help
bcachefs fsck - filesystem check and repair
Usage: bcachefs fsck [OPTION]... <device>
Options:
-y Assume "yes" to all questions
-f Force checking even if filesystem is marked clean
-v Be verbose
Closes!123 - Add support for bcachefs, single device file systems only
Add reading of the bcachefs file system label, not the per device label,
and the external UUID. These match what blkid reports.
Example without a label:
# bcachefs format /dev/sdb1
# bcachefs show-super /dev/sdb1 | egrep -i 'Label:|UUID:|Device:'
External UUID: 3316bc9a-d129-42b6-a80e-9649874bca73
Internal UUID: 656eebe5-10a9-4f12-94c8-aab2fdc54732
Label:
Device: 0
Label: (none)
UUID: cd436a8d-82eb-4993-a317-b39ea0d6bd2e
# blkid /dev/sdb1
/dev/sdb1: UUID="3316bc9a-d129-42b6-a80e-9649874bca73" BLOCK_SIZE="512" UUID_SUB="cd436a8d-82eb-4993-a317-b39ea0d6bd2e" TYPE="bcachefs" PARTUUID="7962e584-34c9-4088-8a00-a651af517089"
Example with a label:
# bcachefs format --force -L 'test label' /dev/sdb1
# bcachefs show-super /dev/sdb1 | egrep -i 'Label:|UUID:|Device:'
External UUID: 3d7bdabe-2616-4545-affc-1aba0f8fb4a7
Internal UUID: 9cc95d3e-7991-4f78-9dd0-850cb9749e34
Label: test label
Device: 0
Label: (none)
UUID: 784d1bd0-5769-4fbb-ad32-07894d381bba
# blkid /dev/sdb1
/dev/sdb1: UUID="3d7bdabe-2616-4545-affc-1aba0f8fb4a7" LABEL="test label" BLOCK_SIZE="512" UUID_SUB="784d1bd0-5769-4fbb-ad32-07894d381bba" TYPE="bcachefs" PARTUUID="7962e584-34c9-4088-8a00-a651af517089"
Closes!123 - Add support for bcachefs, single device file systems only
Currently bcachefs-tools only provides a method to report the file
system usage while it is mounted. We won't make GParted mount a
bcachefs to read it's usage as we want to keep GParted's scanning as a
read-only activity. Therefore GParted can't report the usage of an
unmounted bcachefs.
# bcachefs format /dev/sdb1
# bcachefs fs usage /dev/sdb1
error opening /dev/sdb1: not a bcachefs filesystem
# echo $?
1
# bcachefs fs usage --help
bcachefs fs usage - display detailed filesystem usage
Usage: bcachefs fs usage [OPTION]... <mountpoint>
...
# mount /dev/sdb1 /mnt/1
# bcachefs fs usage /mnt/1
Filesystem: a61a8302-9a79-4c24-a9e6-486e7fcc78f5
Size: 987842560
Used: 12713984
Online reserved: 0
Data type Required/total Durability Devices
btree: 1/1 1 [sdb1] 1048576
(no label) (device 0): sdb1 rw
data buckets fragmented
free: 1061027840 8095
sb: 3149824 25 126976
journal: 8388608 64
btree: 1048576 8
user: 0 0
cached: 0 0
parity: 0 0
stripe: 0 0
need_gc_gens: 0 0
need_discard: 0 0
capacity: 1073741824 8192
# echo $?
0
Closes!123 - Add support for bcachefs, single device file systems only
Set the minimum file system size to 16 MiB as creating a bcachefs that
size succeeds:
$ truncate -s $((16*1024*1024)) /tmp/disk.img
$ bcachefs format /tmp/disk.img
...
initializing new filesystem
going read-write
initializing freespace
$ echo $?
0
Where as creating a smaller file system fails for most sizes below that:
$ rm /tmp/disk.img
$ truncate -s $((15*1024*1024)) /tmp/disk.img
$ bcachefs format /tmp/disk.img
...
mounting version 1.6: btree_subvolume_children
initializing new filesystem
going read-write
bch2_trans_mark_dev_sb(): error ENOSPC_disk_reservation
bch2_fs_initialize(): error marking superblocks ENOSPC_disk_reservation
bch2_fs_initialize(): error ENOSPC_disk_reservation
bch2_fs_start(): error starting filesystem ENOSPC_disk_reservation
error opening /tmp/disk.img: ENOSPC_disk_reservation
$ echo $?
1
Closes!123 - Add support for bcachefs, single device file systems only