ZDB: What am I missing?

Status
Not open for further replies.

JustinOtherBobo

Dabbler
Joined
Aug 21, 2018
Messages
26
The ZDB command only seems to be able to "see" my freenas-boot pool.
Code:
[root@iXSystemsnas1 ~]# zpool list																							
NAME		   SIZE  ALLOC   FREE  EXPANDSZ   FRAG	CAP  DEDUP  HEALTH  ALTROOT												 
CROWN		 5.44T  2.44T  3.00T		 -	24%	44%  1.00x  ONLINE  /mnt													
freenas-boot  29.8G  4.86G  24.9G		 -	  -	16%  1.00x  ONLINE  - 

So pool CROWN exists. Yet:

Code:
[root@iXSystemsNAS1 ~]# zdb -S CROWN																							 
zdb: can't open 'CROWN': No such file or directory

By contrast:
Code:
[root@iXSystemsNAS1 ~]# zdb -S freenas-boot																						
Simulated DDT histogram:																										
																																 
bucket			  allocated					   referenced																	
______   ______________________________   ______________________________															
refcnt   blocks   LSIZE   PSIZE   DSIZE   blocks   LSIZE   PSIZE   DSIZE															
------   ------   -----   -----   -----   ------   -----   -----   -----															
	1	21.3K	964M	490M	490M	21.3K	964M	490M	490M															
	2	54.6K   1.12G	532M	532M	 110K   2.25G   1.05G   1.05G															
	4	5.92K   36.4M   18.4M   18.4M	24.1K	152M   75.5M   75.5M															
	8	  180	926K	266K	266K	1.81K   9.36M   2.46M   2.46M															
   16	   42	298K	 39K	 39K	  934   7.90M	858K	858K															
   32	   13	188K	 21K	 21K	  498   6.39M	836K	836K															
   64		7	  5K   3.50K   3.50K	  588	434K	294K	294K															
   128		1	  1K	 512	 512	  140	140K	 70K	 70K															
   256		1	 512	 512	 512	  322	161K	161K	161K															
 Total	82.1K   2.10G   1.02G   1.02G	 159K   3.36G   1.60G   1.60G															
																																 
dedup = 1.58, compress = 2.10, copies = 1.00, dedup * compress / copies = 3.30													
					 

This behaviour has been observed on all three machines I run FreeNas on. Both when they were 9.10.2-U6 and now that they've been updated to 11.1-U6.

All three machines are HP Z800 Workstations, Dual Xeon X5560 @ 2.8, 32 to 64GB RAM. Freenas-boot is on mirrored USB sticks (two with 16GB and one with 32GB sticks). The main pools are on mirrored vdevs of SATA drives: 4x3TB, 2x4TB+2x6TB, 4x8TB using the on-board Intel SATA ports.
 
Last edited:

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
Try zdb -S CROWN -U /data/zfs/zpool.cache instead.

The cachefile for all other pools than freenas-boot is /data/zfs/zpool.cache, not /boot/zfs/zpool.cache.
 

JustinOtherBobo

Dabbler
Joined
Aug 21, 2018
Messages
26
Code:
[root@iXSystemsnas1 ~]# zdb -S freenas-boot -U /boot/zfs/zpool.cache		
zdb: bad number -U: Invalid argument											
[root@iXSystemsnas1 ~]# zdb -S CROWN -U /data/zfs/zpool.cache				
zdb: can't open 'CROWN': No such file or directory							
[root@iXSystemsnas1 ~]# zpool list											
NAME		   SIZE  ALLOC   FREE  EXPANDSZ   FRAG	CAP  DEDUP  HEALTH  ALTROOT							  
CROWN		 5.44T  2.45T  2.99T		 -	24%	44%  1.00x  ONLINE  /mnt
freenas-boot  29.8G  4.86G  24.9G		 -	  -	16%  1.00x  ONLINE  -	
[root@iXSystemsnas1 ~]#			
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338

JustinOtherBobo

Dabbler
Joined
Aug 21, 2018
Messages
26
Success with:
Code:
zdb -S -U /data/zfs/zpool.cache poolname

The man page you reference lists:
Code:
zdb -S [-AP] [-e [-V] [-p path ...]] [-U cache] poolname

Hence my confusion as to why
Code:
zdb -S poolname
doesn't work for me :(
 

MrToddsFriends

Documentation Browser
Joined
Jan 12, 2015
Messages
1,338
Hence my confusion as to why
Code:
zdb -S poolname
doesn't work for me :(

Because in FreeNAS, the cachefile for all other pools than freenas-boot is /data/zfs/zpool.cache, not /boot/zfs/zpool.cache (and thus has to be specified using the -U option of zdb).
 
Status
Not open for further replies.
Top