Hi all,
So when I installed proxmox to my two main install SSD's in a ZFS mirrored configuration, I did not realize that it would be creating a swap partition on the ZFS drives. (I should have, because one is needed, and where else would it, go, but I just didn't think of it)
My two main SSD's in this mirror are not very high write cycle drives, so for obvious reasons I'd prefer to not have the swap write to them if avoidable.
I have a 128GB dedicated high write endurance SSD I could use instead. I THINK I know how to go about switching to it, but I just wanted to check in here first to make sure I'm not going to break anything.
First, I would use fdisk to partition the disk I want to use and create a linux swap partition on it, filling the entire drive.
Then I would use the "swapoff" command to turn off the existing swap (with vm's and containers shut down, just in case)
Now, I would edit /etc/fstab and change it to point at the new drive I just addad a swap partition on instead of the ZFS swap.
now, I could use the "swapon" command to turn swap back on, and it should be on the new drive.
Since it appears that the ZFS swap is just a dataset on the main pool of my mirror, I should now be able to remove it by using a command like the below:
zfs destroy rpool/swap
So the above is the plan. Is there any reason I can't or shouldn't do this? Could it cause any trouble?
Thanks
Matt
So when I installed proxmox to my two main install SSD's in a ZFS mirrored configuration, I did not realize that it would be creating a swap partition on the ZFS drives. (I should have, because one is needed, and where else would it, go, but I just didn't think of it)
My two main SSD's in this mirror are not very high write cycle drives, so for obvious reasons I'd prefer to not have the swap write to them if avoidable.
I have a 128GB dedicated high write endurance SSD I could use instead. I THINK I know how to go about switching to it, but I just wanted to check in here first to make sure I'm not going to break anything.
First, I would use fdisk to partition the disk I want to use and create a linux swap partition on it, filling the entire drive.
Then I would use the "swapoff" command to turn off the existing swap (with vm's and containers shut down, just in case)
Now, I would edit /etc/fstab and change it to point at the new drive I just addad a swap partition on instead of the ZFS swap.
now, I could use the "swapon" command to turn swap back on, and it should be on the new drive.
Since it appears that the ZFS swap is just a dataset on the main pool of my mirror, I should now be able to remove it by using a command like the below:
zfs destroy rpool/swap
So the above is the plan. Is there any reason I can't or shouldn't do this? Could it cause any trouble?
Thanks
Matt