Bug 211939 - ZFS does not correctly import cache and spares by label
Summary: ZFS does not correctly import cache and spares by label
Status: Closed Feedback Timeout
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.3-RELEASE
Hardware: Any Any
: --- Affects Many People
Assignee: freebsd-fs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-17 12:24 UTC by Ben RUBSON
Modified: 2016-09-07 09:55 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ben RUBSON 2016-08-17 12:24:56 UTC
Hello,

ZFS does not correctly import cache and spares by label, which is quite annoying.

Example :

# zpool add home cache label/G12000KU2RVJAch
# zpool add home spare label/G1207PFGPTKDXhm 
# zpool status home
 (...)
 home                       ONLINE       0     0     0
   mirror-0                 ONLINE       0     0     0
     label/G1203PGGLJWZXhm  ONLINE       0     0     0
     label/G1204PHKXHJ2Xhm  ONLINE       0     0     0
 (...)
 logs
   mirror-2                 ONLINE       0     0     0
     label/G12000KU2RVJAlg  ONLINE       0     0     0
     label/G12010KU22RVAlg  ONLINE       0     0     0
 (...)
 cache
   label/G12000KU2RVJAch    ONLINE       0     0     0
 spares
   label/G1207PFGPTKDXhm    AVAIL

# zpool export home
# zpool import -d /dev/label/ home
# zpool status home
 (...)
 home                       ONLINE       0     0     0
   mirror-0                 ONLINE       0     0     0
     label/G1203PGGLJWZXhm  ONLINE       0     0     0
     label/G1204PHKXHJ2Xhm  ONLINE       0     0     0
 (...)
 logs
   mirror-2                 ONLINE       0     0     0
     label/G12000KU2RVJAlg  ONLINE       0     0     0
     label/G12010KU22RVAlg  ONLINE       0     0     0
 (...)
 cache
   da5p7                    ONLINE       0     0     0
 spares
   da4p1                    AVAIL

# uname -v
FreeBSD 10.3-RELEASE-p7 #0: Thu Aug 11 18:38:15 UTC 2016 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC 

I tested this pool under FreeBSD 11-RC1, the issue does not occur, cache and spares are correctly imported with their label.
Could it be possible to backport required changes to 10.3 ?

Thank you very much,

Best regards,

Ben
Comment 1 Ben RUBSON 2016-08-20 07:29:55 UTC
Perhaps we are talking about these 2 commits ?
https://svnweb.freebsd.org/base?view=revision&revision=292066
https://svnweb.freebsd.org/base?view=revision&revision=293708

I'm not really sure...

Thank you !

Ben
Comment 2 Ben RUBSON 2016-09-07 09:55:21 UTC
If I'm the only one interested in this bug report, it can then be closed, as I now run FreeBSD 11.
Feel free then to re-open it if needed.