zdb command not giving expected results

Status
Not open for further replies.

Jared Smith

Cadet
Joined
Mar 7, 2015
Messages
7
I'm new to FreeNAS. Decided to doing some benchmarking. I rsynced about 375 GB data to a dataset without dedup enabled (using NFS share). Then did the same to a data set with dedup enabled. I expected to run some zdb commands to get some finer grained statistics but when I do it does not recognize my zpool.

[root@freenas] ~# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
freenas-boot 14.9G 482M 14.4G - - 3% 1.00x ONLINE -
storage 5.44T 753G 4.70T - 10% 13% 1.79x ONLINE /mnt
[root@freenas] ~# zdb -D storage
zdb: can't open 'storage': No such file or directory
[root@freenas] ~#

I found a similar report in a bug report

https://bugs.freenas.org/issues/7877

Should I be able to see output from the zdb command for my zpool "storage"?

zdb commands work just fine for zpool "freenas-boot"

Any thoughts?
 

Jared Smith

Cadet
Joined
Mar 7, 2015
Messages
7
I guess I better describe my system so I don't get my hand slapped. :)

I repurposed me an old Dell R610 and am running the latest FreeNAS (installed this week). It has 49113MB of RAM and 6x1TB HD's join a RaidZ1.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
I guess I better describe my system so I don't get my hand slapped. :)

I repurposed me an old Dell R610 and am running the latest FreeNAS (installed this week). It has 49113MB of RAM and 6x1TB HD's join a RaidZ1.
Is your goal to find out how well your data de-duplicates on a test system, or how de-duplication affects real-world performance on a system you plan to deploy? If the former, you might sneak through without anyone slapping you. If the latter, someone will definitely slap you for having less than the minimum recommended RAM, while trying to use a feature that requires masses of RAM.

And sorry, I don't have the answer to your question about zdb.
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
If the latter, someone will definitely slap you for having less than the minimum recommended RAM, while trying to use a feature that requires masses of RAM.

He's got 48GB to support 5TB. I think he's going to be just fine. If he's going to get his hand slapped for anything it'll be for using RAIDZ1 instead of RAIDZ2 or mirrors.

As far as your ZDB question, zdb -D poolname works for me. Not sure what's going on there.

Do zpool status -D storage and you should get some useful bits at least.
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Naming the pool "storage" is maybe the source of this problem.
 

avalon60

Guru
Joined
Jan 15, 2014
Messages
597
I get the same error message when I run:
zpool status -D storage
cannot open 'storage': no such pool

I know why now! I should have entered the pool name. Doh!
 

Jared Smith

Cadet
Joined
Mar 7, 2015
Messages
7
Thanks to everyone that has responded.

@HoneyBadger - Yes that command worked for me but I was hoping to get the information zdb offers as well.

@Bidule0hm - I don't think the issue is name being "storage" since the person that submitted https://bugs.freenas.org/issues/7877 had the same issue without having the name storage for his pool.

Any other thoughts. Could it really be a bug? Possibly me setting something up incorrectly? Any thoughts would be welcome.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
That's a terrible bug to quote. They guy put the FreeNAS boot device on a damn hardware RAID! Then, he did dedup! The person that wrote that should be committed. :P
 

stilgars

Dabbler
Joined
Mar 29, 2014
Messages
12
That's a terrible bug to quote. They guy put the FreeNAS boot device on a damn hardware RAID! Then, he did dedup! The person that wrote that should be committed. :p

Hello,

I know it is a terrible bug to quote, but I am hitting the same issue, no dedup nor hardware RAID however cyberjock :D

Except the standard freenas-boot one, zdb doesn't seem to find my two pools. I did not use the GUI to create them but the command line (I know my SLOG is not mirrored, this is temporary).

I updated the bug request with my details and a screenshot.

https://bugs.freenas.org/issues/7877
 
Last edited:

stilgars

Dabbler
Joined
Mar 29, 2014
Messages
12
Copy pasting the problem below (3 active pools, only one showing up with zdb):

[root@freenas] ~# zpool list
NAME SIZE ALLOC FREE EXPANDSZ FRAG CAP DEDUP HEALTH ALTROOT
freenas-boot 7.56G 1.30G 6.27G - - 17% 1.00x ONLINE -
system 1.73T 5.05G 1.73T - 0% 0% 1.00x ONLINE /mnt
tank 60T 26.9T 33.1T - 27% 44% 1.00x ONLINE /mnt

[root@freenas] ~# zdb tank
zdb: can't open 'tank': No such file or directory

[root@freenas] ~# zdb system
zdb: can't open 'system': No such file or directory

[root@freenas] ~# zdb
freenas-boot:
version: 28
name: 'freenas-boot'
state: 0
txg: 7038453
pool_guid: 9897884101609409482
hostname: ''
vdev_children: 1
vdev_tree:
type: 'root'
id: 0
guid: 9897884101609409482
create_txg: 4
children[0]:
type: 'disk'
id: 0
guid: 155458400138977638
path: '/dev/gptid/70576b63-8e11-11e4-8071-002590db17e9'
whole_disk: 1
metaslab_array: 30
metaslab_shift: 26
ashift: 9
asize: 8181776384
is_log: 0
DTL: 92
create_txg: 4
features_for_read:
 

stilgars

Dabbler
Joined
Mar 29, 2014
Messages
12
No idea why zdb can't find my pools, except the boot one?
 

stilgars

Dabbler
Joined
Mar 29, 2014
Messages
12
Umm, maybe because if this?:

Well, zdb is not a freeNAS/GUI functionality, so I fail to see why creating a pool using the command line will make it not to appear under zdb which is a standard diagnostic tool from zfs, and secondly, I exported/reimported the pool under the GUI anyway to get rid of the missing gptid labels (with no luck). Still no visibility under zdb.
 
Last edited:

stilgars

Dabbler
Joined
Mar 29, 2014
Messages
12
I understand your suggestion and it sounds practical, thank you for it - but specifically, this pool now contains 25 TB of data and re-transferring the whole thing could take days.
In addition, using the command line is not a hack or an exceptional zfs usercase. I don't think the destroy-and-recreate-everything is a good approach in general when no particular mistake was made.
 

Robert Trevellyan

Pony Wrangler
Joined
May 16, 2014
Messages
3,778
Have you tried renaming the pool(s)? Maybe "system" is a bad name for a pool.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
Interestingly enough, I was just testing some stuff out and saw similar behavior...

Here is what I did:
  1. Created Pool called "TestPool"
    • Was on a instance of FreeNas runing "Nightlies"
    • Using a 6 disk RaidZ2 vDev (different sized drives; was testing something else)
  2. Shutdown and then installed FreeNas Stable on a new SSD
  3. Updated Stable with the latest version
  4. Then I SSH'd and ran command: zpool import -f TestPool
    • GUI "Volumes" did NOT show pool
    • zdb showed pool correctly
    • zpool status showed pool correctly
  5. Rebooted (just to be safe) and tried again with the same results
  6. Back in SSH; I then ran command: zpool export -f TestPool
  7. In the GUI; I imported the pool using the "Import Volume" button
    • GUI "Volumes" showed "TestPool"
    • zpool status showed pool correctly
    • zdb did not??
  8. Closed SSH Session and tried again... Same results...
  9. I then rebooted the Server; tried again and got same results...
    • GUI "Volumes" showed "TestPool"
    • zpool status showed pool correctly
    • zdb did not?
Since this is a "dev" machine; I can test it out again in case I did anything blatantly incorrect... Anyone have some stuff you want me to try?
There is not any data on this test machine and I am will to run whatever...
 

stilgars

Dabbler
Joined
Mar 29, 2014
Messages
12
Interestingly enough, I was just testing some stuff out and saw similar behavior...

Here is what I did:
  1. Created Pool called "TestPool"
    • Was on a instance of FreeNas runing "Nightlies"
    • Using a 6 disk RaidZ2 vDev (different sized drives; was testing something else)
  2. Shutdown and then installed FreeNas Stable on a new SSD
  3. Updated Stable with the latest version
  4. Then I SSH'd and ran command: zpool import -f TestPool
    • GUI "Volumes" did NOT show pool
    • zdb showed pool correctly
    • zpool status showed pool correctly
  5. Rebooted (just to be safe) and tried again with the same results
  6. Back in SSH; I then ran command: zpool export -f TestPool
  7. In the GUI; I imported the pool using the "Import Volume" button
    • GUI "Volumes" showed "TestPool"
    • zpool status showed pool correctly
    • zdb did not??
  8. Closed SSH Session and tried again... Same results...
  9. I then rebooted the Server; tried again and got same results...
    • GUI "Volumes" showed "TestPool"
    • zpool status showed pool correctly
    • zdb did not?
Since this is a "dev" machine; I can test it out again in case I did anything blatantly incorrect... Anyone have some stuff you want me to try?
There is not any data on this test machine and I am will to run whatever...

Thank you, interesting - as I have noticed, export/import does not solve the problem. I do not really have any particular idea for testing and remediation at this stage, I think there is a bug lurking here however.
 

Mirfster

Doesn't know what he's talking about
Joined
Oct 2, 2015
Messages
3,215
Thank you, interesting - as I have noticed, export/import does not solve the problem. I do not really have any particular idea for testing and remediation at this stage, I think there is a bug lurking here however.
I am tending to agree. Have some other things to work on today; but if I get a chance I will run a few more tests. If results show similar behavior; I will file a bug and post back.
 
Status
Not open for further replies.
Top