Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
SMR hard drives... MDRAID or DMRAID (instead of zfs)?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Mon Nov 15, 2021 1:47 am    Post subject: SMR hard drives... MDRAID or DMRAID (instead of zfs)? Reply with quote

Well apparently there's a lot of hubbub about shingled magnetic recording hard drives and how it kills ZFS.

However I wonder, how about MDRAID or DMRAID?

I know it might be sacrilege to buy a SMR drive as it's known that it kills ZFS RAIDZ resilver, but I'm seeing inconsistent results for MD and DM RAID. My current concern is that one of my disks in my MD RAID is failing and should I really be worried about getting a SMR disk? I suspect a device managed SMR would be better than ending up with a host managed SMR as MD doesn't know anything about SMR, but will I see the failing resync behavior in MD or DM RAID?

I'm also not familiar with DM RAID and how it differs in write patterns from MD RAID but seen some anecdotal reports that SMR disks will perform acceptably for MD RAID. As in not a 9-day resilver but a 24 hour resync deal (if a comparable CMR disk would take 18 hours to resilver). While it would be nice if I keep my zfs options open, if it works for MD or DM, it's fine for now...

(BTW, in terms of theoretical speeds, a 4TB disk would take a bit over 11 hours to write sequentially at 100MB/sec. At 18 hours to resilver even a CMR, it seems that zfs RAIDZ is doing a lot of metadata writes which may be what's killing things. I suspect a MD resync would also need to do metadata writes as it syncs which would likewise cause issues, though I wonder if it's any different as the vast majority of MD/DM resyncs are sequential writes, which theoretically an SMR disk should be able to optimize to one contiguous shingle minus the metadata.)
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
molletts
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2013
Posts: 119

PostPosted: Mon Nov 15, 2021 7:34 pm    Post subject: Reply with quote

You may be able to dodge the effects of shingling if you can find out how big the SMR zones are on the disk(s) you're planning to use by setting the RAID stride (chunk size) to be the same or a multiple and ensuring that the array is aligned appropriately to the zones.

As long as the RAID implementation always writes an entire chunk at a time (offhand, I don't know whether either DMRAID or MDRAID guarantees or can be configured to do this), the SMR drives should never have to do read-modify-write cycles. Don't forget to tell the filesystem about the underlying RAID geometry too so it can try to play nicely - for ext4, this would be by specifying '-E stride=x,stripe_width=y' on the mkfs.ext4 command line with x being the number of filesystem blocks per RAID chunk and y the number per stripe (chunks * data disks).

I've never used SMR disks so I don't know how effective this is in the real world.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Mon Nov 15, 2021 7:41 pm    Post subject: Reply with quote

eccerr0r,

dmraid and mdraid use the same kernel code.
SMR is reported to kill raid altogether when a drive is slow to respond because its busy doing reshingling.
It gets kicked out of the raid set.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Anon-E-moose
Watchman
Watchman


Joined: 23 May 2008
Posts: 6098
Location: Dallas area

PostPosted: Mon Nov 15, 2021 7:42 pm    Post subject: Reply with quote

I wouldn't mix cmr and smr drives.

What makes smr drives "bad" for any raid, is the amount of data that's streaming to the disk and not giving the disk time enough to push the data to the physical sectors before it goes back for more data.

ZFS doesn't handle smr drives too well, but not 100% sure why. (google would probably give results)

Edit to add: To me, the price difference isn't great enough to mess with smr drives.
_________________
PRIME x570-pro, 3700x, 6.1 zen kernel
gcc 13, profile 17.0 (custom bare multilib), openrc, wayland
Back to top
View user's profile Send private message
eccerr0r
Watchman
Watchman


Joined: 01 Jul 2004
Posts: 9679
Location: almost Mile High in the USA

PostPosted: Mon Nov 15, 2021 8:00 pm    Post subject: Reply with quote

NeddySeagoon wrote:
eccerr0r,

dmraid and mdraid use the same kernel code.
SMR is reported to kill raid altogether when a drive is slow to respond because its busy doing reshingling.
It gets kicked out of the raid set.

Okay I would think md and dm are very similar as they RAID on a block level.

Anon-E-moose wrote:
ZFS doesn't handle smr drives too well, but not 100% sure why. (google would probably give results)

However zfs RAIDZ behaves different than MD/DM and the shingling, as people have demonstrated, result in 10x resilver times. Most everyone that I read using "google" on available data about SMR and RAID is either hearsay or RAIDZ, which may be different MD/DM. One such report I glanced over that appears to be MDRAID seems to indicate it's not as bad as ZFS RAIDZ to SMR disks.

So... more hearsay, experience only with zfs RAIDZ, or someone actually get actual data for MD/DM RAID behavior?

I'm more worried about getting a drive randomly without verifying its SMR/CMR status, like getting a cheap used drive... I can take slightly worse behavior (tbh even half speed may be "acceptable" to me!) but agreed, if it takes 10x as long to rebuild, that's unacceptable.

---

Well the disk that I knew was failing...just got kicked from the md array. I had to get another disk in there before buying another disk, so I tore apart a RAID1 and inserted it into the RAID5. I used an old WD RE4 2TB CMR disk, unfortunately this seems to be a really slow disk, but it should hold me through until I get another disk.

But RAID did what it was supposed to do: The disk replacement was completely transparent to operations, other than the slowdown. Machine stayed up the whole time. Hooray for RAID and remember RAID is not backup!
_________________
Intel Core i7 2700K/Radeon R7 250/24GB DDR3/256GB SSD
What am I supposed watching?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum