Since CoW / reflink does not seem to work between subvolumes (a bug or a feature?), is it somehow possible to get the subvolume (used) size? There is a standard df tool, but it can be a lengthy process for filesystems with lots of files. "btrfs filesystem df" only shows total size for the whole btrfs filesystem. Say, I create subvolumes called public, office, staff and pack a lot of files there. Does btrfs somehow allows to get the current size of these subvolumes (other than using df tool to traverse all files and directories)? -- Tomasz Chmielewski http://wpkg.org -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 10/5/2010 7:26 AM, Tomasz Chmielewski wrote:> There is a standard df tool, but it can be a lengthy process for > filesystems with lots of files.Maybe you mean du? df takes almost no time at all and does not care how many files there are. -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On 05.10.2010 17:33, Phillip Susi wrote:> On 10/5/2010 7:26 AM, Tomasz Chmielewski wrote: >> There is a standard df tool, but it can be a lengthy process for >> filesystems with lots of files. > > Maybe you mean du? df takes almost no time at all and does not care how > many files there are.Yep, I certainly meant du there. -- Tomasz Chmielewski http://wpkg.org -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Tomasz Chmielewski, Tue, 05 Oct 2010 18:07:58 +0200:> On 05.10.2010 17:33, Phillip Susi wrote: >> On 10/5/2010 7:26 AM, Tomasz Chmielewski wrote: >>> There is a standard df tool, but it can be a lengthy process for >>> filesystems with lots of files. >> >> Maybe you mean du? df takes almost no time at all and does not care >> how many files there are. > > Yep, I certainly meant du there. >Just be carefull, because for example if you use -o compress, the space the files are actually using can be different... Lubos -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
>>> Maybe you mean du? df takes almost no time at all and does not care >>> how many files there are. >> >> Yep, I certainly meant du there. >> > > Just be carefull, because for example if you use -o compress, the space > the files are actually using can be different...Certainly, one more reason why btrfs reporting subvolume size usage would be useful ;) -- Tomasz Chmielewski http://wpkg.org -- To unsubscribe from this list: send the line "unsubscribe linux-btrfs" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html