I have a question and I can’t find a proper answer for now. I have a dataset (and some subsets, mostly for apps, and some photos) running on an SSD which is slowly dying and needed to be changed soon.
I got my hands on some SSDs which I can use for replacement but those are smaller. With that I can’t mirror because the new disk is smaller. The new disk is big enough that the whole stored data can fit easily.
My thought is, I replicate the data to the new disk in a new dataset there, but than it has a different name and as far as I know I can’t easily change the datasets which contains the configs of my apps. I could rebuild all of that, but I hope there may be an easier solution for that.
I hope you can point me in the right directions.
I hope everything is understandable.
Br
You should be able to just replace the one drive with the other, AFAIK. Edit: If you can’t do that, you can add the second drive as a new vdev to the pool, then remove the first drive. ZFS will migrate the data to the new drive, and it all continues to be the same pool.
Oh boy if that is the case I definitely went way off with my thoughts. I will try that when I have some spare time.
Thank you very much!
Edit: I have added a new vdev to my existing pool. I never done that before so I used the GUI. I got the warning that all existing data is getting wiped. My question is, if I remove the old one now and it does not work, I have data loss am I correct?
Edit2: a little background to my experience: I tinkered around a bit by the time all disks where good. This is my first scenario where one goes bad and I need to think before I am doing something. I know stripe is not a good option in the face of possible data loss, but I want to learn what are my possibilities to my given budget.
Probably not, though it depends a bit on the way in which it “does not work.” If it doesn’t work because the old drive fails completely before the process finishes, you probably lose data. If the new drive fails during or after the process, you probably lose data. If the process fails for some other reason, your data is likely still OK.
True. If you have a third drive the same size as the second, perhaps you can add it as a mirror once this process is over.
Thank you very much for your help.
I am currently removing the old vdev, looks like this takes quite some time.
Is it true that there will be a memory overhead afterwards and the speed is slower?
I would love to set everything up with at least a mirror, sadly I already reached my hard limit on my sata controller of my Mainboard. So I have to juggle and find a new way to do things. I am already thinking of a 12 bay storage to tackle that problem, but I hadn’t found one which is in my price range. I probably need to switch to server graded Hardware. But seems like a little overkill for home use right now.
Edit: removal failed because the disk is busy. So I need to find the cause of that.
Edit 2: just to be sure, because it fails and I can’t find why.
You mean I have the old drive A, add the second drive B (which is smaller) as a new vdev and then it should work?
So I have gone the hard way. My steps, which I have taken:
removal failed, so I created new snapshots
created with the new disk a new pool
transfered the snapshots to the new pool, which i needed to do manual, because somehow the GUI had thrown errors. With CLI it worked.
tried to export the old pool, which failed.
looked like crazy why it is still busy
found the error. I only checked SMB shares, but I have a bunch of NFS shares too and overlooked it. Error was gone by the time I just disabled all sharing services, then it clicked
feeled quite dumb, because all steps before were maybe useless, because the “easy” path had the same error
exported the old pool
reimported the old pool under a new name
exported the new pool and imported it under the old pools name
reinstalled all apps which run on this machine
was happy everything works, besides still feeling dumb, because I overlooked that share.
In the end, it was at least a nice learning journey. Thank you anyway for your directions and guidance. I hope this will at least bring you a little smirk.