On Sun, 9 Feb 2014 06:38:53 +0000 (UTC) Duncan <1i5t5.dun...@cox.net> wrote:
> RAID or multi-device filesystems aren't 1970s features and break 1970s > behavior and the assumptions associated with it. If you're not prepared > to deal with those broken assumptions, don't. Use mdraid or dmraid or lvm > or whatever to combine your multiple devices into one logical devices as > presented, and put your filesystem (either traditional filesystem, or > even btrfs using traditional single-device functionality) on top of the > single device the layer beneath the filesystem presents. Problem solved! > =:^) > > Note that df only lists a single device as well, not the multiple > component devices of the filesystem. That's broken functionality by your > definition, too, and again, using some other layer like lvm or mdraid to > present multiple devices as a single virtual device, with a traditional > single-device filesystem layout on top of that single device... solves > the problem! No reason BTRFS can't work well in a similar simplistic usage scenario. You seem to insist there is no way around it being "too flexible for its own good", but all those advanced features absolutely don't *have* to get in the way of everyday usage for users who don't require them. > Meanwhile, what I've done here is use one of df's commandline options to > set its block size to 2 MiB, and further used bash's alias functionality > to setup an alias accordingly: > > alias df='df -B2M' > > $ df /h > Filesystem 2M-blocks Used Available Use% Mounted on > /dev/sda6 20480 12186 7909 61% /h > > $ sudo btrfs fi show /h > Label: hm0238gcnx+35l0 uuid: ce23242a-b0a9-423f-a9c3-7db2729f48d6 > Total devices 2 FS bytes used 11.90GiB > devid 1 size 20.00GiB used 14.78GiB path /dev/sda6 > devid 2 size 20.00GiB used 14.78GiB path /dev/sdb6 > > $ sudo btrfs fi df /h > Data, RAID1: total=14.00GiB, used=11.49GiB > System, RAID1: total=32.00MiB, used=16.00KiB > Metadata, RAID1: total=768.00MiB, used=414.94MiB > > > On btrfs such as the above I can read the 2M blocks as 1M and be happy. > > On btrfs such as my /boot, which aren't raid1 (I have two separate > /boots, one on each device, with grub2 configured separately for each to > provide a backup), or if I df my media partitions still on reiserfs on > the old spinning rust, I can either double the figures DF gives me, or > add a second -B option at the CLI, overriding the aliased option. Congratulations, you broke your df readings on all other filesystems to fix them on btrfs. > If I wanted something fully automated, it'd be easy enough to setup a > script that checked what filesystem I was df-ing, matched that against a > table of filesystems to preferred df block sizes, and supplied the > appropriate -BxX option accordingly. I am not sure this would work well in the network share scenario described earlier, with clients which in the real world are largely Windows-based. -- With respect, Roman
signature.asc
Description: PGP signature