• 2 Posts
  • 64 Comments
Joined 9 months ago
cake
Cake day: January 8th, 2024

help-circle


















  • First of all, thanks this r news for me. But I don’t think is a good idea to use the swap file in btrfs.

    It is supported since kernel 5.0

    There are some limitations of the implementation in BTRFS and Linux swap subsystem:

    filesystem - must be only single device
    
    filesystem - must have only single data profile
    
    subvolume - cannot be snapshotted if it contains any active swapfiles
    
    swapfile - must be preallocated (i.e. no holes)
    
    swapfile - must be NODATACOW (i.e. also NODATASUM, no compression)
    

    With active swapfiles, the following whole-filesystem operations will skip swapfile extents or may fail:

    balance - block groups with extents of any active swapfiles are skipped and reported, the rest will be processed normally
    
    resize grow - unaffected
    
    resize shrink - works as long as the extents of any active swapfiles are outside of the shrunk range
    
    device add - if the new devices do not interfere with any already active swapfiles this operation will work, though no new swapfile can be activated afterwards
    
    device delete - if the device has been added as above, it can be also deleted
    
    device replace - ditto
    

  • It depends, for a normal user? Ext4, maybe btrfs because in terms of stability is the best {but u lose some functions like the ability to make a swap file, wich today isn’t really that useful, but u lose the ability to make one). Want something really fast fort large files? ZFS, but if u experience an energy loss it could be really catastrophic.

    Ext in general is so good that even to this day android it’s still using EXT2, 2!