btrfs

On Ubuntu, install it with

apt install btrfs-tools

To format a partition in btrfs, run

root@backup:~# mkfs.btrfs -L mydisk /dev/sdc
btrfs-progs v4.4
See http://btrfs.wiki.kernel.org for more information.

Performing full device TRIM (32.00GiB) ...
Label:              mydisk
UUID:               14049348-3ebd-4e4e-b932-f4a041e72e46
Node size:          16384
Sector size:        4096
Filesystem size:    32.00GiB
Block group profiles:
  Data:             single            8.00MiB
  Metadata:         DUP               1.01GiB
  System:           DUP              12.00MiB
SSD detected:       no
Incompat features:  extref, skinny-metadata
Number of devices:  1
Devices:
   ID        SIZE  PATH
    1    32.00GiB  /dev/sdc

root@backup:~# parted /dev/sdc print
Model: ATA QEMU HARDDISK (scsi)
Disk /dev/sdc: 34.4GB
Sector size (logical/physical): 512B/512B
Partition Table: loop
Disk Flags: 

Number  Start  End     Size    File system  Flags
 1      0.00B  34.4GB  34.4GB  btrfs

root@backup:~# 

To mount, use

mkdir /mydisk
mount /dev/sdc /mydisk

Since we don’t create any partition inside /dev/sdc, we just use sdc instead of normal sdc1.

I tried with /dev/sdc1, but did not work.

root@backup:~# mount /dev/sdc1 /mydisk
mount: special device /dev/sdc1 does not exist
root@backup:~# mount /dev/sdc /mydisk
root@backup:~# 

Comments

Leave a Reply

Your email address will not be published. Required fields are marked *