Different size disk pool hack

Moderators: jhartley, MSR734, nola

Different size disk pool hack

Post by mnos3c » Tue Mar 26, 2013 12:22 pm

First Scenario:
2x2tb disk
2x1tb disk
Goal: raidz1 (4tb available) with 3x2tb disk (2x2tb disk + (1tb + 1tb striped 0))

Second Scenario:
2x2Tb disk
1x4Tb disk
Goal: raid1 (mirror) with (2x2tb) as disk 1 and 1x4tb as disk 2

Is it possible?

First case:
Can zfs handle 2x1tb disk in raid 0 as a single disk and then put it in a raidz1 pool?
With a hardware raid 0 of the 2x1tb disk should work easily, but can it work just via software?

Second case:
Disk 4tb divided in 2 volumes-->pool mirror of 2volumes (4tb) and 2x1volumes (2x1tb disk)

Any advice would be really appreciate.
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

Re: Different size disk pool hack

Post by raattgift » Tue Mar 26, 2013 3:23 pm

zfs gives you lots of rope with which to make yourself very uncomfortable later.

in the first scenario you're best off creating two mirror vdevs (zpool create -n foo mirror 2tb1 2tb2 mirror 1tb1 1tb2); this will give you ~ 3TB with reasonable replication, and will perform fine for most workloads. zpool version 28 is pretty good at dealing with differently-sized and even differently-performing top level vdevs, and it is a good idea to create top level vdevs using effectively-identical physical devices.

you can, however, arrange practically any sort of pool you want, although you are likely to lose out on replication (a series of i/o errors in a single disk could make your pool go offline, a single failed disk may make your pool effectively unrecoverable).

that said, in order to treat the two 1tb physical drives as a 2tb virtual drive for zfs purposes, you would have to use an unrelated disk management tool and juggle with GPT slices, and give those slices to an appropriate zpool create command line. *nobody sensible* would ever offer to support such a setup, as the software interactions will be very complicated, especially in the event of an underlying hardware fault.

you can certainly use a non-host-based hardware raid system to concatenate the smaller drives; do you have one already sitting idle? if not, don't spend on that, 2tb disks are cheap and straightforward, just get another one of those if you want to go the "zpool create -n foo raidz1 2tb1 2tb2 2tb3" route.

in the second scenario, again, you are adding a lot of complexity that will risk your data being unavailable (perhaps permanently). if you are certain you understand the risks and tradeoffs, your better bet is to hardware raid the 2 2tb drives together, and "zpool create -n foo mirror real4 fake4". that is better than e.g. "zpool create -n foo mirror real2a real2b; zpool add -n foo real4" -- if you strip out the "-n"s, you will get a big warning about a replication level mismatch from the zpool add. it is also better than attempting to stack different softare raid/volume management systems in front of zfs.

the only stable approach i've found (and used) is to create a composite disk lvg with corestorage, then create an LV inside that, and give the LV to a zpool create / zpool add command line. the composite disk is just a concatenation, though; except in one special case, writes will go to the first physical volume until that fills, then to the second physical volume. (the special case is if the first PV is a solid state disk and your particular kernel supports fusion drives; not all 10.8.2 or 10.8.3 kernels do).

if you think doing it with corestorage is complicated, well, i personally think that going down that route with appleraid or softraid is even worse. "good luck", and make sure you have lots of backups, and don't be surprised when things break at the worst possible time.

better approaches (in my mind) would be

mirror 2tba 2tbb
raidz 2tba 2tbb 4tb [wasting half the 4tb, you can zpool replace it with a 2tbc at some point, or replace the 2tb drives with larger drives and zpool expand the pool]

You might also want to read:

http://constantin.glez.de/blog/2010/01/ ... still-best
raattgift Offline


 
Posts: 98
Joined: Mon Sep 24, 2012 11:18 pm

Link

Post by grahamperrin » Fri Mar 29, 2013 7:19 am

grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: Different size disk pool hack

Post by mnos3c » Fri Mar 29, 2013 9:45 pm

raattgift wrote:the only stable approach i've found (and used) is to create a composite disk lvg with corestorage, then create an LV inside that, and give the LV to a zpool create / zpool add command line. the composite disk is just a concatenation, though; except in one special case, writes will go to the first physical volume until that fills, then to the second physical volume. (the special case is if the first PV is a solid state disk and your particular kernel supports fusion drives; not all 10.8.2 or 10.8.3 kernels do).



Thank you. After 2 days on irc and googling your's is the best advice I read about this argument.
If I have understand I need to create a concat disk

Code: Select all
diskutil coreStorage create concat /dev/disk1 /dev/disk2



Then can I

Code: Select all
diskutil coreStorage createVolume lgv-uuid zfs "test" 100%


Or I have to do something else?
Thanks for your effort.
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

Re: Different size disk pool hack

Post by mnos3c » Sat Mar 30, 2013 4:55 am

After several test the code

Code: Select all
diskutil cs create GROUPNAME disk1 disk2


Code: Select all
diskutil cs create GROUPNAME disk1 disk2s2


Gave me:

Code: Select all
Started CoreStorage operation
Error: -69886: Invalid request


My disks:

Code: Select all
diskutil list
/dev/disk0
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *256.1 GB   disk0
   1:                        EFI                         209.7 MB   disk0s1
   2:                  Apple_HFS Lion_256                170.0 GB   disk0s2
   3:                 Apple_Boot Recovery HD             20.2 GB    disk0s3
   4:       Microsoft Basic Data BOOTCAMP                65.6 GB    disk0s4
/dev/disk1
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk1
   1:                        EFI                         209.7 MB   disk1s1
   2:                  Apple_HFS Untitled                999.9 GB   disk1s2
/dev/disk2
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.0 TB     disk2
   1:                        EFI                         209.7 MB   disk2s1
   2:                  Apple_HFS hgst                    999.9 GB   disk2s2


Every disk is formatted clean and repaired/verified.
What can I do?
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

diskutil coreStorage, error -69886

Post by grahamperrin » Sat Mar 30, 2013 6:10 am

Link

Unrelated to ZEVO, error -69886 features in a Super User question in Stack Exchange: Removing encrypted partition on Mac OS X does not work

Without error

I can perform a concatenation without error (example: Creating a composite LVG with Core Storage) so if the error above recurs for you, take the lsof hint from my answer in Stack Exchange; or add a question to the Ask Different area.
Last edited by grahamperrin on Sat Mar 30, 2013 7:16 am, edited 1 time in total.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

The two commands

Post by grahamperrin » Sat Mar 30, 2013 7:10 am

mnos3c wrote:
Code: Select all
diskutil cs create GROUPNAME disk1 disk2


Code: Select all
diskutil cs create GROUPNAME disk1 disk2s2



An afterthought: was there anything between those two?

If not – if the two were consecutive and the first succeeded, then I'd expect the second to fail.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: The two commands

Post by mnos3c » Sat Mar 30, 2013 7:15 am

grahamperrin wrote:
mnos3c wrote:
Code: Select all
diskutil cs create GROUPNAME disk1 disk2


Code: Select all
diskutil cs create GROUPNAME disk1 disk2s2



An afterthought: was there anything between those two?

If not – if the two were consecutive and the first succeeded, then I'd expect the second to fail.



No they're consecutive.
Disk 1 internal, disk 2 external firewire.
Could be a different implementation of coreStorage in 10.8? I'm on 10.7.4


EDIT: I found this https://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man8/diskutil.8.html and the command exists in 10.7.4
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

Re: The two commands

Post by grahamperrin » Sat Mar 30, 2013 7:19 am

mnos3c wrote:… consecutive …


So if the first succeeded, then there was no need for the second.
grahamperrin Offline

User avatar
 
Posts: 1596
Joined: Fri Sep 14, 2012 10:21 pm
Location: Brighton and Hove, United Kingdom

Re: diskutil coreStorage, error -69886

Post by mnos3c » Sat Mar 30, 2013 7:23 am

Why you use this code?
Code: Select all
diskutil coreStorage createLVG [u][b]Core\ Storage\ concatenation[/b][/u] /dev/disk11s2 /dev/disk13s2

What does it mean? I can't find it in reference.
mnos3c Offline


 
Posts: 33
Joined: Wed Dec 26, 2012 6:40 am

Next

Return to General Discussion

Who is online

Users browsing this forum: ilovezfs and 0 guests

cron