BTRF FILE SYSTEM ON RED HAT
Resize '/btrfstest' of '2:300M'
You has reduced the file system to 300M, you will need to know that if you perform this activity and the file system has information you can corrupt the data on the File System
5.-ADDING NEW DEVICE TO BTRSFS
6.-REMOVING NEW DEVICE TO BTRSFS
1.-CREATING A BTRF FILE SYSTEMM
mkfs.btrfs /dev/device
#
mkfs.btrfs /dev/sdc1
2.-MOUNTING A BTRF FILE SYSTEM
mount /dev/device /mount-point
# mount /dev/sdc1 /btrfstest
3.-RESIZING A BTRF FILE SYSTEM
You can increase the btrs file system in this case +200M
btrfs filesystem resize amount /mount-point
#btrfs filesystem resize +500M /btrfstst
Resize '/btrfstest' of '+500M'
4.-SHRINKING A BTRFS FILE SYSTEM
btrfs filesystem show /mount-point
+
devid 1 size 1.00GiB used 224.75MiB path /dev/vda
devid 2 size 400.00MiB used 204.75MiB path /dev/vdb
devid 3 size 2.00GiB used 8.00MiB path /dev/vdc
devid 4 size 3.00GiB used 8.00MiB path /dev/vdd
btrfs filesystem resize devid:amount /mount-point
# btrfs filesystem resize 2:300M /btrfstest Resize '/btrfstest' of '2:300M'
You has reduced the file system to 300M, you will need to know that if you perform this activity and the file system has information you can corrupt the data on the File System
5.-ADDING NEW DEVICE TO BTRSFS
# mkfs.btrfs /dev/device1
# mount /dev/device1
Next, add a second device to the mounted btrfs file system.
# btrfs device add /dev/device2 /mount-point
The metadata and data on these devices are still stored only on
/dev/device1
. It must now be balanced to spread across all devices.
# btrfs filesystem balance /mount-point
6.-REMOVING NEW DEVICE TO BTRSFS
Adding
# btrfs device add /dev/sdc /mnt
Removing
# btrfs device delete /dev/sdc /mnt
6.-SCANNING NEW DEVICE TO BTRSFS
To Scan all devices
# btrfs device scan
To scan a single device, use the following command:
# btrfs device scan /dev/device
Comments