From Fedora Project Wiki
(improve formatting) |
Chrismurphy (talk | contribs) (lvcreate fix) |
||
Line 24: | Line 24: | ||
| `btrfs device add`; then<br/> `btrfs device remove` || mkfs and resize are implied <br/> data migration, resize, magic wipe are implied | | `btrfs device add`; then<br/> `btrfs device remove` || mkfs and resize are implied <br/> data migration, resize, magic wipe are implied | ||
|- | |- | ||
| `lvcreate` || `btrfs | | `lvcreate` || `btrfs subvolume create` || | ||
|- | |- | ||
| `lvcreate --snapshot` || `btrfs subvolume snapshot -r` || lvm snapshots are initially ro, btrfs snapshots are rw unless -r is used | | `lvcreate --snapshot` || `btrfs subvolume snapshot -r` || lvm snapshots are initially ro, btrfs snapshots are rw unless -r is used |
Latest revision as of 15:31, 4 September 2020
Commands
LVM commands | Btrfs commands | Note |
---|---|---|
pvs ,pvdisplay |
btrfs filesystem show |
shows all btrfs, mounted or not |
vgs ,vgdisplay |
btrfs device usage /mnt |
device allocation info |
btrfs filesystem usage /mnt |
most complete command | |
lvs |
btrfs subvolume list |
not exact analogs |
lvdisplay |
btrfs subvolume show |
not exact analogs |
pvcreate +vgextend +lvresize +resize2fs /xfs_growfs +(fsadm resize ) |
btrfs device add /dev/ /mnt |
mkfs and resize are implied |
(fsadm resize )+resize2fs /xfs_growfs +lvresize +vgreduce +pvcreate |
btrfs device remove /dev/ /mnt |
data migration, resize, magic wipe are implied |
resize2fs /xfs_growfs |
btrfs filesystem resize |
|
pvmove |
btrfs replace ; or |
preferred; new drive must be equal to or larger than old |
btrfs device add ; thenbtrfs device remove |
mkfs and resize are implied data migration, resize, magic wipe are implied | |
lvcreate |
btrfs subvolume create |
|
lvcreate --snapshot |
btrfs subvolume snapshot -r |
lvm snapshots are initially ro, btrfs snapshots are rw unless -r is used |
lvremove |
btrfs subvolume delete |
|
? | btrfs filesystem du |
btrfs specific du , shows total, shared, and exclusive usage for a subvolume or directory; only comes into play with snapshotting and reflinks, otherwise it'll match regular du
|
? | btrfs scrub start /status /cancel /resume |
online metadata/data integrity check, only csum verification, is not an fsck |
FAQ
- Why do 'du' and 'btrfs filesystem du' totals differ?
- Most likely due to inline extents. du will compute small files with a minimum 4KiB, the data block size. But the actual storage consumption of small files when inline (saved with the inode metadata in a leaf, hence inline) is quite a bit less.