So I have a Samsung 250GB 850 Evo SSD and a 500GB 860 EVO SSD. I'm looking at using Solaris for this server (so looking at whether doing this with ZFS is possible). Is it possible to mirror the 250GB SSD with a 250GB partition on the 500GB SSD, while leaving the other half of the 500GB drive useable (it would used rather infrequently so not too worried about a performance hit)?
Asked
Active
Viewed 740 times
6
-
6This isn't a good idea. Can you acquire equally-sized disks? – ewwhite Sep 16 '19 at 12:00
-
It was supposed to be 2 x 250GB SSDs but they were out of stock so they gave me a 500GB one instead. So I'm hoping to actually be able to use that extra space. – smw Sep 16 '19 at 13:18
-
2a) If they can't sell you what you requested then they can give you 2 x 500GB SSDs and b) Solaris? *checks watch* it's 2019, why do you want Solaris? – Chopper3 Sep 16 '19 at 13:39
-
2SmartOS - it's an OpenSolaris based OS – smw Sep 16 '19 at 14:55
1 Answers
10
First things first: this is not a good idea. You should really use same-capacity disks, if possible.
That said, what you ask is indeed possible: you need to partition both disks each with a ~250 GB partition, and setup ZFS to use these two partitions as block devices for the mirrored vdev.
For example:
- disk #1 will have a single, 250 GB partition;
- disk #2 will have two 250 GB partitions;
- a zpool is created using the first partition on each drive (ie:
zpool create tank mirror /dev/sda1 /dev/sdb1
); - the second 250 GB partition on disk #2 is available for other uses: you can create another zpool (ie:
zpool create scratch /dev/sdb2
), or even use it for with another filesystem (ie:mkfs.xfs /dev/sdb2
). But remember that this will not be mirrored in any way.
shodanshok
- 44,038
- 6
- 98
- 162
-
6Why would it not be a good idea? Would it be an IO performance issue? If the second partition is not being read to or written to (apart from maybe 5% of the time) would there still be a problem? Or is it because the second partition would not be mirrored (there wouldn't be any important data on the partition)? – smw Sep 16 '19 at 13:21
-
6It's a bad idea because you're starting with a flawed solution. For the effort spent in asking what's possible, you could just acquire disks of equal size and not worry about the ramifications. – ewwhite Sep 16 '19 at 13:35
-
2Although I agree with the other comments that this is far from an ideal solution, if IO isn't an issue then I don't see a problem with this particular use case. @shodanshok is already familiar enough with RAID to understand its benefits and should therefore also understand that everything on the second partition is to be treated as volatile. For example, all important data to be held on the RAID with the second partition for downlaods, games, Steam library, etc. – Zhro Sep 16 '19 at 20:13
-
1Also of note, this could be used as both a cost-savings measure and a way to *increase* performance in the case of a laptop with an SATA SSD and a second NVMe drive. Performance is expected to be excellent on the NVMe but hobbled by the IO limitations of the SATA disk. By intentionally choosing an oversized NVMe, a second partition can be used there for data which would benefit from IO but doesn't need to be mirred (games as an example). You would need to run benchmarks to confirm, but the extra IO bandwidth on the NVMe drive may mitigate any issue with simultaneous writes to the ZFS array. – Zhro Sep 16 '19 at 20:18
-
its possible, not good practice... but its possible as they written you can always use bigger disk if you plan to grow, i did that already a yonks ago ;l – djdomi Sep 16 '19 at 20:27
-
1Also may be good to point out that if you only use the 500GB disk for the 250G partition (or don't use much of the other 250G partition), that disk will last longer than the other due to SSD ware-leveling. – DeadChex Sep 16 '19 at 21:55
-
1@ewwhite (and shodan): You're just saying it's flawed without explaining why you think so. You want to give ZFS two equal-capacity partitions, but why would the size of the whole device containing those partitions make any difference? The larger device is also faster in this case (I think), leaving some extra margin for occasional I/O to other partition(s) on the larger device if I/O is bottlenecked (by the slower device) on writes. – Peter Cordes Sep 17 '19 at 04:49
-
@PeterCordes I do not recommend this configuration because it adds additional complexity into the storage stack. For example, it can be more challenging to expand the zpool. Please note that both I and ewwhite are approaching the problem from an enterprise/supportable angle. For a personal PC with a Steam library, feel free to use whatever setup do you want ;) – shodanshok Sep 17 '19 at 07:17