Sun Microsystems, Inc.  Oracle System Handbook - ISO 7.0 May 2018 Internal/Partner Edition
   Home | Current Systems | Former STK Products | EOL Systems | Components | General Info | Search | Feedback

Asset ID: 1-79-1921605.1
Update Date:2017-08-17
Keywords:

Solution Type  Predictive Self-Healing Sure

Solution  1921605.1 :   SuperCluster- How to dynamically resize the file system inside a Solaris zone backed by an iSCSI lun.  


Related Items
  • Oracle SuperCluster M7 Hardware
  •  
  • Oracle SuperCluster T5-8 Hardware
  •  
  • SPARC SuperCluster T4-4
  •  
  • Oracle SuperCluster M6-32 Hardware
  •  
Related Categories
  • PLA-Support>Eng Systems>Exadata/ODA/SSC>SPARC SuperCluster>DB: SuperCluster_EST
  •  


The Oracle SuperCluster Solaris zones  obtain their disk for their file system via an iSCSI lun form the on board ZFS Storage Appliance (ZFSSA).

In this Document
Purpose
Scope
Details
 INSTRUCTIONS
 1. Identify The ZPOOL Providing Storage To The Zone
 2. Identify The iSCSI LUN Unique Identifier
 3. Increase the size of the LUN
 4.Make the ZPOOL Size Modification Effective In The Domain
 
 5. Set The Storage QUOTA And RESERVATION For The Zone
References


Applies to:

Oracle SuperCluster T5-8 Hardware - Version All Versions and later
SPARC SuperCluster T4-4 - Version All Versions and later
Oracle SuperCluster M6-32 Hardware - Version All Versions and later
Oracle SuperCluster M7 Hardware - Version All Versions and later
Oracle Solaris on SPARC (64-bit)
The ZFSSA is used to serve iscsi luns for the filesystem for the zones. Default sizes may be insufficient for some customers and they may need to resize them larger.

This document assumes you have reviewed the contents of the SuperCluster Supported Versions document for your hardware type as well as the SuperCluster Critical Issues document.

Oracle SuperCluster Supported Software Versions - All Hardware Types
SuperCluster Critical Issues

Purpose

This document explains how to increase the size of a ZFS pool - zpool - created  on a iSCSI LUN exported by a ZFS-SA. The instructions in this document do not allow to reduce the size of a zpool. Doing so can result in data loss.

Scope

The information in this document applies to Oracle SuperCluster.  The instructions apply to zpools created or imported in both Application and Database Domains. Such zpools are created to install Solaris Zones and the approach described in this document can be used to increase the storage space available to a zone.

Details

Increasing the size of a zpool created on a iSCSI LUN consists of the following steps:

  1. Identify the zpool providing storage to the zone
  2. Identify the iSCSI LUN used by the zpool
  3. Modify the iSCSI LUN size on the ZFS-SA
  4. Make the zpool size modification effective in the domain
  5. Set the storage quota and reservation for the zone

Note:  the LUN size and the amount of storage available to a zone can be increased while the zone is running.

INSTRUCTIONS

1. Identify The ZPOOL Providing Storage To The Zone

Create and edit a script named listZoneZpools.ksh:

#!/bin/ksh

zoneList='/usr/sbin/zoneadm list -c | /usr/bin/grep -v global'

for zone in $zoneList ; do

  zonePath='/usr/sbin/zonecfg -z $zone info zonepath'
  zonePath=${zonePath#*=}
  zonePath=${zonePath#*: }
  zfsZonePath='/usr/sbin/zfs list -H -o name -t filesystem $zonePath'

  zrpool=${zfsZonePath%%/*}

  echo $zone' installed on '$zrpool

done

Execute the script:

# ./listZoneZpools.ksh
...
pg1Zone1 installed on pg1Zone1_pool
sharedPool1 installed on sharedPool
sharedPool3 installed on sharedPool
sharedPool2 installed on sharedPool
...

 

Zone pg1Zone1 is installed on a dedicated zpool named pg1Zone1_pool, while zones sharedPool1, sharedPool2, sharedPool3 share a zpool named sharedPool.

2. Identify The iSCSI LUN Unique Identifier

# zpool status zpoolname
  pool: zpoolname
 state: ONLINE
  scan: resilvered 36.5K in 0h0m with 0 errors on Fri May  2 07:14:18 2014
config:

        NAME                                    STATE  READ WRITE CKSUM
        zpoolname                               ONLINE    0     0     0
          c0t600144F0DC3CB2E30000530237C20254d0 ONLINE    0     0     0

  ...where zpoolname can be pg1Zone1_pool or sharedPool.

Take note of  the unique identifier, starting by 'c0t' and ending by 'd0'.

Create and edit a script called findLUN.aksh
script
try {
  run('shares');
  projects=list();
  for (ii=1 ; ii<projects.length ; ii++) {
    run('select '+projects[ii]);
    try {
      luns=list();
      for (jj=0 ; jj<luns.length ; jj++) {
        run('select '+luns[jj]);
        lunguid=get('lunguid');
        run('done');
        printf('%s','\nProject: '+projects[ii]+'  LUN: ' +luns[jj]+'  DEVICE: c0t'+lunguid+'d0');
      }
    } catch(err) { run('done'); }
    run('done');
  }
  run ('done');
} catch(err) { printf('%s','\n  ERROR: '); dump(err); exit(1);}
Execute findLUN.aksh

# ssh -T root@zfs-sa-head1 < ./findLUN.aksh | grep c0t600144F0DC3CB2E30000530237C20254d0
Project: p_zone1  LUN: zone1_rpool  DEVICE: c0t600144F0DC3CB2E30000530237C20254d0

The iSCSI LUN is identified as being part of the project p_zone1, and having zone1_rpool as its name.  Memorize the project and LUN names and connect the ZFS-SA to increase the size of the LUN.

Similarly for sharedPool:

# ssh -T root@zfs-sa-head1 < ./findLU.aksh | grep c0t600144F0DC3CB2E3000056C4832E0009d0
Project: sharedPool  LUN: sharedPool  DEVICE: c0t600144F0DC3CB2E3000056C4832E0009d0

  

Note that an iSCSI LUN can be located on any of the two heads of the ZFS-SA. If the command above does not return any information, run it on the other head.

 

3. Increase the size of the LUN

As an example, the new size is set to 50G (never decrease the size): 

# ssh root@zfs-sa-head1
zfs-sa-head1:>shares
zfs-sa-head1:shares> select p_zone1
zfs-sa-head1:shares p_zone1> select zone1_rpool
zfs-sa-head1:shares p_zone1/zone1_rpool> set volsize=50G
zfs-sa-head1:shares p_zone1/zone1_rpool> commit
zfs-sa-head1:shares p_zone1/zone1_rpool> exit
Alternatively, you can use the ZFS-SA BUI - a.k.a. kiosk - to modify the size of the LUN. For example to set the size of the sharedPool to 10GB, connect as root to the ZFS-SA BUI @ http://zfs-sa-head1:215. Once connected select the shares tab and make sure LUNs is selected instead of Filesystems :

shares-luns


On the left-hand side, click on Project and search for the project identified in step 1. - here sharedPool:

projectlist

Click on the project: a list of LUNs is now displayed. Locate the LUN identified in step 2. If many LUNs are listed, make sure to locate the right one by double-checking its GUID.

shares-sharedpool

Once located, move the mouse over the LUN: the row background turns to light-blue and two icons appear on the right-hand side. Click on the pen to edit the LUN:

sharedpool-edit

Set Volume size to the adequate value and ensure Thin provisioned is not selected. When done click on APPLY.

4.Make the ZPOOL Size Modification Effective In The Domain

# zpool online -e zone1_rpool c0t600144F0DC3CB2E30000530237C20254d0
# zpool list zone1_pool
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
zpoolname 50.0G 160K 50.0G 0% 1.00x ONLINE -

5. Set The Storage QUOTA And RESERVATION For The Zone

This step is recommanded if many zones are installed on a shared zpool. It prevents a zone to consume all the zpool storage - leaving no space left for the other zones.

Set the quota and reservation attributes of the ZFS dataset dedicated to the zone. This step must be repeated for each zone. From the domain (a.k.a. global-zone):

# zonecfg -z sharedPool2 info zonepath
zonepath: /sharedPool/sharedPool2

# zfs set quota=5G sharedPool/sharedPool2
# zfs set reservation=5G sharedPool/sharedPool2

 The new limits are visible inside the zone:

# zlogin sharedPool2
[Connected to zone 'sharedPool2' pts/2]
Oracle Corporation SunOS 5.11 11.2 June 2015
root@sharedPool2:~# zfs list rpool
NAME USED AVAIL REFER MOUNTPOINT
rpool 772M 4.25G 35K /rpool

  
The sum of USED and AVAIL for the rpool dataset inside the zone is equal to the quota (and reservation) set in the global-zone for the zonepath.

References

<NOTE:1567979.1> - Oracle SuperCluster Supported Software Versions - All Hardware Types
<NOTE:1452277.1> - SuperCluster Critical Issues

Attachments
This solution has no attachment
  Copyright © 2018 Oracle, Inc.  All rights reserved.
 Feedback