Site Tools


start:noholesbtrfs

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
start:noholesbtrfs [2022/06/30 13:25] – created peterstart:noholesbtrfs [2023/09/14 20:48] (current) peter
Line 1: Line 1:
 +DATE CHECKED THIS PAGE WAS VALID: 14/09/2023 
 +
 If you created your BTRFS filesystem a little while ago you might not have no_holes support which is simply an improvement that can be added and reduces the size metadata consumes on the disk. You can check if your filesystem has it in 2 ways: If you created your BTRFS filesystem a little while ago you might not have no_holes support which is simply an improvement that can be added and reduces the size metadata consumes on the disk. You can check if your filesystem has it in 2 ways:
  
Line 11: Line 13:
 {{:images:noholesbtrfs.png|}} {{:images:noholesbtrfs.png|}}
    
 +As you can note, NO_HOLES is listed under incompat_flags.
 +
 +Another method is to check via the UUID in this way:
 +<code>
 +ls /sys/fs/btrfs/383732b1-5e87-4b68-a15a-f044bc559877/features/
 +</code>
 +{{:images:noholesbtrfs2.png|}}
 +
 +As we can see no_holes is also listed here.
 +
 +To add no_holes support the disk must be UNMOUNTED. This might mean you have to boot off a live CD like an ubuntu live ISO from a USB stick. 
 +
 +Once you have unmounted the filesystem you can easily add no_holes support with the -n flag as such:
 +<code>
 +sudo btrfstune -n /dev/nvme0n1p2
 +</code>
 +
 +Note, as that disk housed my root partition I had to use a live CD in order to run the command successfully then reboot back into my system afterwards.
 +
 +This completes how to add the no_hole improvement to a filesystem made prior to v5.15 when it became the default.
 +
 +
 +
start/noholesbtrfs.1656595529.txt.gz · Last modified: 2022/06/30 13:25 by peter