Robert White posted on Tue, 18 Nov 2014 02:39:48 -0800 as excerpted: > How does one get the exact size (in blocks preferably, but bytes okay) > of the filesystem inside a partition? I know how to get the partition > size, but that's not useful when shrinking a partition...
> There needs to be an option to btrfs filesystem show that will tell you > XXXXXblocks, not Y.ZZ terabytes. While having a btrfs fi show option for that would be nice, take a look at the output of btrfs-show-super. The dev_item.total_bytes line appears to be the total filesystem bytes -- at least here on my exactly-8-GiB partitions, that's /exactly/ what it shows, 8589934592, which is 8*1024*1024*1024, and my /exactly/ 256 MiB partition shows 268435456, /exactly/ 256 MiB, as well. The total_bytes line is the full /filesystem/ size, which should be the same as the dev_item.total_bytes number on a single-device-filesystem. Of course on my two-device btrfs filesystems here it's showing double the single-device size, which is as it should be. But you're correct, having a btrfs fi show option for that would be more end-user friendly. The btrfs-show-super output is rather low-level for that, but it does work. -- Duncan - List replies preferred. No HTML msgs. "Every nonfree program has a lord, a master -- and if you use the program, he is your master." Richard Stallman -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html