Mirror rpool: Partition 0 not aligned on cylinder boundary

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

AlexSanchezSTHLM

New Member
Nov 5, 2013
3
0
0
I'm trying to mirror my Solaris 11 rpool but I get an error.

Using:
  • ESXi 5.5
  • Solaris 11.1
  • 2 x VM disks (as suggested on Gea's AIO pdf) on two different SSD-based datastores

I have tried with both Napp-it and manually as documented in the following article with no luck.
Oracle Solaris 11 Express: Mirroring Your ZFS Root Pool

When I try to run

Code:
root@solaris:~# prtvtoc /dev/rdsk/c8t0d0s0 | fmthard -s - /dev/rdsk/c8t2d0s0
I get:

Code:
Partition 0 not aligned on cylinder boundary: "       0     24    00        256    524032    524287"
Please note that I don't prepare/partition/format my VM disks prior to installing Solaris, I just add them in ESXi and then let the Solaris installation handle the partitioning and formatting for me using the whole disk.


Available disks. Disk A (0) is my Solaris 11 installation, Disk B (2) is the one I want to add as mirror:
Code:
AVAILABLE DISK SELECTIONS:
       0. c8t0d0 <VMware-Virtual disk-1.0-13.00GB>
          /pci@0,0/pci15ad,1976@10/sd@0,0
...
       2. c8t2d0 <VMware-Virtual disk-1.0 cyl 2171 alt 2 hd 224 sec 56>
          /pci@0,0/pci15ad,1976@10/sd@2,0
I find it strange that disk A doesn't show info about cyl, hd and sec like disk B do.

Disk A fdisk table info output:
Code:
* /dev/rdsk/c8t0d0p0 default fdisk table
* Dimensions:
*    512 bytes/sector
*     56 sectors/track
*    224 tracks/cylinder
*   2173 cylinders
*
* systid:
...
*  191: SUNIXOS2
*  238: EFI_PMBR
*  239: EFI_FS
*

* Id    Act  Bhead  Bsect  Bcyl    Ehead  Esect  Ecyl    Rsect      Numsect
  238   0    255    63     1023    255    63     1023    1          27262975  
  0     0    0      0      0       0      0      0       0          0         
  0     0    0      0      0       0      0      0       0          0         
  0     0    0      0      0       0      0      0       0          0
Disk A format partition info output:
Code:
Total disk sectors available: 27246525 + 16384 (reserved sectors)

Part      Tag    Flag     First Sector        Size        Last Sector
  0  BIOS_boot    wm               256     255.88MB         524287    
  1        usr    wm            524288      12.74GB         27241471    
  2 unassigned    wm                 0          0              0    
  3 unassigned    wm                 0          0              0    
  4 unassigned    wm                 0          0              0    
  5 unassigned    wm                 0          0              0    
  6 unassigned    wm                 0          0              0    
  8   reserved    wm          27241472       8.00MB         27257855
prtvtoc output for disk A:
Code:
* /dev/rdsk/c8t0d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
* 27262976 sectors
* 27262909 accessible sectors
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector 
*          34       222       255
*    27257856      5086  27262941
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       0     24    00        256    524032    524287
       1      4    00     524288  26717184  27241471
       8     11    00   27241472     16384  27257855
Is it maybe something wrong with the mirror disk?

prtvtoc output for disk B:
Code:
* /dev/rdsk/c8t2d0s0 partition map
*
* Dimensions:
*     512 bytes/sector
*      56 sectors/track
*     224 tracks/cylinder
*   12544 sectors/cylinder
*    2173 cylinders
*    2171 accessible cylinders
*
* Flags:
*   1: unmountable
*  10: read-only
*
* Unallocated space:
*       First     Sector    Last
*       Sector     Count    Sector 
*       12544  27220480  27233023
*
*                          First     Sector    Last
* Partition  Tag  Flags    Sector     Count    Sector  Mount Directory
       2      5    01          0  27233024  27233023
       8      1    01          0     12544     12543
thanks in advance :)
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
This HowTO and the napp-it menu mirror rpool is working on all Solarish systems beside Solaris 11.1
I have not done on Solaris 11.1 but I heard that a "zpool attach rpool cxxxx cxxxx" is enough.

Not sure about the Grub entries to boot from the mirror...
 

AlexSanchezSTHLM

New Member
Nov 5, 2013
3
0
0
I was waiting for your help Gea :)

I've been googling like crazy for two days trying to find the cause to the error.
Today, after a lot of reading and some trial and error, I found the proper way to do it on Solaris 11.1 and I finally got it working :cool:
I'd say the solution to mirror your rpool on Solaris 11.1 is much easier.

I have not done on Solaris 11.1 but I heard that a "zpool attach rpool cxxxx cxxxx" is enough.
Yes, simple as that really ;) I just added a new VM disk and run that command. No need to prepare with fdisk, format or other disk tools.

Found that info about rpool mirror on this page:
Managing Your ZFS Root Pool - Oracle Solaris 11.1 Administration: ZFS File Systems

Not sure about the Grub entries to boot from the mirror...
Yeah, the other thing you need to do is to install the Grub boot loader. In my tests I had to do this everytime I attached/replaced a mirror. But It was really one simple command. And I didn't have to go to BIOS to switch boot disk order. I did a couple of tests and I could boot from either disks without problems.

More info here:
x86: Advanced GRUB Administration and Troubleshooting - Booting and Shutting Down Oracle Solaris 11.1 Systems

I did my tests by hot removing VM disks (to fail) and hot plugging in (to add new disk) in ESXi.

Finding how easy it is too mirror your system disk and replacing failing disks made me like ZFS even more :)

Would be great if you could add support for Solaris 11.1 to Napp-it... any plans?
 

gea

Well-Known Member
Dec 31, 2010
3,141
1,182
113
DE
I was waiting for your help Gea :)
..

Would be great if you could add support for Solaris 11.1 to Napp-it... any plans?
Basically napp-it was a project for my own needs that I opened to others what means I currently use and support OmniOS (or OI for my older setups). I decided to support Solaris 11 as well. Now I have customers with Solaris 11 installations and I support Solaris 11 in core functionality.

There are quite large enterprises using napp-it on Solaris 11 so maybe I will fullfill your request in one of next releases. Its basically no more than a .. IF OS=Solaris 11 THEN .. ELSE do current ENDIF .. but this always needs testing and modifications on newer versions.

My Problem with Solaris 11: On every release they try to become more and more incompatible with former releases AND the Open Source Fork Illumos. While this may be ok for Oracle and the finances of Larry, it reduces my capacity to support Solaris completely especially with a free for all edition.

If you really want full Solaris 11 support for free, write to Oracle:
Hey Larry, do not block a free and common Solaris/ZFS - be the leader of a free OpenSource ZFS. Add or own additions upon, do not compete against.