This document contains official content from the BMC Software Knowledge Base. It is automatically updated when the knowledge article is modified.
BMC Discovery 11.2
Customer has a large disk allocated to Discovery that only contains a small swap partition. He wants to allocate a new, smaller disk for the swap partition, so he can return the large disk. 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.
To create a 24gb swap partition on /dev/sdd, use the following command:
tw_disk_utils --new-swap 24576:/dev/sdd
1. The disk must be a "new disk" as seen in the Disk Configuration utility, i.e. it has not been formatted or partitioned.
2. If the appliance is a member of a cluster, tideway services must be stopped. This should not be required on a standalone appliance.
3. This command does not "move" the existing partition, it just creates a new swap partition.
4. To add a swap file to an existing disk rather creating a swap partition on a new disk, see KA 000077945.
To remove the old swap partition before returning the old disk:
1. Run "swapon -s" to get the partition name of the original swap partition (i.e. /dev/sdb1).
2. As root, execute the following command to disable the swap partition:
3. Browse /etc/fstab to see the UUIDs of the existing swap partitions, for example:
UUID=a48f504a-8520-4abb-9787-c60fd69850c7 swap swap defaults 0 0
UUID=db116c8c-d900-4e9b-82ca-23d4895a6041 swap swap defaults 0 0
4. Run the blkid command to determine which UUID corresponds to the old swap partition. For example:
[tideway@myaddm ~]$ blkid -U db116c8c-d900-4e9b-82ca-23d4895a6041
5. Remove the entry associated with this UUID from /etc/fstab.
6. Reboot the appliance
7. Run these commands and check the output to make sure everything is configured properly:
df - h
If so, the /dev/sdb disk can be removed from the appliance.