Date: Sat, 16 Feb 2013 13:00:53 +0100 From: Adam Nowacki <nowakpl@platinum.linux.pl> To: freebsd-fs@freebsd.org Subject: Re: Calculating ZFS pool sizes at different ashift values Message-ID: <511F74F5.2050900@platinum.linux.pl> In-Reply-To: <20130216112328.GA416@server.rulingia.com> References: <20130216112328.GA416@server.rulingia.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2013-02-16 12:23, Peter Jeremy wrote: > I am trying to work out the impact of converting my ZFS pools from > ashift=9 to ashift=12. In theory, that's just a matter of getting a > list of the sizes of each object, rounding each size up to 4KiB and > summing the total but I'm having problems with the "each object" bit. Assuming single disk or mirror. For raidz parity and alignment has to be counted too. > "zdb -dd" reports each object and the 'dsize' column gives the on-disk > size. But it lists the objects in each filesystem snapshot so the > same object can appear multiple times in the output. And object > numbers are only unique within a filesystem, though they don't appear > to correlate with znode numbers for files. Further, the following > appears to show that the same object can have different sizes in > different snapshots: > Dataset zroot/var/obj@r242865a [ZPL], ID 8205, cr_txg 10094330, 820M, 75640 objects > Object lvl iblk dblk dsize lsize %full type > 54536 2 16K 128K 55.5K 256K 100.00 ZFS plain file > Dataset zroot/var/obj@r237444 [ZPL], ID 30, cr_txg 7939066, 573M, 64913 objects > 54536 1 16K 10.0K 2.50K 10.0K 100.00 ZFS plain file > > Does this represent a total of 55.5K on disk (the 2.5K in the second > snapshot is part of the 55.5K in the first snapshot) or 58K on disk > (the two objects are distinct despite having the same number)? > > Can anyone explain how to identify unique objects and their sizes within > a zpool? > 'zdb -vvvv zroot/var/obj@r242865a' and count unique DVAs. If both snapshots have same DVA then this particular block is shared. DVA is 'vdev number : offset : size' (in hex).
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?511F74F5.2050900>