<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Examining_ZFS_Pools_with_zdb</id>
	<title>Examining ZFS Pools with zdb - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://wiki.lustre.org/index.php?action=history&amp;feed=atom&amp;title=Examining_ZFS_Pools_with_zdb"/>
	<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Examining_ZFS_Pools_with_zdb&amp;action=history"/>
	<updated>2026-11-22T12:12:05Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.7</generator>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Examining_ZFS_Pools_with_zdb&amp;diff=2733&amp;oldid=prev</id>
		<title>Malcolm at 05:51, 31 August 2017</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Examining_ZFS_Pools_with_zdb&amp;diff=2733&amp;oldid=prev"/>
		<updated>2017-08-31T05:51:26Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 21:51, 30 August 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l127&quot;&gt;Line 127:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 127:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:ZFS Object Storage Devices (OSDs)]]&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;[[Category:ZFS Object Storage Devices (OSDs)]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-deleted&quot;&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;[[Category:Lustre Systems Administration]]&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key wiki_lustre_org:diff::1.12:old-2625:rev-2733 --&gt;
&lt;/table&gt;</summary>
		<author><name>Malcolm</name></author>
	</entry>
	<entry>
		<id>http://wiki.lustre.org/index.php?title=Examining_ZFS_Pools_with_zdb&amp;diff=2625&amp;oldid=prev</id>
		<title>Malcolm: Created page with &quot;The &lt;code&gt;zdb&lt;/code&gt; (ZFS Debug) command is a useful tool for examining the low-level structure and metadata of a ZFS pool or dataset, and can read the information from the on...&quot;</title>
		<link rel="alternate" type="text/html" href="http://wiki.lustre.org/index.php?title=Examining_ZFS_Pools_with_zdb&amp;diff=2625&amp;oldid=prev"/>
		<updated>2017-08-11T08:30:18Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;The &amp;lt;code&amp;gt;zdb&amp;lt;/code&amp;gt; (ZFS Debug) command is a useful tool for examining the low-level structure and metadata of a ZFS pool or dataset, and can read the information from the on...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The &amp;lt;code&amp;gt;zdb&amp;lt;/code&amp;gt; (ZFS Debug) command is a useful tool for examining the low-level structure and metadata of a ZFS pool or dataset, and can read the information from the on-disk data structures of exported pools as well as from the ZFS pool cache file. The output is subject to change over time as ZFS is further developed, which means that the exact content contained in the output may vary depending on which version of ZFS is being used.&lt;br /&gt;
&lt;br /&gt;
This guide will not go into the details of the &amp;lt;code&amp;gt;zdb&amp;lt;/code&amp;gt; command but will highlight one useful feature for examining ZFS metadata.&lt;br /&gt;
&lt;br /&gt;
To read the configuration of a &amp;lt;code&amp;gt;zpool&amp;lt;/code&amp;gt; that is imported on a host, use the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto&amp;quot;&amp;gt;&lt;br /&gt;
zdb -C[C] &amp;lt;poolname&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt; option is used, the output will display the cached content from the zpool configuration cache. When &amp;lt;code&amp;gt;-C&amp;lt;/code&amp;gt; is referenced more than once, &amp;lt;code&amp;gt;zdb&amp;lt;/code&amp;gt; will also display on-disk configuration (called the Meta Object Set, or MOS).&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto&amp;quot;&amp;gt;&lt;br /&gt;
[root@rh7z-mds1 ~]# zpool list mgspool&lt;br /&gt;
NAME      SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH  ALTROOT&lt;br /&gt;
mgspool  1008M  2.23M  1006M         -     1%     0%  1.00x  ONLINE  -&lt;br /&gt;
[root@rh7z-mds1 ~]# zdb -C mgspool&lt;br /&gt;
&lt;br /&gt;
MOS Configuration:&lt;br /&gt;
        version: 5000&lt;br /&gt;
        name: &amp;#039;mgspool&amp;#039;&lt;br /&gt;
        state: 0&lt;br /&gt;
        txg: 34022&lt;br /&gt;
        pool_guid: 11089712772589408485&lt;br /&gt;
        errata: 0&lt;br /&gt;
        hostid: 1489912803&lt;br /&gt;
        hostname: &amp;#039;rh7z-mds1&amp;#039;&lt;br /&gt;
        vdev_children: 1&lt;br /&gt;
        vdev_tree:&lt;br /&gt;
            type: &amp;#039;root&amp;#039;&lt;br /&gt;
            id: 0&lt;br /&gt;
            guid: 11089712772589408485&lt;br /&gt;
            children[0]:&lt;br /&gt;
                type: &amp;#039;mirror&amp;#039;&lt;br /&gt;
                id: 0&lt;br /&gt;
                guid: 10014780520217715169&lt;br /&gt;
                metaslab_array: 34&lt;br /&gt;
                metaslab_shift: 24&lt;br /&gt;
                ashift: 9&lt;br /&gt;
                asize: 1058537472&lt;br /&gt;
                is_log: 0&lt;br /&gt;
                create_txg: 4&lt;br /&gt;
                children[0]:&lt;br /&gt;
                    type: &amp;#039;disk&amp;#039;&lt;br /&gt;
                    id: 0&lt;br /&gt;
                    guid: 12166736421740210173&lt;br /&gt;
                    path: &amp;#039;/dev/sda1&amp;#039;&lt;br /&gt;
                    whole_disk: 1&lt;br /&gt;
                    create_txg: 4&lt;br /&gt;
                children[1]:&lt;br /&gt;
                    type: &amp;#039;disk&amp;#039;&lt;br /&gt;
                    id: 1&lt;br /&gt;
                    guid: 8586593287004549671&lt;br /&gt;
                    path: &amp;#039;/dev/sdc1&amp;#039;&lt;br /&gt;
                    whole_disk: 1&lt;br /&gt;
                    create_txg: 4&lt;br /&gt;
        features_for_read:&lt;br /&gt;
            com.delphix:hole_birth&lt;br /&gt;
            com.delphix:embedded_data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
If the pool has not been imported to the current host, or if there is no zpool cache file on the host for a currently imported pool, use the following command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
zdb -e &amp;lt;poolname&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will provide a very large amount of output. To get the MOS configuration, use the following:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
zdb -eC[C] &amp;lt;poolname&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For example:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow-x:auto;&amp;quot;&amp;gt;&lt;br /&gt;
[root@rh7z-mds1 ~]# zdb -eC mgspool&lt;br /&gt;
&lt;br /&gt;
MOS Configuration:&lt;br /&gt;
        version: 5000&lt;br /&gt;
        name: &amp;#039;mgspool&amp;#039;&lt;br /&gt;
        state: 1&lt;br /&gt;
        txg: 34189&lt;br /&gt;
        pool_guid: 11089712772589408485&lt;br /&gt;
        errata: 0&lt;br /&gt;
        hostid: 1489912803&lt;br /&gt;
        hostname: &amp;#039;rh7z-mds1&amp;#039;&lt;br /&gt;
        vdev_children: 1&lt;br /&gt;
        vdev_tree:&lt;br /&gt;
            type: &amp;#039;root&amp;#039;&lt;br /&gt;
            id: 0&lt;br /&gt;
            guid: 11089712772589408485&lt;br /&gt;
            children[0]:&lt;br /&gt;
                type: &amp;#039;mirror&amp;#039;&lt;br /&gt;
                id: 0&lt;br /&gt;
                guid: 10014780520217715169&lt;br /&gt;
                metaslab_array: 34&lt;br /&gt;
                metaslab_shift: 24&lt;br /&gt;
                ashift: 9&lt;br /&gt;
                asize: 1058537472&lt;br /&gt;
                is_log: 0&lt;br /&gt;
                create_txg: 4&lt;br /&gt;
                children[0]:&lt;br /&gt;
                    type: &amp;#039;disk&amp;#039;&lt;br /&gt;
                    id: 0&lt;br /&gt;
                    guid: 12166736421740210173&lt;br /&gt;
                    path: &amp;#039;/dev/sda1&amp;#039;&lt;br /&gt;
                    whole_disk: 1&lt;br /&gt;
                    create_txg: 4&lt;br /&gt;
                children[1]:&lt;br /&gt;
                    type: &amp;#039;disk&amp;#039;&lt;br /&gt;
                    id: 1&lt;br /&gt;
                    guid: 8586593287004549671&lt;br /&gt;
                    path: &amp;#039;/dev/sdc1&amp;#039;&lt;br /&gt;
                    whole_disk: 1&lt;br /&gt;
                    create_txg: 4&lt;br /&gt;
        features_for_read:&lt;br /&gt;
            com.delphix:hole_birth&lt;br /&gt;
            com.delphix:embedded_data&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Note:&amp;#039;&amp;#039;&amp;#039; The MOS includes the &amp;lt;code&amp;gt;hostid&amp;lt;/code&amp;gt; of the last host to import the zpool. If the &amp;lt;code&amp;gt;hostid&amp;lt;/code&amp;gt; (as presented by the SPL) of the node that imported the zpool is 0 (zero), then this field will not be presented in the &amp;lt;code&amp;gt;zdb&amp;lt;/code&amp;gt; MOS output. If there is no &amp;lt;code&amp;gt;hostid&amp;lt;/code&amp;gt; in the MOS, then this strongly indicates that the hosts are not configured with proper &amp;lt;code&amp;gt;hostids&amp;lt;/code&amp;gt;, and the ZFS volume will not be adequately protected from multiple concurrent accesses from multiple hosts. &lt;br /&gt;
&lt;br /&gt;
Please see the article [[Protecting File System Volumes from Concurrent Access]] for details on the importance of correctly setting the &amp;lt;code&amp;gt;hostid&amp;lt;/code&amp;gt; when working with high availability failover storage configurations.&lt;br /&gt;
&lt;br /&gt;
[[Category:ZFS Object Storage Devices (OSDs)]]&lt;/div&gt;</summary>
		<author><name>Malcolm</name></author>
	</entry>
</feed>