SummaryDetailed information on the SWAP file and how to possibly change the amount of memory in the SWAP
OverviewAll newly manufactured systems will get either:
- ExOS v7.0.0 to the current versions: 2G swap partition + 2G swap Logical Volume Manager (LVM)
- ExOS v6.4.0 - v6.4.7: 4G swap partition
For systems that have been upgraded, the amount of swap depends on what version they were originally manufactured on, what versions they have been upgraded via and what space was able to be 'stolen' (see LVM information) during upgrade to give back the approximate amount of swap space that was lost during the upgrade.
To understand the relationship between Swap and the root partition, it is necessary to examine the history of the Exinda. The root partition size on appliance has increased in size over time, from 768MB to 1GB to 2GB. In older versions of the firmware that are now unsupported and compatible, the root partition size was only 512MB. For the ExOS v7.x firmware the root partition size has to be at least 1G for the firmware to fit.
So during the upgrade to 7.x if the root partition of the appliance has 768M or 1G root partitions, the root partition size is increased. This is done by merging the two existing root partition (to make 1 1.5G or 2G root partition), and then stealing space from swap to make a new root partition. Either 1.5G or 2G depending on if the original root partitions where 768M or 1G. This is done pre-boot - as it is needed to modify and move partitions which cannot be done once the system is booted. So it is very difficult to do, quite dangerous and rather limited in what can be done.
So you end up with less swap. But the Exinda tries to account for that - on the first boot after the upgrade we attempt to 'steal' additional space for swap. It will try to take some from the virt partition (used for creating virtual machines on the Exinda) first, then from edge cache's partition and then from SMB's partition. If it can find enough free space to steal it will take that and create a second swap partition as a logical volume. If it cannot find any spare space it will not add this additional swap space.
It is important to note that only ExOS v7.x firmware knows how to use this additional LVM swap space - so if the appliance is booted back to an older version it will not use it. Also the 'storage management' on the CLI/WUI has not been updated to be able to handle swap space (so swap space can be increased or decreased just like any other volume) so it is not possible to manually increase (or decrease) the swap size form the UI.
If the appliance does not have enough swap space or it is erroneously believed to be misbehaving, contact Exinda TAC. There are ways that the technical team can use to increase the swap size, if absolutely necessary, though it is a risky procedure.
Internal NotesHere is an example of an upgraded systems:
[admin@exvm-client ~]# cat /proc/swaps
Filename Type Size Used Priority
/dev/vda8 partition 524152 460 -1
/dev/dm-5 partition 1216508 0 -2
The /dev/vda8 is the remainder of the original swap partition. So this system originally had 2G swap and 2 x 768M root partitions, then during upgraded it merged the two existing root partitions into a new 1.5G root partition and then stole 1.5G from swap to make a new second root partition.
The /dev/dm-5 is the LVM swap. This system tried to get 1.5G here but could only find 1.1G of spare space to steal so that is how big this volume ended up.
We can see the swap LVM, it is called lv-swap:
[admin@exvm-server ~]# lvs
LV VG Attr LSize Pool Origin Data% Move Log Copy% Convert
lv-cifs vg-storage -wi-ao-- 1.92g
lv-edge-cache vg-storage -wi-ao-- 612.00m
lv-monitor vg-storage -wi-ao-- 10.00g
lv-swap vg-storage -wi-ao-- 2.00g
lv-users vg-storage -wi-ao-- 1.00g
lv-virt vg-storage -wi-ao-- 1.00g
lv-wan-memory vg-storage -wi-ao-- 2.20g
A newly manufactured system will look like this:
[admin@exvm-server ~]# cat /proc/swaps
Filename Type Size Used Priority
/dev/vda8 partition 2097640 43712 -1
/dev/dm-1 partition 2097148 0 -2
So 2G swap partition and 2G swap LVM.
If that LVM does not exist then it can be manually created from the
But you need to make sure there is a lot of free space in the virt, cifs or edge cache volumes first so it has some space to steal.).
If the LVM does exist but is not large enough then the size can be increased from the shell:
lvresize -L <newsize> /dev/vg-storage/lv-swap
But you need to make sure the additional space being added is already free by reducing the size of the other volumes.