Calculating ZFS pool sizes at different ashift values
Peter Jeremy
peter at rulingia.com
Sat Feb 16 11:23:44 UTC 2013
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.
"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 at 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 at 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?
--
Peter Jeremy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-fs/attachments/20130216/96992495/attachment.sig>
More information about the freebsd-fs
mailing list