I’d like to swap my spinning disks with SSD drives. I have the new disks and they’re just larger than the old ones. My configuration is a RAID-5 with 3 disks (and one hot spare). Can I hot swap a single disk (HDD to SSD), wait for the new disk to rebuild, then repeat?

I’m thinking that I’d mark down the hot spare, replace it with an SSD, mark the SSD as hot spare, mark HDD 1 as “bad” causing the hot spare to activate, then repeat for the other 2 HDDs. I don’t have a lot of experience with RAID, but did perform a single disk swap once with success.

If this is a bad idea, why? What’s the best way to upgrade?

I’m not sure if this is the right community for this question. If not, please guide me to the right one.

@neuromancer@lemmy.world
link
fedilink
English
2
edit-2
1Y

deleted by creator

The answer to this is going to depend on your raid controller. Frequently the answer is yes, but some raid controllers are more particular about exactly what drives are in the array. Software raid controllers are typically more forgiving of this type of change.

@xebix@lemmy.world
link
fedilink
English
3
edit-2
1Y

First thing, back up your data in case something goes south.

With that out of the way, I have done this exact thing many times with both zfs and an array managed by mdadm. Depending on the filesystem on top of your raid array, there may be some additional commands you’ll need to run to extend your partition to use all of the available space in your larger array. You do have to wait between each disk swap to wait for the array to rebuild so it might be quicker to just make a backup, remove the old drives, and build a new array with your new drives and then copy the data back over. That being said, it is fun to hot swap all of those disks and not lose any data or have downtime assuming everything goes smoothly.

SGG
link
fedilink
English
41Y

Yes, it’s a bad idea to do it this way. The most likely time a RAID array will fail is during a rebuild as that is a whole bunch of drive activity over a sustained timeframe.

Better to perform a backup or copy, power down, remove all the old drives, install the new ones, power back up, configure a new array (most people recommend to use RAID 6 at a minimum, no hot spare, so you have two drive redundancy) then restore or copy back the data.

This way you can also keep the old drives as a cold backup of sorts, potentially reimporting the configuration if needed.

@dktr@lemmy.world
link
fedilink
English
31Y

You might also want to check that your controller really supports hot-swapping. Not all do.

Consider moving to RAID-6. Single redundancy is not cool anymore.

@Anonymouse@lemmy.world
creator
link
fedilink
English
11Y

This is just a homelab, running on old hardware. I don’t think the raid controller supports RAID-6 and I only got 3 new SSDs, and I read that RAID-6 needs 4 drives.

Correct. Get a 4th drive. You will be thankful one day down the road when you are rebuilding the array and you lose a drive during the rebuild.

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 31 users / day
  • 80 users / week
  • 216 users / month
  • 845 users / 6 months
  • 1 subscriber
  • 1.42K Posts
  • 8.13K Comments
  • Modlog