7 Replies Latest reply on Jun 30, 2014 5:48 PM by Cindys-Oracle

    ZFS mirrored pool frusturation


      I'm trying to install solaris 11.1 onto a server of mine which has two identical drives I wanted to use in a ZFS mirrored pool.


      When booting from the install cd (text x86) I jump into the console from option 3 on the main menu.


      I do:


      zpool create mirror rpool c7t0d0 c7t1d0

      zpool status rpool


      everything looks fine there as far as I can tell

      so I exit out of the console and use option 1 to jump into the solaris 11.1 installer, assuming I'll have my new mirrored pool as an install point, however, solaris 11.1's installer still just lists my individual drives, and none of my zfs work shows up there.

      I even exited the installer, got back into the console and re-checked my zpool status, it still looked perfectly fine.  I'm confused.


      what am I missing?   Thank you.

        • 1. Re: ZFS mirrored pool frusturation

          The Solaris install tools freshly install the OS, which means recreating the root pool. A fresh install means starting from scratch. In addition, the live install CD that you are using has a more limited scope so there's no way to specify that you want to install on an existing root pool.

          The automated installer would allow you to select the disks and also mirrored them.


          Let the CD installer select the disk and then simply mirror the pool when the installation is done.


          Thanks, Cindy

          • 2. Re: ZFS mirrored pool frusturation

            I think I've got my head in the wrong place.


            I'm thinking of ZFS as a layer between the OS and the storage, much like NTFS is a layer between windows XP and its storage.  In Windows, I'd create partitions or do other storage management tasks prior to installing the OS.  In Solaris...it has to be done after?


            My problem then is, going on your suggestion, I tried to do just that.


            Reading along with the Oracle docs at http://docs.oracle.com/cd/E19253-01/819-5461/gkdep/index.html


            I get errors that tell me I can't add the drive to the pool because it's in use.  -f has no impact.  It seems to me the drive will always be in-use because that's where the OS is.


            Any ideas?


            Thanks for your help!




            I messed with it some more, here is a screenshot of what I've been working with:


            imgur: the simple image sharer


            I couldn't post the image normally, sorry I had to use imgur.

            • 3. Re: ZFS mirrored pool frusturation



              The Solaris installer automatically sets up the disks for you. There's no way for you to point the live CD installer to a specific disk or an existing pool. It will not provide a prompt like: root pool already exists, do you want to use it?


              To me, the word "install" means freshly install the OS on a brand new system with new disks or wipe out the existing installation and re-install the OS.


              The AI installer is more flexible about selecting root pool disks and mirroring them.


              Based on the screen shot that you provided, you already have a running OS but you don't have a mirrored root pool.


              You are trying to detach a disk when its the only disk in the pool, which isn't allowed. Maybe you want to attach the second disk by using zpool attach to create a mirrored root pool.


              What are you trying to do? Install the OS or mirror an existing root pool? Another option is to upgrade rather than re-install.


              Thanks, Cindy

              • 4. Re: ZFS mirrored pool frusturation

                Thanks again for your reply!  I really appreciate your help.


                I've been using the solaris 11.1 x86 text install media, is that the live cd you're referring to?  Should I use different install media for my text-only installs?

                I had become accustomed to install media asking me how I want the storage configured from windows and linux, but it seems that solaris just asks for a drive and throws itself at it.


                I guess at this point I have no choice but to try to attach the secondary drive to the existing pool.


                To use your verbiage, I am trying to mirror an existing root pool. 


                More screenshots to come...




                my attempt to add a drive to the existing root pool resulted in an error that seems to be telling me I can't add devices to the pool


                imgur: the simple image sharer

                • 5. Re: ZFS mirrored pool frusturation

                  Hey Steve,


                  The text installer and the live CD select available devices and there's no way to customize the storage configuration. If you are learning about Solaris and ZFS, then I think the text installer is a perfectly fine installation choice. The AI installer allow storage customization and Solaris enterprise customers use this installer to install multiple systems but it takes more configuration up front, like setting up an install server.


                  From your most recent screen shots, a couple of things are going on:


                  1. Looks like you have another rpool on c7t1d0 and that is causing the first error that can be overcome with the -f option.


                  2. You are attempting to add a disk and a rpool can only be one disk or a mirrored pool so you need to use zpool attach instead of zpool add, like this:


                  # zpool attach -f rpool c7t0d0 c7t1d0


                  Thanks, Cindy

                  • 6. Re: ZFS mirrored pool frusturation

                    I see!


                    I tried the command from #2 and that seems to be working!  Though I'm confused...in the command you have:


                    zpool attach -f rpool c7t0d0 c7t1d0


                    I see the command part "zpool attach -f" and the operands "rpool c7t0d0 c7t1d0"


                    but how does it know to mirror them, and how does it know what to mirror onto what?

                    I'm worried if  I have a blank drive in this configuration, it might copy the blank drive onto the OS drive.


                    Thoughts?   Thanks again

                    • 7. Re: ZFS mirrored pool frusturation

                      ZFS knows to create the mirror because you are specifying an attach operation to the existing disk in the storage pool.

                      In your case, you are attaching c7t1d0 to c7t0d0 to create the mirror.


                      ZFS will not let you attach to a blank disk. If I have an rpool that looks like this:


                      # zpool status rpool

                        pool: rpool

                      state: ONLINE

                        scan: resilvered 12.2G in 0h4m with 0 errors on Wed Jun 25 21:54:54 2014




                              NAME      STATE     READ WRITE CKSUM

                              rpool     ONLINE       0     0     0

                                c1t0d0  ONLINE       0     0     0

                      And I attempt the attach operation in the incorrect order, ZFS will tell me:

                      # zpool attach rpool c1t2d0 c1t0d0

                      vdev verification failed: use -f to override the following errors:

                      /dev/dsk/c1t0d0s1 is part of active ZFS pool rpool. Please see zpool(1M).

                      Unable to build pool from specified devices: device already in use

                      But this works:

                      # zpool attach rpool c1t0d0 c1t2d0

                      Make sure to wait until resilver is done before rebooting.


                      Thanks, Cindy