by vel0city · 1y ago · 0 comments
The workload for a security camera or a DVR is going to be pretty different from a lot of NAS devices or desktop/server use. Shingled Magnetic Recording (SMR) is fine for things like a security camera, where you're just going to be writing long files and probably just overwrite eventually. SMR is really bad if you need lots of random sparse file modifications.
I do agree they're probably overboard on SKUs but having an obvious SMR SKU versus non-SMR is pretty important in my book. The fact they mixed in SMR into some regular drives and muddied the waters on which tech is going into which SKU really turned me off WD; I don't think I'll ever buy another one of their hard drives again.
This is why WD figured they could get away with it, but it's a shame what it does if you're rebuilding your ZFS array (if they'd actually talked to customers they might have find a lot of people who buy big drives are ZFS heads!)
Myself I had a security camera set up to monitor my "cat room" last summer when I was trying to gentle a feral cat, I am thinking of pointing it at the driveway and monitoring it with ZoneMinder. ZoneMinder wants its own volume to write to, I am thinking of putting in a spare Intel SSD (superior, though review sites never told you) for that purpose, it's not like I need to store terabytes worth of video from it.
ZFS has a lot of genuine potential to work well with SMR drives, but that potential depends on glue code that nobody has written yet.
I think BTRFS is halfway there?
The problem is that you cannot buy host managed zoned disks.
...and I'm not sure that will change. The thing is, the "drive-managed SMR" models I've managed to get my hands on don't have a zoned storage API. I'm not sure how a filesystem (or application that directly goes to the block device layer) is supposed to work with them intelligently.
There are supposed to be host-managed and hybrid host+drive-managed SMR drives out there, but AFAICT they're only sold to enterprises/hyperscalers (maybe only the latter even). And those are using custom proprietary software (e.g. Google's D servers).
...so who would write/use this glue code? unless the manufacturers decide to contract filesystem developers as a lead-up to wider sale of these things, or something to that effect.
It was a simple mistake, one I've made myself many times. You're so primed to hear A you hear A even though the other party says E.
Anyway, this was of course for host-managed drives, and I haven't heard much talk about that since in ZFS leadership meetings or similar.
ZFS has 16MB block size support, and there has been talk about bumping that up as storage grows, so perhaps one day one could imagine 128-256MB record sizes for storing large blobs, which could fit with SMR better.
But yeah, would need to write code for that and ZFS ain't exactly overflowing with devs.
In theory you're right, SMR is not necessarily a problem for NVRs if well-implemented. However, I had poor luck running my own NVR software on drive-managed SMR. (The cheap kind that doesn't support zoned storage APIs, just pretends to be a standard drive.) 2/2 drives failed within a year, despite staying within the rated workload. Admittedly it's a small sample, but it soured me on drive-managed SMR. I suspect NVR software written to use host-managed SMR or hybrid SMR might have better luck, but AFAICT those drives are only sold to enterprises.
...and AFAICT, the WD Purple Surveillance Hard Drive and WD Purple Pro Smart Video Hard Drive lines do not use SMR. Looking at the current highest-capacity drives for both lines:
* The WD Purple Surveillance Hard Drive, 8TB (WD11PURZ) is specced at 180TB/yr.
* The WD Purple Pro Smart Video Hard Drive, 24TB (WD240PURP) is specced at 550TB/yr.
...vs something like 55 TB/yr that I've seen for SMR drives.
https://nascompares.com/answer/list-of-wd-cmr-and-smr-hard-d... also says that WD11PURZ is CMR. No listing for WD240PURP.
edit: oh, and the spec sheets for both lines explicitly say all drives use CMR. https://products.wdc.com/library/SpecSheet/ENG/product-brief... https://products.wdc.com/library/SpecSheet/ENG/product-brief...
PSA to anyone reading: do not use Purple drives for anything non-DVR/NVR related
wear leveling could mitigate, but the choices are somewhat limited:
NILFS seems to make assumptions based on SSDs, blowing up during its cleaning operation
btrfs or bcachefs could help, but who knows whats going on with those
Actually the Purple only has one distinguishing characteristic. An ATA command to skip bad sectors instead of trying to read/write repeatedly. This is great for an NVR but it's not mandatory to use.
Wait what? Isn't NILFS designed for spinning rust?