My SSD is showing signs of old age and low SSD life parameter value as it has been in use for 6 years. So it is time to replace it…
I have been thinking 3 possibilities:
Make a backup, shutdown, connect the new drive to the server, boot up and restore the backup to the new drive, shutdown, disconnect the old drive and boot
Shutdown, connect the new drive, boot up, mirror the old drive with the new drive, after mirroring is complete remove the old drive from the mirror and maybe later add a new drive for a new mirror drive (mirroring is not necessary for me for the System drive and I accept the responsibility )
Shutdown, connect the new drive, boot up and use the Replace function in Manage Devices to replace the old drive
Thoughts from the community, what would be the best way to replace the old with a new one?
As I read the posting, this is not a boot drive but rather a “pool” drive.
For me, it depends on how much work you really want to do reconfiguring your shares for example. The datasets, blah blah blah.
My advice,
Provided the new drive is larger than the old drive, install it as a mirror. This will make the new drive completely identical to the old drive. No need to make new datasets, permissions, etc.
Let it run for a few days if you like.
Next remove the old drive from the pool. I do not know if the version of TrueNAS you are running supports that, however it is a simple zpool command to remove the old drive, then you no longer have a mirror. I’d have to look up the exact command, but it was not something crazy.
Power down, remove the old drive.
Power up and ensure you do not have any errors with your pool configuration. It should be just like it was before you started this.
One step you could do first, backup your data, just in case you make a mistake then you could restore the data. But if you just make a mirror, let it resilver, then you should have 2 drives with the exact same data, even after you remove the old drive from the mirror.
EDIT: If this is a boot drive, then @Farout hit the nail on th head and that is the best solution.
Basically options 2 & 3 are the same, with option 3 automating some of the work. I’d probably use option 3 as ZFS automatically removes the old SSD when the Mirroring resilver is complete.
No, you don’t have to offline a drive for replacement. This is needed if you intended to remove the failing drive from a redundant pool, while the server is powered off.
In your case, you are basically adding another drive while the server is powered off. Then you perform the actions.