[zfs-discuss] ZPOOL import dangerous bug in the latest 6.5.4-1

Veniamin Konoplev v.konoplev at cosmos.ru
Fri Feb 12 05:17:02 EST 2016


Hi all,

Thanks to all who participated in the thread "ZPOOL double import and 
host ownership question".

It turned out to be clear that zfs 6.5.4-1 does not have "from-the-box" 
double import protection for ZPOOL.

My testing environment was^ two clean installed virtual servers on 
CentOS 6.7 connected to shared LUN using iSCSI. They both imported zpool 
without any warning:

[root at nms-test ~]# zpool create test /dev/sda
[root at nms-test ~]# zpool list
NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH
test  3.97G    65K  3.97G         -     0%     0%  1.00x  ONLINE

[root at nms-test1 ~]# zpool import test
[root at nms-test1 ~]# zpool list
NAME   SIZE  ALLOC   FREE  EXPANDSZ   FRAG    CAP  DEDUP  HEALTH
test  3.97G  89.5K  3.97G         -     0%     0%  1.00x  ONLINE


I was advised that for safe using of ZFS in a shared environment one 
needs to correctly setup /etc/hostid. And it works with 6.5.4-1 indeed.

I also found out that in ZFS versions 0.6.0-r11 and 0.6.4.1 double 
import protection works correctly "from-the-box" without need of 
/etc/hostid manipulations.

I consider this behavior of 6.5.4-1 release (and may be some previous) 
as a DANGEROUS BUG and going to open the correspondent ticket.

I suppose that not all could track the ""ZPOOL double import and host 
ownership question". Thus here is the brief problem summary to attract 
your attention and ask your opinion.


-- 
Kind regards,
Veniamin Konoplev
Space Research Institute
Networking department


More information about the zfs-discuss mailing list