How to Increase rpool in OmiOS VMware Guest Without a Mirror

If you have ever created an OmniOS VM guest and made the root disk rpool too small, there are 2  pretty simple methods to increase the size of the disk. I found this method to be simpler and more straight forward.  The mirror method is described in an earlier post. The following will outline those steps.  Sections in blue are what you would type:

  • Edit the settings in vSphere for the VM

  1. Increase the VM disk to the desired size, this time make it twice as big as you think you might need
  2. Reboot VM.

incdisk

 

  • On the VM do the following:

  1. Format disk using format command
  2. Reboot VM
  3. Resize rpool
  4. Confirm your work

 Current System State

root@csu-s:~# df -h
Filesystem                      Size  Used Avail Use% Mounted on
rpool/ROOT/omnios-1             6.4G  2.6G  3.9G  40% /
swap                            1.2G  312K  1.2G   1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1  6.4G  2.6G  3.9G  40% /lib/libc.so.1
swap                            1.2G     0  1.2G   0% /tmp
swap                            1.2G   48K  1.2G   1% /var/run
rpool/export                    3.9G   32K  3.9G   1% /export
rpool/export/home               3.9G   31K  3.9G   1% /export/home
rpool                           3.9G   38K  3.9G   1% /rpool
root@csu-s:~#
root@csu-s:~# zpool list
NAME    SIZE  ALLOC   FREE  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
rpool  9.94G  5.07G  4.87G         –    51%  1.00x  ONLINE  –
root@csu-s:~# zpool status
  pool: rpool
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using ‘zpool upgrade’. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: none requested
config:
 
        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c2t0d0s0  ONLINE       0     0     0
 
errors: No known data errors
root@csu-s:~# 

Format disk using format command

root@csu-s:~# format
Searching for disks…done
 
 
AVAILABLE DISK SELECTIONS:
       0. c2t0d0 <VMware-Virtualdisk-1.0 cyl 1302 alt 2 hd 255 sec 63>
          /pci@0,0/pci15ad,1976@10/sd@0,0
Specify disk (enter its number): 0
selecting c2t0d0
[disk formatted]
/dev/dsk/c2t0d0s0 is part of active ZFS pool rpool. Please see zpool(1M).
 
 
FORMAT MENU:
        disk       – select a disk
        type       – select (define) a disk type
        partition  – select (define) a partition table
        current    – describe the current disk
        format     – format and analyze the disk
        fdisk      – run the fdisk program
        repair     – repair a defective sector
        label      – write label to the disk
        analyze    – surface analysis
        defect     – defect list management
        backup     – search for backup labels
        verify     – read and display labels
        save       – save new disk/partition definitions
        inquiry    – show vendor, product and revision
        volname    – set 8-character volume name
        !<cmd>     – execute <cmd>, then return
        quit
 
format> fdisk
             Total disk size is 2610 cylinders
             Cylinder size is 16065 (512 byte) blocks
 
                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1       Active    Solaris2          1  1304    1304     50
 
 
 
 
SELECT ONE OF THE FOLLOWING:
   1. Create a partition
   2. Specify the active partition
   3. Delete a partition
   4. Change between Solaris and Solaris2 Partition IDs
   5. Edit/View extended partitions
   6. Exit (update disk configuration and exit)
   7. Cancel (exit without updating disk configuration)
Enter Selection: 3
 
Specify the partition number to delete (or enter 0 to exit):1
Are you sure you want to delete partition 1? This will make all files and 
programs in this partition inaccessible (type “y” or “n”).
 
y
 
 
             Total disk size is 2610 cylinders
             Cylinder size is 16065 (512 byte) blocks
 
                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
 
 
 
 
WARNING: no partitions are defined!
SELECT ONE OF THE FOLLOWING:
   1. Create a partition
   2. Specify the active partition
   3. Delete a partition
   4. Change between Solaris and Solaris2 Partition IDs
   5. Edit/View extended partitions
   6. Exit (update disk configuration and exit)
   7. Cancel (exit without updating disk configuration)
Enter Selection: 1
 
Partition 1 has been deleted. This was the active partition.
 
Select the partition type to create:
   1=SOLARIS2  2=UNIX        3=PCIXOS     4=Other
   5=DOS12     6=DOS16       7=DOSEXT     8=DOSBIG
   9=DOS16LBA  A=x86 Boot    B=Diagnostic C=FAT32
   D=FAT32LBA  E=DOSEXTLBA   F=EFI        0=Exit? 1
   
   Specify the percentage of disk to use for this partition
(or type “c” to specify the size in cylinders). 100
 
 
             Total disk size is 2610 cylinders
             Cylinder size is 16065 (512 byte) blocks
 
                                               Cylinders
      Partition   Status    Type          Start   End   Length    %
      =========   ======    ============  =====   ===   ======   ===
          1       Active    Solaris2          1  2609    2609    100
 
 
 
 
SELECT ONE OF THE FOLLOWING:
   1. Create a partition
   2. Specify the active partition
   3. Delete a partition
   4. Change between Solaris and Solaris2 Partition IDs
   5. Edit/View extended partitions
   6. Exit (update disk configuration and exit)
   7. Cancel (exit without updating disk configuration)
Enter Selection: 6
 
 
format> p
 
 
PARTITION MENU:
        0      – change `0′ partition
        1      – change `1′ partition
        2      – change `2′ partition
        3      – change `3′ partition
        4      – change `4′ partition
        5      – change `5′ partition
        6      – change `6′ partition
        7      – change `7′ partition
        select – select a predefined table
        modify – modify a predefined partition table
        name   – name the current table
        print  – display the current table
        label  – write partition map and label to the disk
        !<cmd> – execute <cmd>, then return
        quit
 
partition> 0
Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       0               0         (0/0/0)           0
 
Enter partition id tag[unassigned]: 
Enter partition permission flags[wm]: 
Enter new starting cyl[0]: 1
Enter partition size[0b, 0c, 1e, 0.00mb, 0.00gb]: 2606c
partition> 
partition> l
Ready to label disk, continue? y
 
partition> 
partition> p
Current partition table (unnamed):
Total disk cylinders available: 2607 + 2 (reserved cylinders)
 
Part      Tag    Flag     Cylinders        Size            Blocks
  0 unassigned    wm       1 – 2606       19.96GB    (2606/0/0) 41865390
  1 unassigned    wm       0               0         (0/0/0)           0
  2     backup    wu       0 – 2606       19.97GB    (2607/0/0) 41881455
  3 unassigned    wm       0               0         (0/0/0)           0
  4 unassigned    wm       0               0         (0/0/0)           0
  5 unassigned    wm       0               0         (0/0/0)           0
  6 unassigned    wm       0               0         (0/0/0)           0
  7 unassigned    wm       0               0         (0/0/0)           0
  8       boot    wu       0 –    0        7.84MB    (1/0/0)       16065
  9 unassigned    wm       0               0         (0/0/0)           0
 
partition> q
 
 
FORMAT MENU:
        disk       – select a disk
        type       – select (define) a disk type
        partition  – select (define) a partition table
        current    – describe the current disk
        format     – format and analyze the disk
        fdisk      – run the fdisk program
        repair     – repair a defective sector
        label      – write label to the disk
        analyze    – surface analysis
        defect     – defect list management
        backup     – search for backup labels
        verify     – read and display labels
        save       – save new disk/partition definitions
        inquiry    – show vendor, product and revision
        volname    – set 8-character volume name
        !<cmd>     – execute <cmd>, then return
        quit
format> q

Reboot VM

root@csu-s:~# reboot

Resize Rpool

 
root@csu-s:~# zpool scrub rpool
 
root@csu-s:~# zpool status
  pool: rpool
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using ‘zpool upgrade’. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: scrub repaired 0 in 0h1m with 0 errors on Fri Dec 20 14:15:52 2013
config:
        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          c2t1d0s0  ONLINE       0     0     0
errors: No known data errors
root@csu-s:~#
root@csu-s:~# zpool set autoexpand=on rpool
root@csu-s:~#

Confirm your work

 
 
 
root@csu-s:~# df -h
Filesystem                      Size  Used Avail Use% Mounted on
rpool/ROOT/omnios-1              17G  5.0G   12G  31% /
swap                            1.5G  308K  1.5G   1% /etc/svc/volatile
/usr/lib/libc/libc_hwcap1.so.1   17G  5.0G   12G  31% /lib/libc.so.1
swap                            1.5G     0  1.5G   0% /tmp
swap                            1.5G   60K  1.5G   1% /var/run
rpool/export                     12G   32K   12G   1% /export
rpool/export/home                12G   31K   12G   1% /export/home
rpool                            12G   38K   12G   1% /rpool
root@csu-s:~# zpool list
NAME    SIZE  ALLOC   FREE  EXPANDSZ    CAP  DEDUP  HEALTH  ALTROOT
rpool  19.9G  7.44G  12.5G         –    37%  1.00x  ONLINE  –
 

You Are Done

Permanent link to this article: https://daherlabs.mywire.org/wordpress/?p=102

2 comments

    • MannyPaquio99 on January 26, 2014 at 8:49 pm
    • Reply

    I noticed that it’s hard to find your site in google, i found it on 24th spot, you should build some quality backlinks to rank it in google and increase traffic. I had the same problem with my website, your should search in google for – k2 seo services – it helped me a lot

  1. My brother recommended I would possibly like this website.
    He was once entirely right. This post actually made my day.
    You cann’t imagine just how so much time I had spent for this info!
    Thank you!

Leave a Reply to MannyPaquio99 Cancel reply

Your email address will not be published.