↓ Skip to main content

Replace hard disks with SSDs running proxmox on zfs

·332 words·2 mins
 Author
Author
Michael Bretterklieber
Software Developer

I have upgraded the hard disks of my home server, on which proxmox runs under zfs, to SSDs. Here is a short article how I did it.

Unfortunately the performance of zfs using hard disks (raid1) was really poor, so I decided to replace them with SSDs.

I have choosen 2 Samsung SSD 990 pro 2TB. Although the SSD size was exactly the same as the hard disks, I had to do some additional steps since proxmox boots from zfs.

Copy the partition table and generate new GUIDs:

sgdisk /dev/sdc -R /dev/nvme0n1
sgdisk -G /dev/nvme0n1

Replace the first disk:

zpool replace -f rpool /dev/disk/by-id/ata-WDC_WD20EFAX-68B2RN1_WD-WXB2A518V501-part3 /dev/disk/by-id/nvme-eui.00253842414185d8-part3

Due to the slow hard disks, resilvering took almost 3 hours.

Init boot partition:

proxmox-boot-tool format /dev/nvme0n1p2
proxmox-boot-tool init /dev/nvme0n1p2 grub

Reboot to check if the system still boots.

Replace the second disk in the same way. Now that we already have an SSD in use, the resilvering process is lightyears faster then before:

status: One or more devices is currently being resilvered.  The pool will	continue to function, possibly in a degraded state.
action: Wait for the resilver to complete.
scan: resilver in progress since Fri Oct 25 07:47:35 2024
	805G / 805G scanned, 793G / 805G issued at 1.45G/s
	797G resilvered, 98.43% done, 00:00:08 to go

The resilvering process in total took only 9 minutes and 21 seconds, not bad.

Now stop the system, unplug the hard disks and restart it.

The last step is to remove the old hard disks from the boot partition syncing process using proxmox-boot-tool:

proxmox-boot-tool clean
Checking whether ESP '6681-CD46' exists.. Found!
Checking whether ESP '6876-6651' exists.. Found!
Checking whether ESP '8664-90E7' exists.. Not found!
Checking whether ESP '8666-947B' exists.. Not found!
Sorting and removing duplicate ESPs..

It was incredibly easy.

In a production environment you would better use datacenter SSDs, they have fairly higher TBW values.

Keeping an eye on the SSDs using smartd is never wrong ;)

Obviously, if you want a decent performance on ZFS use SSDs!