The interesting lines for me were linea 11 & 12. So I dug a bit around the forum for "GEOM" messages and I found about the "gmirror" command. Reading the MAN/documentation I discovered I can use "gmirror status -ags" to list current status of active swaps. So I ran it in my second Terminal window and I got this
Since you have a solution, the following discussion is kind of academic and I hope it will provide additional information to someone at some time in the future.
At this time, July 2018, with Freenas version 11.1-U5, when I execute the
gmirror status -ags
command on my system that has 48 drives installed in it, I get the following output:
Code:
root@Emily-NAS:~/scripts # gmirror status -ags
swap0 COMPLETE da35p1 (ACTIVE)
swap0 COMPLETE da34p1 (ACTIVE)
swap0.sync N/A N/A
swap1 COMPLETE da33p1 (ACTIVE)
swap1 COMPLETE da32p1 (ACTIVE)
swap1.sync N/A N/A
swap2 COMPLETE da31p1 (ACTIVE)
swap2 COMPLETE da30p1 (ACTIVE)
swap2.sync N/A N/A
swap3 COMPLETE da29p1 (ACTIVE)
swap3 COMPLETE da17p1 (ACTIVE)
swap3.sync N/A N/A
swap4 COMPLETE da16p1 (ACTIVE)
swap4 COMPLETE da15p1 (ACTIVE)
swap4.sync N/A N/A
root@Emily-NAS:~/scripts #
If you notice the da numbers, they are not consecutive and out of 48 drives, instead of having 24 mirrors, there are only 5.
It appears that FreeNAS is limited to having 5 of these mirrors in use for swap at any given time. What I have observed is that if one of these disks were to be removed, the associated mirror would remain degraded until the system is rebooted. My observation is that these mirrors are established at boot time. Some other users have reported that, in some instances, when a drive is added to the server, an incomplete mirror may be completed during the process that adds a new drive to a pool.
Does setting the swap partition size to zero actually not create a swap partition at all, or does it create a zero-sized one?
To test that, I looked at the results of
glabel list
for drives that have been added to my system over the course of several years while I had the swap partition size at various settings. First, some of the oldest drives in my system, that were added when I had the default value selected, have the following geometry:
Code:
Geom name: da20p1
Providers:
1. Name: gptid/ac6c9657-1c60-11e7-ae9a-002590a96034
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 4194304
length: 2147483648
index: 0
Consumers:
1. Name: da20p1
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
In this drive, partition 1 is a 2GB swap space.
Code:
Geom name: da20p2
Providers:
1. Name: gptid/ac988093-1c60-11e7-ae9a-002590a96034
Mediasize: 4998830227456 (4.5T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 9763340288
length: 4998830227456
index: 0
Consumers:
1. Name: da20p2
Mediasize: 4998830227456 (4.5T)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
while partition 2 is a 4.5TB part of the backup storage pool.
Second, some of the more recent drives in my system, that were added when I had the value set to 1, have the following geometry:
Code:
Geom name: da1p1
Providers:
1. Name: gptid/d63d8a31-7d7e-11e8-b9c5-0cc47a9cd5a4
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 2097152
length: 1073741824
index: 0
Consumers:
1. Name: da1p1
Mediasize: 1073741824 (1.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
In this drive, partition 1 is a 1GB swap space.
Code:
Geom name: da1p2
Providers:
1. Name: gptid/d64df9e0-7d7e-11e8-b9c5-0cc47a9cd5a4
Mediasize: 98956410880 (92G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 193274240
length: 98956410880
index: 0
Consumers:
1. Name: da1p2
Mediasize: 98956410880 (92G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
while partition 2 (on a SSD) is a 92GB part of another pool.
Third, even more recently, I added this one drive in my system, were I had the value set to 8, have the following geometry:
Code:
Geom name: da10p1
Providers:
1. Name: gptid/a3cc39d9-2a0a-11e8-bbf6-002590aecc79
Mediasize: 8589934592 (8.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 16777216
length: 8589934592
index: 0
Consumers:
1. Name: da10p1
Mediasize: 8589934592 (8.0G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r0w0e0
In this drive, partition 1 is a 8GB swap space because I was trying to have all my swap on this one drive. Trouble is, it didn't stay the 'selected' drive because the system appears to pick the drives it wants to use randomly at boot...
Code:
Geom name: da10p2
Providers:
1. Name: gptid/a41c596b-2a0a-11e8-bbf6-002590aecc79
Mediasize: 991614861312 (924G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 1936747776
length: 991614861312
index: 0
Consumers:
1. Name: da10p2
Mediasize: 991614861312 (924G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
while partition 2 is a 924GB (1TB drive) part of yet another pool.
Finally, the most recently added drives, were I had the value set to 0 (zero), have the following geometry:
Code:
Geom name: da22p1
Providers:
1. Name: gptid/194a8867-2a0b-11e8-bbf6-002590aecc79
Mediasize: 500107771904 (466G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 976772992
length: 500107771904
index: 0
Consumers:
1. Name: da22p1
Mediasize: 500107771904 (466G)
Sectorsize: 512
Stripesize: 4096
Stripeoffset: 0
Mode: r1w1e2
In this drive, partition 1 is a 466GB part of yet another pool and the interesting bit, there is not a partition 2...