For example, if your encrypted zpool is da5 and da6 in a mirror, then after you reboot its da4 and da5 FreeNAS won't recognize the change. Furthermore if you reboot and the drives are da5 and da6 again, the zpool may not mount.
I'm not sure that's actually true. Disks are identified by FreeNAS using several methods, with disk device name being one of the less-preferred methods, and serial number appearing to be preferred on bare metal, but uuid being used if not, and encrypted disks seem to be identified by
You can look at the drive mapping tables in the database:
# sqlite3 /data/freenas-v1.db
sqlite> select * from storage_disk;
sqlite> select * from storage_encrypteddisk;
So I have this 2011 on the bench that I've been playing with. Let's see what happens. This is an unencrypted pool that I'll destroy, just want to see how it looks "before."
Code:
[root@freenas] /# camcontrol devlist
<NECVMWar VMware IDE CDR10 1.00> at scbus1 target 0 lun 0 (pass0,cd0)
<VMware Virtual disk 1.0> at scbus2 target 0 lun 0 (pass1,da0)
<VMware Virtual disk 1.0> at scbus2 target 1 lun 0 (pass2,da1)
<LSI SAS2X36 0e0b> at scbus3 target 24 lun 0 (ses0,pass3)
<ATA ST3400832AS 3.03> at scbus3 target 32 lun 0 (pass4,da2)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 43 lun 0 (pass5,da3)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 44 lun 0 (pass6,da4)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 45 lun 0 (pass7,da5)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 46 lun 0 (pass8,da6)
<ATA ST4000DM000-1F21 CC51> at scbus3 target 47 lun 0 (pass9,da7)
<ATA ST4000DM000-1F21 CC51> at scbus3 target 48 lun 0 (pass10,da8)
<ATA ST4000DM000-1F21 CC51> at scbus3 target 49 lun 0 (pass11,da9)
[root@freenas] /#
[root@freenas] /# sqlite3 /data/freenas-v1.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from storage_disk;
1|Disabled|Always On|||{devicename}da1|1|Disabled|Auto||||4|da1
1|Disabled|Always On|4NF0M8EW||{serial}4NF0M8EW|1|Disabled|Auto||||5|da2
1|Disabled|Always On|Z3004TCF||{serial}Z3004TCF|1|Disabled|Auto||||6|da9
1|Disabled|Always On|Z300C8GC||{serial}Z300C8GC|1|Disabled|Auto||||7|da3
1|Disabled|Always On|Z300CVFL||{serial}Z300CVFL|1|Disabled|Auto||||8|da4
1|Disabled|Always On|Z300C2D6||{serial}Z300C2D6|1|Disabled|Auto||||9|da5
1|Disabled|Always On|Z300CVD3||{serial}Z300CVD3|1|Disabled|Auto||||10|da6
1|Disabled|Always On|Z3004S9C||{serial}Z3004S9C|1|Disabled|Auto||||11|da7
1|Disabled|Always On|Z3004T9A||{serial}Z3004T9A|1|Disabled|Auto||||12|da8
0|Disabled|Always On|||{devicename}da0|1|Disabled|Auto||||13|da0
sqlite> select * from storage_encrypteddisk;
sqlite>
[root@freenas] /#
Okay, so, destroy, create encrypted. We see encrypteddisk populate:
Code:
sqlite> select * from storage_encrypteddisk;
1|1|7|gptid/678fcb36-c89a-11e2-96a3-000c2920acf7
2|1|8|gptid/682740aa-c89a-11e2-96a3-000c2920acf7
3|1|9|gptid/68b883df-c89a-11e2-96a3-000c2920acf7
4|1|10|gptid/6952bc1a-c89a-11e2-96a3-000c2920acf7
5|1|11|gptid/69f207ca-c89a-11e2-96a3-000c2920acf7
6|1|12|gptid/6a869973-c89a-11e2-96a3-000c2920acf7
7|1|6|gptid/6b1a216f-c89a-11e2-96a3-000c2920acf7
8|1|4|gptid/6c135f8d-c89a-11e2-96a3-000c2920acf7
Great. At which point I notice a completely unrelated but interesting thing: despite having AES-NI support, pool write speeds just dumped from 300MB/sec unencrypted to 86MB/sec encrypted. Hmm.
So. Let's shuffle drives and see what happens. Shutdown. Reboot.
Code:
[root@freenas] ~# camcontrol devlist
<NECVMWar VMware IDE CDR10 1.00> at scbus1 target 0 lun 0 (pass0,cd0)
<VMware Virtual disk 1.0> at scbus2 target 0 lun 0 (pass1,da0)
<VMware Virtual disk 1.0> at scbus2 target 1 lun 0 (pass2,da1)
<LSI SAS2X36 0e0b> at scbus3 target 24 lun 0 (ses0,pass3)
<ATA ST3400832AS 3.03> at scbus3 target 32 lun 0 (pass4,da2)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 43 lun 0 (pass5,da3)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 44 lun 0 (pass6,da4)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 45 lun 0 (pass7,da5)
<ATA ST4000DM000-1F21 CC52> at scbus3 target 46 lun 0 (pass8,da6)
<ATA ST4000DM000-1F21 CC51> at scbus3 target 47 lun 0 (pass9,da7)
<ATA ST4000DM000-1F21 CC51> at scbus3 target 48 lun 0 (pass10,da8)
<ATA ST4000DM000-1F21 CC51> at scbus3 target 49 lun 0 (pass11,da9)
[root@freenas] ~# sqlite3 /data/freenas-v1.db
SQLite version 3.7.13 2012-06-11 02:05:22
Enter ".help" for instructions
Enter SQL statements terminated with a ";"
sqlite> select * from storage_disk;
1|Disabled|Always On|||{uuid}6c135f8d-c89a-11e2-96a3-000c2920acf7|1|Disabled|Auto||||4|da1
1|Disabled|Always On|4NF0M8EW||{serial}4NF0M8EW|1|Disabled|Auto||||5|da2
1|Disabled|Always On|Z3004TCF||{serial}Z3004TCF|1|Disabled|Auto||||6|da9
1|Disabled|Always On|Z300C8GC||{serial}Z300C8GC|1|Disabled|Auto||||7|da3
1|Disabled|Always On|Z300CVFL||{serial}Z300CVFL|1|Disabled|Auto||||8|da4
1|Disabled|Always On|Z300C2D6||{serial}Z300C2D6|1|Disabled|Auto||||9|da5
1|Disabled|Always On|Z300CVD3||{serial}Z300CVD3|1|Disabled|Auto||||10|da6
1|Disabled|Always On|Z3004S9C||{serial}Z3004S9C|1|Disabled|Auto||||11|da7
1|Disabled|Always On|Z3004T9A||{serial}Z3004T9A|1|Disabled|Auto||||12|da8
0|Disabled|Always On|||{devicename}da0|1|Disabled|Auto||||13|da0
sqlite> select * from storage_encrypteddisk;
1|1|7|gptid/678fcb36-c89a-11e2-96a3-000c2920acf7
2|1|8|gptid/682740aa-c89a-11e2-96a3-000c2920acf7
3|1|9|gptid/68b883df-c89a-11e2-96a3-000c2920acf7
4|1|10|gptid/6952bc1a-c89a-11e2-96a3-000c2920acf7
5|1|11|gptid/69f207ca-c89a-11e2-96a3-000c2920acf7
6|1|12|gptid/6a869973-c89a-11e2-96a3-000c2920acf7
7|1|6|gptid/6b1a216f-c89a-11e2-96a3-000c2920acf7
8|1|4|gptid/6c135f8d-c89a-11e2-96a3-000c2920acf7
sqlite>
Okay, that's frustrating, apparently the M1015 or the SAS expander are doing something to lock the position of devices in the array. So I guess this is going nowhere. Sorry.
Also, I could be wrong but I believe that the drives must be detected on bootup. Unplugging(or plugging them in) with the sysem running is no going to work based on my experiments. I did just wake up though.
Not sure exactly which thing we're referring to here. Plug in a drive to a hotswap capable controller and FreeNAS should recognize it and list it in the volume manager as soon as FreeBSD identifies the drive. It isn't going to mount it, however.