Hi All:
I had a lot of servers (each with more than 1 zpool on them), so I
wrote a quick and dirty little script to find all of the cache drives
and remove them. It doesn't have any type of error checking in it, but
unless you remove the three hash marks on the line "### zpool remove $i
$j), it won't do anything either (other than save a copy of your current
zpool status under /root/zpool_status-15-09-11.with_cache)s. Hope this
help some of you:
export DATE=`date '+%y-%m-%d'`
# Start by getting a current copy of the status
zpool status > /root/zpool_status-$DATE.with_cache
# find all of the pools on the server
for i in `zpool list -H -o name`
do
# now, get all of the cache drives from that pool
# (the sed script grabs the lines from "cache" to "spares"
# the greps remove the "cache" and "spares" line
# and the awk print the first item from each line, which is
# the name of the drive
for j in `zpool status $i | sed -n '/cache/,/spares/p' | \
grep -v cache | grep -v spares | \
awk '{print $1}'`
do
echo "zpool remove $i $j"
# uncomment the next line, when you are ready to really
run this
### zpool remove $i $j
done
done
regards,
Paul
On 09/10/2015 06:53 AM, Dan McDonald wrote:
If you are using a zpool with r151014 and you have an L2ARC ("cache") vdev, I
recommend at this time disabling it. You may disable it by uttering:
zpool remove <pool-name> <cache-vdev-name>
For example:
zpool remove data c2t2d0
The bug in question has a good analysis here:
https://www.illumos.org/issues/6214
This bug can lead to problems ranging from false-positives on zpool scrub all
the way up to actual pool corruption.
We will be updating the package repo AND the install media once 6214 is
upstreamed to illumos-gate, and pulled back into the r151014 branch of
illumos-omnios. The fix is undergoing some tests from ZFS experts right now to
verify its correctness.
So please disable your L2ARC/cache devices for maximum data safety. You can
add them back after we update r151014 by uttering:
zpool add <pool-name> cache <cache-vdev-name>
PLEASE NOTE the "cache" indicator when you add back. If you omit this, the
vdev is ADDED to your pool, an operation one can't reverse.
zpool add data cache c2t2d0
Thanks,
Dan
_______________________________________________
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss
_______________________________________________
OmniOS-discuss mailing list
OmniOS-discuss@lists.omniti.com
http://lists.omniti.com/mailman/listinfo/omnios-discuss