What is the correct order to delete the /dev/sdb device from the btrfs file system and for defragmenting the reduced file system?

You have an unmounted btrfs file system:
# btrfs filesystem show
Label: ‘Btrfs’ uuid: 7bfe3239-47ee-442b-b9f8-49f88b6b1be4 Total devices 3 FS bytes used 300.51MB devid2 size 4.88GB used 1.06GB path /dev/sdd devidl size 4.88GB used 580.00GB path /dev/sdc devid3 size 4.88GB used 1.50GB path/dev/sdb You have these mounted devices:
# df -h
Filesystem
Size
Used
Avail
Use%
Mounted on
/dev/mapper/vg_exam1-LogVol_system
9.6G
3.3G
3.9G
46%
/
tmpfs
499M
0
499M
0%
/dev/shm
/dev/sda1
485M
77M
384M
17%
/boot

You have a mount point for the btrfs file system:
# Is -all /btrfs K
total 0 k
drwxr-xr-x. 1 root root 0 Aug 12 10:17 . dr-xr-xr-x. 1 root root 276 Aug 12 10:36 ..

Examine these steps:
1. Manual defragment is not needed. Btrfs will defragment it automatically.
2. btrfs device defragment /dev/sdd
3. btrfs filesystem defragment /btrfs
4. btrfs device delete /dev/sdb /btrfs
5. mount UUID=7bfe3239-47ee-442b-b9f8-49f88b6b1be4 /btrfs
6. btrfs device delete /dev/sdb /dev/sdd

What is the correct order to delete the /dev/sdb device from the btrfs file system and for defragmenting the reduced file system?

You have an unmounted btrfs file system:
# btrfs filesystem show
Label: ‘Btrfs’ uuid: 7bfe3239-47ee-442b-b9f8-49f88b6b1be4 Total devices 3 FS bytes used 300.51MB devid2 size 4.88GB used 1.06GB path /dev/sdd devidl size 4.88GB used 580.00GB path /dev/sdc devid3 size 4.88GB used 1.50GB path/dev/sdb You have these mounted devices:
# df -h
Filesystem
Size
Used
Avail
Use%
Mounted on
/dev/mapper/vg_exam1-LogVol_system
9.6G
3.3G
3.9G
46%
/
tmpfs
499M
0
499M
0%
/dev/shm
/dev/sda1
485M
77M
384M
17%
/boot

You have a mount point for the btrfs file system:
# Is -all /btrfs K
total 0 k
drwxr-xr-x. 1 root root 0 Aug 12 10:17 . dr-xr-xr-x. 1 root root 276 Aug 12 10:36 ..

Examine these steps:
1. Manual defragment is not needed. Btrfs will defragment it automatically.
2. btrfs device defragment /dev/sdd
3. btrfs filesystem defragment /btrfs
4. btrfs device delete /dev/sdb /btrfs
5. mount UUID=7bfe3239-47ee-442b-b9f8-49f88b6b1be4 /btrfs
6. btrfs device delete /dev/sdb /dev/sdd

What is the correct order to delete the /dev/sdb device from the btrfs file system and for defragmenting the reduced file system?

A.
6,1

B.
5,4,3

C.
5,6,4, 3

D.
5,6,1 O

E.
4,2



Leave a Reply 2

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


some.guy

some.guy

Agreed w/ deyo: B

o You can set up automatic defragmentation by specifying the autodefrag
option when you mount the file system (but that option is not present
in the question, so a manual defrag is required).
o ‘btrfs device delete $device $mountpoint’ requires the file system be
mounted
o There is no ‘btrfs device defragment’ command