Raid migration from SMR to CMR reddit / selfhosted ---------------------------------------------------------------------- polaroid_kidd · 2023-11-03 10:52 Hi everyone I'm looking for some input here. Ever since I found out about the WD RED SMR fiasco I've been wondering if I should migrate to CMR disks and how I should do this. I don't really want to loose all the data (I have a large media library that I'd rather not have to digitize again), so I was wondering if I could do it disk by disk (ie. add one CMR disk, build the raid, remove one SMR disk, fix the raid). I know this will take *ages* but it beats the other option. This is my current raid set-up. Any help would be greatly appreciated. ``` sudo mdadm --detail /dev/md0 [sudo] password for dle: /dev/md0: Version : 1.2 Creation Time : Fri Feb 5 10:23:34 2021 Raid Level : raid5 Array Size : 15627538432 (14903.58 GiB 16002.60 GB) Used Dev Size : 3906884608 (3725.90 GiB 4000.65 GB) Raid Devices : 5 Total Devices : 6 Persistence : Superblock is persistent Intent Bitmap : Internal Update Time : Fri Nov 3 11:49:18 2023 State : active Active Devices : 5 Working Devices : 6 Failed Devices : 0 Spare Devices : 1 Layout : left-symmetric Chunk Size : 512K Consistency Policy : bitmap Name : cassandra:0 (local to host cassandra) UUID : 50545573:0c2d8753:635127e3:0489cae6 Events : 13256715 Number Major Minor RaidDevice State 0 8 17 0 active sync /dev/sdb1 1 8 1 1 active sync /dev/sda1 5 8 33 2 active sync /dev/sdc1 4 8 49 3 active sync /dev/sdd1 7 8 81 4 active sync /dev/sdf1 6 8 65 - spare /dev/sde1 ``` ---------------------------------------------------------------------- Reverent · 2023-11-03 11:04 * raid 5 is about cost effectiveness spread across disks, and is also one of the worst methods of drive redundancy available. A drive loss can easily lead to total failure due to the write stress of a parity recovery. * use one drive with backup or two drives with full redundancy. The first is actually better * your use case is read heavy which is actually the intended use case for SMR, so... You're fine I guess? ---------------------------------------------------------------------- polaroid_kidd · 2023-11-03 11:08 > A drive loss can easily lead to total failure due ... what?... WHAT?! I'm guessing moving away from RAID5 isn't really possible.... is it..? ---------------------------------------------------------------------- Stetsed · 2023-11-03 11:15 So imho how he framed it is pretty fear-mongering, but it is technically correct. When a drive fails it is able to emulate that drive due to the parity data remaining on the other drives, however if you then want to rebuild the drive it will have to take the data from each of those drives and write it to the new drive stressing the entire array. I run raidz1 on all my arrays simply because for my use case it's a good balance between safety and usable storage. However here comes the saying back, RAID IS NOT A BACKUP. It's a redudancy technology but is not a replacement for a backup. Also I do agree for this workload there isn't really a reason you can't use SMR drives for this workload, as your data load is very read heavy there isn't really a major reason to use CMR over SMR(Although I do use CMR for all my drives simply because it gives me more flexibility). Also the "WD Fiasco" you mention is specifically about them trying to sneak SMR drives into what would usually be CMR products(like there WD Red line) unless there has been something new I do not know about. ---------------------------------------------------------------------- esvaf · 2023-11-03 11:48 In your case i would at first replace one-by-one drives to new CMR with rebuild after each and then convert your raid5 to raid6, it will be more reliable, but needs one extra disk (i see that you have it in spare mode) ---------------------------------------------------------------------- polaroid_kidd · 2023-11-03 12:08 > RAID IS NOT A BACKUP Yes, that's why I have an offsite backup for everything apart from my plex library (blackblaze), which runs nightly with duplicati. > unless there has been something new I do not know about No, that's the one. I have WD Reds. If I had known about their performance in a RAID setting I would have not bought them. I've had a drive fail in the past when I only had 4 drives and the rebuild took a solid 2-3 days. During this time the services were pretty much not usable. Now, with 6 drives I'm willing to bet it'll take a week or more. My thought process is as follows (if it works) 1. Slowly replace SMR with CMR 2. Keep SMR drives for a on-site media backup 3. move away from RAID5 to.. ? ---------------------------------------------------------------------- ElevenNotes · 2023-11-03 12:10 This. R6, always for large HDD because of rebuild time. ---------------------------------------------------------------------- Stetsed · 2023-11-03 12:25 So you are correct that due to there slow writes speeds they can make rebuild times alot longer which can be very annyoing, I think your process of moving them over to CMR in that case is a good idear and using SMR drives for an onsite media backup as that's more a good roll for these drives. Honestly if you should move away from RAID5 is up to you, I personally think it's fine(Raidz1 is the ZFS equivalant of RAID5), however what you will want to change to will depend on yourself and how scared you are. You could go Raid6 which let's 2 drives out of the array fail before losing any data, or you could go for a full mirror where half of your drives could fail before losing any data, but ofcourse this comes at a steep usable storage cost. ---------------------------------------------------------------------- polaroid_kidd · 2023-11-03 12:28 Is a migration from RAID5 to RAID6 possible without having to set everything up from scratch? ---------------------------------------------------------------------- Stetsed · 2023-11-03 12:45 So I am unable to answer this due to me not using mdadm instead using ZFS in basically all cases, ZFS does allow this where you just add a drive to an existing pool and it will increase the parity level(Currently not possible to expand the data storage although this is being worked on). I hope one of the others on here can help, and with some quick googling I found ([https://serverfault.com/questions/351240/convert-linux-software- raid-from-raid5-to- raid6](https://serverfault.com/questions/351240/convert-linux- software-raid-from-raid5-to-raid6)), if it's correct I do not know but I hope it helps.