How to ZFS on Dual-Actuator Mach2 drives from Seagate without Worry

Hey all, so I did in fact buy a pair.

While both drives “function” perfectly, the maximum read/write speeds I’ve been able to observe in benchmarking or otherwise is just over 270Mb/s. That is to say, the same speed as a single actuator drive.

My belief was that I should be seeing about double the data rate for sequential reads; i.e. from Seagate’s user manual: “MACH.2 dual actuator technology enables up to 2X the sequential data rate and up to 1.9X the random performance of a single actuator drive.”

I have the drives hooked to the standard Intel C622 SATA controller, although I don’t know if this makes a difference. The drives show as having negotiated the full 6Gbps connection rate.

Any ideas?

so for sas, the devices don’t show up as two devices, explained above. For sata, it can only be one device, so you have to partition it to use each piece of the disk at the same time.

What you will want to do is create two partitions on each half of the disk. each half of the disk can run independently.

2 Likes

Thanks for the explanation. Is there an exact methodology to doing this, or should I just split the disk into two equal sized partitions in gparted?

2 Likes

What shows up in /sys/block/<device>/queue/independent_access_range?

See the following for where that comes from

Q: How do you identify these LBA ranges in Linux?
A: In Linux Kernel 5.19, the independent ranges can be found in /sys/block//queue/independent_access_range. There is one sub-directory per actuator, starting with the primary at “0.” The “nr_sectors” field reports how many sectors are managed by this actuator, and “sector” is the offset for the first sector. Sectors then run contiguously to the start of the next actuator’s range.

See also

# Linux: Partitioning Each Actuator of an Exos 2X SATA
parted /dev/sda mklabel gpt
parted --align optimal /dev/sda mkpart primary 0% 50% 
#replace “optimal” with option “min” to save space
parted --align optimal /dev/sda mkpart primary 50% 100%
# Linux: Create a LVM Striped Partition Using Both Actuators of an Exos 2X SATA
parted /dev/sda mklabel gpt
parted --align min /dev/sda mkpart primary 0% 50%
parted --align min /dev/sda mkpart primary 50% 100%
pvcreate /dev/sda1 /dev/sda2 
#create two pvs
vgcreate demo_test /dev/sda1 /dev/sda2 
#create a vg named demo_test
lvcreate -n lv_demo --stripes 2 demo_test -L ‘vgdisplay --units S 
demo_test| grep “VG Size” | awk ‘{print $3}’ ‘S
#create a LVM partition lv_demolocated at /dev/demo_test/lv_demo
4 Likes

Thanks for the link to their FAQ, I hadn’t seen this on the page for these particular X18s.

Here’s a single threaded benchmark of the RAID 10, created with…

sudo mdadm --create /dev/md0 --run --level=10 --layout=n2 --chunk=128 --assume-clean --raid-devices=4 /dev/sda1 /dev/sda2 /dev/sdb1 /dev/sdb2

Screenshot from 2023-07-17 08-21-56

And here’s a 2-threaded benchmark. Simultaneously reading two threads from the RAID 10 allows the system to read from all four actuators, demonstrating an impressive ~1.1 GB/s for reads!

5 Likes

I just bought very similar drives. 2x18. So I am guessing the optimal way in zfs is to set up a pair is to create 2 mirrors and then mirage the 2 v devs together.
Union of. m1. : drive A partition 1 mirror drive b partition 1
m2 : A2 mirror B2

Can I accomplish something similar in Linux with Btrfs. I know how to create M1 and M2. How do I union them at a block level for performance?

EDIT : figured it out. lvm to raid 0 A1 + A2 and B1 + B2 . then btrfs raid 1 the 2 vg devices. … or go zfs on these 2 drives. I don’t need to expand for a while. good info above. thanks.

1 Like

Howdy folks, now that I’ve ordered for my own needs :slight_smile: I wanted to share that Newegg has refurb SATA Exos 2x18TB “Refurb” drives available for $219 each.

The SAS version is a bit easier to configure as each actuator is presented as a unique LUN. The SATA version presents a linear block address range where the “split” between actuators is precisely at MAX_LBA/2. Even though I have to create two properly aligned GPT portions while accounting for GPT partition overhead, I find the SATA versions to be far more versatile and performant while negating the need for complicated/expensive 12G SAS topologies and HBAs.

The precise “magic” to get the provisioning right is here:

That script also happens to be a relatively complete TUI for prepping SATA DA drives for ZFS.

In other news, I’ve a 45 drives chassis on the way, hope to add some modules to “Huston/Cockpit” to provision SATA dual actuator drives.

5 Likes

The SATA greater versatility makes sense, but I would have thought the SAS controlled drives would always have the upper hand in performance due to their deeper command queue depth. Maybe SAS HBAs are doing something funny?

@twin_savage you raise a very valid point, one that I thought would factor more highly in my evals - but it did not for any of the clustered type file systems I’ve been testing, especially ZFS.

Now for direct attach conventional file system like NTFS or ext, I believe queue depth “might” play a more prominent role, but to be honest I don’t know why one would use this class of drive under those circumstances and so did not spend much time playing with it.

Now where things get “dicey” is the SATA product, being a single target rather than two LUNS, has to share the 32 command queue between the two actuators. What’s more, if you are careless in your layout, you can create a bit of a file system thread lock by saturating one of the two command queues with commands while other actuator is blocked from getting new commands until the first one empties the queue. You can definitely create mutex-style deadlocks here!

That being said, I find that if you create your vdevs on either “A” or “B” actuators, but never combine them to form a single (ZFS) vdev, you will never get the command queue out of balance.

So the rule of thumb for SATA (not SAS!):

  1. All “A” actuators can be combined to form a composite device (even LVM/mdadm RAID).
  2. All “B” actuators can be combined to form a composite device (even LVM/mdadm RAID).
  3. Never, ever create a composite device made up of both “A” and “B” actuators such that one can block on data from the other that can’t be requested for lack of available command queue entries.

My provisioning snippet and script just above takes care of all of that and included is some LVM examples.

2 Likes

Noob to L1tech, but since no one bother to ask. Is that possible a costumer grade (SATA only) Synology NAS could utilize the dual actuator design?

From the official faq, they seem to indicate it could be done as long as the LBAs are treated differently.

1 Like

I am working on that right now. Its not a fun experience unless you like hacking around the linux underbelly, but I think I can convince synology to make it a little easier once I get a howto put together

7 Likes

Just saw the video. I’d be interested to see what your thoughts are on cost/benefit of different pool layouts. RAID Z3 kinda sucks all the fun out of this IMO.

Mdraid is how I did 5 gigabytes/sec. Raid60 worked great too

2 Likes

It’s been available well for a year now I can buy them from 30 different vendors in EU. But they are waaaaay overpriced.

And I can only buy it in 18TB and not 20TB/22TB.

I can get two regular Exos 18TB drives for the same price as one 2x18TB. And be even faster with double the storage. No, thanks! Unless you are restricted space wise (and for some reason can’t use SSD in that case) prices would need to come way down for the Dual Actuator Mach2 drives to make sense. I really struggle to see any niche where this makes sense.

Is that second hand/used? Are you looking on eBay, or reputable sellers?

Yes, 5 year warranty, new enterprise disks from reputable sellers cost half per TB than the Exos X2.

1 Like

Thanks, there are a couple too, and Yeah, All over the expected price, twice the normal. I wonder if they are listing it expecting a “lot” of 2 pieces, without realizing it is single drives with dual activators?

Just make sure to check the serial numbers when you receive them.

Yes, been ordering for years, never a problem with serial numbers or warranty. My point is the Dual-Actuator Mach2 drives are so horribly overpriced I can’t envision any use case where it makes sense to buy them. Doubling the price is just ridiculous. And that’s not a single vendor that made a mistake with the lot size, that’s over 30 vendors so I think that’s just the price that Samsung charges in EU.
I can’t see this for NAS or ZFS where you’re probably better off just buying twice the HDDs for the same price, for more speed than a Mach2, or if you want to save power denser at 22TB instead of 16/18TB drives.
Maybe some proprietary appliance that only fits one HDD, an SSD would be too expensive, but you really, really need that extra bit of speed.

The only place where I can see a use is “I am space-constrained, I have three drive bays, I need more than three drives worth of throughput/IOPS, and I can’t afford SSDs.”

1 Like