logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

bcachefs — manage bcachefs filesystems/devices

Commands For Debugging

       These commands work on offline, unmounted filesystems.

       bcachefsdump [options] device
               Dump filesystem metadata

               -ooutput
                       Required flag: Output qcow2 image(s)

               -f      Force; overwrite when needed

       bcachefslist [options] devices...
               List filesystem metadata to stdout

               -b (extents | inodes | dirents | xattrs)
                       Btree to list from

               -sinode:offset
                       Start position to list from

               -einode:offset
                       End position

               -iinode
                       List keys for a given inode number

               -m (keys | formats)

               -f      Force fsck

               -v      Verbose mode List mode

Commands For Encryption

bcachefsunlockdevice
               Unlock an encrypted filesystem prior to running/mounting.

       bcachefsset-passphrasedevices...
               Change passphrase on an existing (unmounted) filesystem.

       bcachefsremove-passphrasedevices...
               Remove passphrase on an existing (unmounted) filesystem.

Commands For Managing A Running Filesystem

bcachefsfsusage [options] [filesystem]
               Show disk usage.

               -h      Print human readable sizes.

Commands For Managing Devices Within A Running Filesystem

bcachefsdeviceadd [options] device
               Add a device to an existing filesystem.

               --fs_size=size
                       Size of filesystem on device

               --bucket=size
                       Set bucket size

               --discard
                       Enable discards

               -f, --force
                       Use device even if it appears to already be formatted

       bcachefsdeviceremove [options] device
               Remove a device from a filesystem

               -f, --force
                       Force removal, even if some data couldn't be migrated

               --force-metadata
                       Force removal, even if some metadata couldn't be migrated

       bcachefsdeviceonlinedevice
               Re-add a device to a running filesystem

       bcachefsdeviceofflinedevice
               Take a device offline, without removing it

               -f, --force
                       Force, if data redundancy will be degraded

       bcachefsdeviceevacuatedevice
               Move data off of a given device

       bcachefsdeviceset-state [options] devicenew-state-f, --force
                       Force, if data redundancy will be degraded

       bcachefsdeviceresizedevice [size]
               Resize filesystem on a device

Commands For Managing Filesystem Data

bcachefsdevicerereplicatefilesystem
               Walks existing data in a filesystem, writing additional copies of any degraded data.

Commands For Migration

bcachefsmigrate [options] device
               Migrate an existing filesystem to bcachefs

               -ffs   Root of filesystem to migrate

               --encrypted
                       Enable whole filesystem encryption (chacha20/poly1305)

               --no_passphrase
                       Don't encrypt master encryption key

               -F      Force, even if metadata file already exists

       bcachefsmigrate-superblock [options] device
               Create default superblock after migrating

               -ddevice
                       Device to create superblock for

               -ooffset
                       Offset of existing superblock

Description

       The bcachefs utility supports the following subcommands, which are documented in detail below:

   Superblockcommandsformat              Format one or a list of devices with bcachefs data structures.
       show-super          Dump superblock information to stdout.

   Repaircommandsfsck                Check an existing filesystem for errors.

   Startup/shutdown,assemblyofmultidevicefilesystemsassemble            Assemble an existing multi device filesystem
       incremental         Incrementally assemble an existing multi device filesystem
       run                 Start a partially assembled filesystem.
       stop                Stop a running filesystem.

   Commandsformanagingarunningfilesystemfsusage            Show disk usage

   Commandsformanagingdeviceswithinarunningfilesystemdeviceadd          Add a new device to an existing filesystem
       deviceremove       Remove a device from an existing filesystem
       deviceonline       Re-add an existing member to a filesystem
       deviceoffline      Take a device offline, without removing it
       deviceevacuate     Migrate data off of a specific device
       deviceset-state    Mark a device as failed
       deviceresize       Resize filesystem on a device

   Commandsformanagingfilesystemdatadatarereplicate    Rereplicate degraded data

   Commandsforencryptionunlock              Unlock an encrypted filesystem prior to running/mounting
       set-passphrase      Change passphrase on an existing (unmounted) filesystem
       remove-passphrase   Remove passphrase on an existing (unmounted) filesystem

   Commandsformigrationmigrate             Migrate an existing filesystem to bcachefs, in place
       migrate-superblock  Add default superblock, after bcachefs migrate

   Commandsfordebuggingdump                Dump filesystem metadata to a qcow2 image
       list                List filesystem metadata in textual form

   Miscellaneouscommandsversion             Display the version of the invoked bcachefs tool

Exit Status

       The bcachefs utility exits 0 on success, and >0 if an error occurs.

Debian                                            May 26, 2018                                       BCACHEFS(8)

Miscellaneous Commands

bcachefsversion
               Display the version of the invoked bcachefs tool

Name

       bcachefs — manage bcachefs filesystems/devices

Repair Commands

bcachefsfsck [options] devices...
               Check an existing filesystem for errors.

               -p      Automatic repair (no questions)

               -n      Don't repair, only check for errors

               -y      Assume "yes" to all questions

               -f      Force checking even if filesystem is marked clean

               -v      Be verbose

Startup/Shutdown, Assembly Of Multi Device Filesystems

bcachefsassembledevices...
               Assemble an existing multi device filesystem.

       bcachefsincrementaldevice
               Incrementally assemble an existing multi device filesystem.

       bcachefsrun
               Start a partially assembled filesystem.

       bcachefsstopfilesystem
               Stop a running filesystem.

Superblock Commands

bcachefsformat [options] devices...
               Format  one  or  a list of devices with bcachefs data structures.  You need to do this before you
               create a volume.

               Device specific options must come before corresponding devices, e.g.
                     bcachefsformat--group=ssd/dev/sda--group=hdd/dev/sdb-b, --block=size
                       block size, in bytes (e.g. 4k)

               --btree_node=size
                       Btree node size, default 256k

               --metadata_checksum_type=(none | crc32c | crc64)
                       Set metadata checksum type (default: crc32c).

               --data_checksum_type=(none | crc32c | crc64)
                       Set data checksum type (default: crc32c).

               --compression_type=(none | lz4 | gzip)
                       Set compression type (default: none).

               --data_replicas=number
                       Number of data replicas

               --metadata_replicas=number
                       Number of metadata replicas

               --replicas=number
                       Sets both data and metadata replicas

               --encrypted
                       Enable whole filesystem encryption (chacha20/poly1305); passphrase will be prompted for.

               --no_passphrase
                       Don't encrypt master encryption key

               --error_action=(continue | remount-ro | panic)
                       Action to take on filesystem error (default: remount-ro)

               -L, --label=label
                       Create the filesystem with the specified label-U, --uuid=uuid
                       Create the filesystem with the specified uuid-f, --force
                       Force the filesystem to be created, even if the device already contains a filesystem.

               Device specific options:

               --fs_size=size
                       Create the filesystem using size bytes on the subsequent device.

               --bucket=size
                       Specifies the bucket size; must be greater than the btree node size

               --discard
                       Enable discards on subsequent devices

               -q, --quiet
                       Only print errors

       bcachefsshow-super [options] device
               Dump superblock information to stdout.

               -f, --fields=fields
                       List of sections to print

               -l, --layout
                       Print superblock layout

Synopsis

bcachefscommand [options] [arguments]

See Also