A Discovery appliance has a large disk that only contains a small swap partition. This sometimes happens when the datastore is moved to a larger disk, leaving only the swap partition on the original disk. Customer wants to allocate a new, smaller disk for the swap partition, so that the large disk can be returned. How can this be done? |
In the following example, the large disk is /dev/sdb and the customer has allocated a new, smaller disk (/dev/sdd) for the swap partition. $ tw_disk_utils --new-swap 24576:/dev/sdd
$ swapoff /dev/sdb1
3. As root, Run the blkid command to determine which UUID corresponds to the old sdb1 swap partition. For example: [tideway@myaddm ~]$ blkid | grep sdb1 | grep swap
/dev/sdb1: UUID="db116c8c-d900-4e9b-82ca-23d4895a6041" TYPE="swap" PARTLABEL="primary"...
$ su
# cp /etc/fstab /etc/fstab.bak
UUID=db116c8c-d900-4e9b-82ca-23d4895a6041 swap swap defaults 0 0
UUID=a48f504a-8520-4abb-9787-c60fd69850c7 swap swap defaults 0 0 6. Remove the entry associated with this UUID corresponding to sdb1 from /etc/fstab. $ mount
$ df - h $ swapon -s
|