Is Ubuntu 18.04 still using the SSD drive for swap?
Last modified on July 24, 2026 • 2 min read • 248 wordsIn an Ubuntu 18.04 two disk setup (/ on SSD, /home on spinning drive), my Ubuntu 18.04 has still defaulted to use swap space on the SSD although there was a swap partition of the same size on the spinning drive.
sudo fdisk -l[…]Disk /dev/sda: 74,5 GiB, 80026361856 bytes, 156301488 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0x34836041Device Boot Start End Sectors Size Id Type/dev/sda1 * 2048 148054782 148052735 70,6G 83 Linux/dev/sda2 148056062 156301311 8245250 4G 5 Extended/dev/sda5 148056064 156301311 8245248 4G 82 Linux swap / SolarisDisk /dev/sdb: 931,5 GiB, 1000204886016 bytes, 1953525168 sectorsUnits: sectors of 1 * 512 = 512 bytesSector size (logical/physical): 512 bytes / 512 bytesI/O size (minimum/optimal): 512 bytes / 512 bytesDisklabel type: dosDisk identifier: 0xf6870277Device Boot Start End Sectors Size Id Type/dev/sdb1 2048 8390655 8388608 4G 82 Linux swap / Solaris/dev/sdb2 8390656 1953525167 1945134512 927,5G 83 Linux[…]Checking which drive is the SSD:cat /sys/block/sda/queue/rotational0cat /sys/block/sdb/queue/rotational1Which swap partition is used?more /etc/fstab[…]# swap was on /dev/sda5 during installationUUID=fdb5ad84-f758-4326-a6c8-7adf91d21079 none swap sw 0 0[…]Check whether the UUID corresponds to the SSD:sudo blkid /dev/sda5/dev/sda5: UUID="fdb5ad84-f758-4326-a6c8-7adf91d21079" TYPE="swap" PARTUUID="34836041-05"