Sunday, June 26, 2016

solaris - With a 500GB SSD and a 250GB SSD is it possible to mirror a 250GB partition on the 500GB with the 250GB SSD using ZFS?




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)?


Answer



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.


No comments:

Post a Comment

linux - How to SSH to ec2 instance in VPC private subnet via NAT server

I have created a VPC in aws with a public subnet and a private subnet. The private subnet does not have direct access to external network. S...