You are not logged in.
Pages: 1
In getting and formatting 2 X 4tb WD green drives by "mkfs.btrfs -m raid1 -d raid1 /dev/sdc /dev/sdd" and then mount by "mount /dev/sdc /mnt" each drive if filled half the size of a copied file -- raid 0 behavior. I find this even more odd because when I run "btrfs fi df /mnt" it prints the following:
Data, RAID1: total=3.00GiB, used=2.51GiB
System, RAID1: total=32.00MiB, used=16.00KiB
Metadata, RAID1: total=1.00GiB, used=3.03MiB
GlobalReserve, single: total=16.00MiB, used=0.00
"btrfs fi show /mnt" prints
Label: none uuid: 4a7536a5-14ea-4f8a-8fe1-672d666f6cbb
Total devices 2 FS bytes used 2.52GiB
devid 1 size 3.64TiB used 4.03GiB path /dev/sdc
devid 2 size 3.64TiB used 4.03GiB path /dev/sdd
and gparted shows each drive as having used ~1.26GB. What is going on?
Offline
Measuring the space used/free in btrfs is very tricky and the output often is a little misleading.
I have about 900GB of space total in a RAID1 configuration with four disks of various mixed sizes. I currently have about 50GB left free and am using LZO compression.
Here are various outputs for comparison:
# btrfs fi df /
Data, RAID1: total=445.00GiB, used=414.60GiB
System, RAID1: total=32.00MiB, used=72.00KiB
Metadata, RAID1: total=2.00GiB, used=1.08GiB
GlobalReserve, single: total=372.00MiB, used=0.00
# btrfs fi show /
Label: 'removed' uuid: 98xxaxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Total devices 4 FS bytes used 415.74GiB
devid 1 size 153.38GiB used 151.03GiB path /dev/sda
devid 2 size 74.53GiB used 73.00GiB path /dev/sdb
devid 3 size 232.89GiB used 231.00GiB path /dev/sdc
devid 4 size 465.76GiB used 439.03GiB path /dev/sdd
# df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sda 485786196 436330996 67668432 87% /
Note how 'btrfs fi show /' shows the actual physical space whereas 'btrfs fi df /' shows roughly half the amount as the data is RAID1.
Could some of the seeming discrepancy be due to compression in use on the file?
Last edited by davidm (2014-10-25 05:04:27)
Offline
Nope, maximally compressed by lzop, file size decreases by 8MB to 2.69GB. The file has to be split across drives.
Offline
According to http://lwn.net/Articles/577961/ it may be the case that gparted cannot be trusted to show accurate file system usage. I'm going to have to ask the gparted guys.
Offline
gparted is not being well maintained it appears in regards to btrfs. I suppose this should be withdrawn? I'm not used to tools not working.
Offline
Pages: 1