TL;DR SOLUTION:
The best way to prevent a device from being used as a swap device (and hence become difficult to unmount) is to delete the swap partitions from all the drives in the pool. For instructions on how to do this see:
https://forums.freenas.org/index.ph...g-swap-partition-is-it-safe-to-do-this.73197/
TL;DR
I am trying to control which drives are used for swap space.
Most importantly I want to prevent ada3 from being used for swap (and would prefer to exclude ada0/1 as well).
ada3 is a single disk removable pool that is mounted/unmounted for backups.
When it becomes part of the swap space it can cause problems (hard to unmount/system instability).
Additional Info:
My thinking is that the best situation is to restrict swap to da0-7 (Main pool always spinning-redundant)
or
QUESTION: Would it be a good idea to force the swap onto the boot drive ada2 (SSD)? (If so how?)
I would not normally expect much swapping, but if a small bit of swapping was necessary, then either of these choices would be best.
System Configuration:
FreeNAS 11.1-U6 / 32GB
ada2 - Boot Drive 120GB SSD
da0-da7: Main Pool - 8 WD Red Drives [Avago HBA]
ada0-ada1 - 2 Old Hitachi Drives
ada3 - Removable mount - used for single drive pools (different pool names for different drives - imported/exported by bash script(s).
Additional background:
At the moment only ada0/ada1 seem to be part of the swap space.
#>swapinfo
Device 1K-blocks Used Avail Capacity
/dev/mirror/swap0.eli 2097152 0 2097152 0%
/dev/mirror/swap1.eli 2097152 0 2097152 0%
/dev/mirror/swap2.eli 2097152 0 2097152 0%
/dev/mirror/swap3.eli 2097152 0 2097152 0%
/dev/mirror/swap4.eli 2097152 0 2097152 0%
Total 10485760 0 10485760 0%
#>gmirror status
Name Status Components
mirror/swap0 COMPLETE ada1p1 (ACTIVE)
ada0p1 (ACTIVE)
mirror/swap1 COMPLETE da7p1 (ACTIVE)
da6p1 (ACTIVE)
mirror/swap2 COMPLETE da5p1 (ACTIVE)
da4p1 (ACTIVE)
mirror/swap3 COMPLETE da3p1 (ACTIVE)
da2p1 (ACTIVE)
mirror/swap4 COMPLETE da1p1 (ACTIVE)
da0p1 (ACTIVE)
Some how when I was doing a backup a /dev/mirror/swap5.eli got created-I don't know what I did, but I suspect I may have had ada3 mounted over a reboot. I ended up with a weird configuration ata2 (boot) and ada3(removable) broke up the clean arrangement and scattered themselves though the mix. The result was the system became a bit unstable ( and for some reason-don't know why as there was nothing significant running) htop showed 1+GB of swap in use. Very weird.
I just mounted ada3 (Single disk zpool in a removable carrier used for backup), and so far it isn't part of the swap.
The best way to prevent a device from being used as a swap device (and hence become difficult to unmount) is to delete the swap partitions from all the drives in the pool. For instructions on how to do this see:
https://forums.freenas.org/index.ph...g-swap-partition-is-it-safe-to-do-this.73197/
TL;DR
I am trying to control which drives are used for swap space.
Most importantly I want to prevent ada3 from being used for swap (and would prefer to exclude ada0/1 as well).
ada3 is a single disk removable pool that is mounted/unmounted for backups.
When it becomes part of the swap space it can cause problems (hard to unmount/system instability).
Additional Info:
My thinking is that the best situation is to restrict swap to da0-7 (Main pool always spinning-redundant)
or
QUESTION: Would it be a good idea to force the swap onto the boot drive ada2 (SSD)? (If so how?)
I would not normally expect much swapping, but if a small bit of swapping was necessary, then either of these choices would be best.
System Configuration:
FreeNAS 11.1-U6 / 32GB
ada2 - Boot Drive 120GB SSD
da0-da7: Main Pool - 8 WD Red Drives [Avago HBA]
ada0-ada1 - 2 Old Hitachi Drives
ada3 - Removable mount - used for single drive pools (different pool names for different drives - imported/exported by bash script(s).
Additional background:
At the moment only ada0/ada1 seem to be part of the swap space.
#>swapinfo
Device 1K-blocks Used Avail Capacity
/dev/mirror/swap0.eli 2097152 0 2097152 0%
/dev/mirror/swap1.eli 2097152 0 2097152 0%
/dev/mirror/swap2.eli 2097152 0 2097152 0%
/dev/mirror/swap3.eli 2097152 0 2097152 0%
/dev/mirror/swap4.eli 2097152 0 2097152 0%
Total 10485760 0 10485760 0%
#>gmirror status
Name Status Components
mirror/swap0 COMPLETE ada1p1 (ACTIVE)
ada0p1 (ACTIVE)
mirror/swap1 COMPLETE da7p1 (ACTIVE)
da6p1 (ACTIVE)
mirror/swap2 COMPLETE da5p1 (ACTIVE)
da4p1 (ACTIVE)
mirror/swap3 COMPLETE da3p1 (ACTIVE)
da2p1 (ACTIVE)
mirror/swap4 COMPLETE da1p1 (ACTIVE)
da0p1 (ACTIVE)
Some how when I was doing a backup a /dev/mirror/swap5.eli got created-I don't know what I did, but I suspect I may have had ada3 mounted over a reboot. I ended up with a weird configuration ata2 (boot) and ada3(removable) broke up the clean arrangement and scattered themselves though the mix. The result was the system became a bit unstable ( and for some reason-don't know why as there was nothing significant running) htop showed 1+GB of swap in use. Very weird.
I just mounted ada3 (Single disk zpool in a removable carrier used for backup), and so far it isn't part of the swap.
Last edited: