FreeBSD 9.2 zpool.cache

rdunkle

Member

Reaction score: 24
Messages: 54

With 9.2 is the zpool.cache file no longer needed when installing ZFS on root?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 13,151
Messages: 39,766

It shouldn't. But I think the last time I tried it it didn't work and I still had to copy the zpool.cache file. I haven't tried it with the last 9.2 release candidate/beta yet though.
 

kpa

Beastie's Twin

Reaction score: 1,853
Messages: 6,318

It should work if you have only one ZFS pool in the system. The restriction was removed from 9-STABLE after the release of 9.1-RELEASE if I remember correctly.
 
OP
rdunkle

rdunkle

Member

Reaction score: 24
Messages: 54

I have set up ZFS on root with 9.2-BETA2.
Code:
# zpool status
  pool: zroot
 state: ONLINE
  scan: none requested
config:

	NAME           STATE     READ WRITE CKSUM
	zroot          ONLINE       0     0     0
	  gpt/system0  ONLINE       0     0     0

errors: No known data errors

I notice zdb does not seem to work:

Code:
# zdb
cannot open '/boot/zfs/zpool.cache': No such file or directory
# zdb zroot
zdb: can't open 'zroot': No such file or directory
 

J65nko

Well-Known Member

Reaction score: 129
Messages: 453

Yes, I also noticed that with zdb on 9.2-BETA. To check the ashift value of my 4K aligned pool of GPT labelled disks I had to use: # zdb -C -e -p /dev/gpt [i]poolname[/i] | grep ashift
 

Erratus

Well-Known Member

Reaction score: 21
Messages: 320

If a ZFS pool was created without a cachefile, zdb is of no use and shows errors as described on postings above.
If there is a need for a cachefile, it can be created like this:
Code:
# zpool set cachefile=/boot/zfs/zpool.cache your_pool
 
Top