Actual use of special vdev. Metadata + special_small_blocks

StarkJohan

Explorer
Joined
Mar 27, 2015
Messages
62
I have a 4TB pool setup with two dual mirrors (4 hdds) with "old" data. I recently added a special metadata vdev mirror (2 ssds). The capacity needed for small blocks at maximum 32K is approximately 127G according to the "Block size histogram" (zdb -LbbbA -U /data/zfs/zpool.cache <poolname>). The capacity of the special vdev is 480GB which should be more than adequate for metadata + 32K small blocks as far as I can tell. I've set special_small_blocks of the datasets to 32K. So for so good, pool works just fine.

I understand that only newly written small blocks up to and including 32K in my case will actually be written to the ssd vdev. I also understand that I can move the data away from the pool and back again to "force" small blocks to be written to the special vdev.

1a. How do I find out how much space is allocated for the metadata?
1b. How do I know if the metadata is still on the hdds or if the metadata is on the special vdev?
...and more importantly:
2. How do I find out how much of the special_small_blocks is stored on the ssd special vdev?

I would like to know this before "forcing" the small blocks to be written again to be sure my operation does what I think is should do.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

StarkJohan

Explorer
Joined
Mar 27, 2015
Messages
62
zpool list -v
Thanks. I didn't realise the verbose option of zpool list did exactly this.
Not easy, forget it.
But totally possible I would presume?
Unless you did something about it, it is.
Sounds to me like there is something that actually can be done about it?

Will moving the data away from the dataset and moving it back write the metadata (as well as the small blocks) to the ssds? Simple enough in that case.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Will moving the data away from the dataset and moving it back write the metadata (as well as the small blocks) to the ssds?
Yes, or using a tool like this one:
 

StarkJohan

Explorer
Joined
Mar 27, 2015
Messages
62
Thanks for confirming and thanks for the "copy in place script" tip!
 
Top