HomeFreeBSD

Fix io-spare.sh to work with disk vdevs

Description

Fix io-spare.sh to work with disk vdevs

The "zpool status" output shows the full pathname for file-type vdevs,
but only the basename component for disk-type vdevs. In commit
bee6665, the "basename" command was dropped from altering the vdev
name used when searching the "zpool status" output. Consequently,
hot-disk sparing for disk vdevs broke since "zpool status" output
was now being searched for the full pathname to the disk vdev.

Parsing the "zpool status" output in this manner is rather brittle.
It would be preferable to search for the vdev based on its guid.
But until that happens, this commit adds back the "basename" command
to fix the vdev name breakage.

Signed-off-by: Chris Dunlap <cdunlap@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3310

Details

Provenance
Chris Dunlap <cdunlap@llnl.gov>Authored on Apr 10 2015, 7:56 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Apr 17 2015, 9:21 PM
Parents
rG7fad6290eb3a: Mark additional functions as PF_FSTRANS
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGde6d19768359: Fix io-spare.sh to work with disk vdevs (authored by Chris Dunlap <cdunlap@llnl.gov>).Apr 17 2015, 9:21 PM