df -h /swap.img
lsblk
systemctl status docker vastai
systemctl stop docker vastai
systemctl disable docker vastai
sudo systemctl disable docker.socket vastai
sudo vim /etc/fstab
sudo mount -a
lsblk
sudo systemctl disable docker
lsblk
sudo umount /var/lib/docker
sudo lsof | grep /var/lib/docker
sudo systemctl stop dockerd
sudo systemctl disabled dockerd
sudo systemctl disable dockerd
sudo systemctl stop docker
sudo systemctl stop docker.socket
sudo lsof | grep /var/lib/docker
sudo systemctl disaple docker.socket
sudo systemctl disable docker.socket
sudo umount /var/lib/docker
lsblk
sudo mkswap /dev/nvme1n1p1
sudo swapon /dev/nvme1n1p1
sudo swapon --show
sudo nano /etc/fstab
sudo sysctl vm.swappiness=20
lsblk
Summary of Commands
bashCopy code
# Stop Docker service
sudo systemctl stop docker
# Kill any remaining Docker processes
sudo killall dockerd
sudo killall containerd
# Verify no Docker processes are running and kill any remaining
ps aux | grep docker
ps aux | grep containerd
sudo kill -9 <PID> # Replace <PID> with the actual process IDs
# Unmount the partition
sudo umount /var/lib/docker
# Verify unmounting
lsblk
# Format the partition as swap
sudo mkswap /dev/nvme1n1p1
# Enable the new swap space
sudo swapon /dev/nvme1n1p1
# Verify the new swap space
sudo swapon --show
cat /proc/swaps
# Make the change permanent by editing /etc/fstab
sudo nano /etc/fstab
# Add the following line:
/dev/nvme1n1p1 none swap sw 0 0
By following these steps and using these commands, you can unmount the partition, format it as swap, and enable it for use by your system.