Written by J. Moellenkamp on
Reading time: 1 minute
SolarisEnglish
Find out in-depth information about a file in ZFS
When working with ZFS, you probably know that you can change many parameters of a filesystem at runtime, for example the record size. But how do you find out, what record size was used when you created a file.
So, how do you find out for example the blocksize of the file? For example if you created those database files before you’ve set the record size of the filesystem to the same as the database or afterwards … as this has an performance impact this an useful information to obtain. Just looking at the recordsize property of zfs doesn’t help you here, as you see the recordsize currently set, not the one set at file creation time.
At first find out the inode number of the object:
Now take the number in front of the filename and gather in-depth information with zdb -dddd <dataset name> <inode number>
As you see, the file has been written with 128k block size. Now we change the recordsize to 8k and copy the file to create an object with the new size.