Beruflich Dokumente
Kultur Dokumente
In this Document
Goal
Solution
Procedure to increase size of a zpool based on EFI label in a guest domain running Solaris 11
Procedure to increase size of a zpool based on SMI label in a guest domain running Solaris 11
Procedure to increase size of a UFS filesystem based on SMI label in a guest domain running
Solaris 11
Procedure to expand a SMI disk label using the new Solaris 11 format subcommand 'expand'
Procedure to expand a vdisk in a Kernel Zone when Global Zone is a LDom Guest
References
APPLIES TO:
GOAL
SOLUTION
LDom supports a number of possible other devices to be exported by the virtual disk server as a
virtual disk to the guest domain.
You can export a physical disk, disk slice, volumes, or file as a block device.
The following procedures are based on a setup of ZVOLs for underlying device on primary
domain.
The basic steps would work for other kind of devices as well.
Procedure to increase size of a zpool based on EFI label in a guest domain running Solaris 11
Assumptions:
- Guest domain is running Solaris 11
- underlying device for the vdisk on primary is a zvol
- vdisk in guest is EFI-labeled
- filesystem on vdisk in guest domain is ZFS
Before you start with the procedure to increase the size, ensure you have a recent full backup of the
data on the volume you are trying to expand
Even though the data on the guest domain suppose to be fully available after finishing the given
procedures, we recommend to have
a full backup to be on the safe side.
On primary domain:
get current volsize and increase volsize on primary domain for the underlying ZVOL
On Guest LDom:
Procedure using autoexpand flag :
// set autoexpand flag to 'on' for the specific zpool and verify increased size for
this zpool
guest-ldom-g003# zpool set autoexpand=on rpool
// set autoexpand flag to the same value as set before this procedure. autoexpand
value is set to 'off' by default
guest-ldom-g003# zpool get autoexpand rpool
NAME PROPERTY VALUE SOURCE
rpool autoexpand on local
Guest# format -e
AVAILABLE DISK SELECTIONS:
-- lines omitted --
3. c2d3 <Unknown-Unknown-0001-30.00GB>
/virtual-devices@100/channel-devices@200/disk@3
Before you start with the procedure to increase the size, ensure you have a recent full backup of the
data on the volume you are trying to expand.
Even though the data on the guest domain suppose to be fully available after finishing the given
procedures, we recommend to have a full backup to be on the safe side.
Assumptions:
- Guest domain is running Solaris 11
- underlying device for the vdisk on primary is a zvol
- vdisk in guest is SMI-labeled
- filesystem on vdisk in guest domain is ZFS
On primary domain:
VDS
NAME VOLUME OPTIONS MPGROUP DEVICE
primary-vds0 g003-
rpool /dev/zvol/dsk/g003-pool/rpool.img
--- lines omitted --
------------------------------------------------------------------------------
NAME
g003
DISK
NAME VOLUME TOUT
ID DEVICE SERVER MPGROUP
--- lines omitted --
g003-rpool g003-rpool@primary-vds0 3 disk@3 primary
# prtvtoc /dev/rdsk/c2d3s0
* First Sector Last
* Partition Tag Flags Sector Count Sector Mount Directory
0 2 00 0 209534976 209534975
2 5 01 0 209534976 209534975
// Use new format(1M) subcommand 'expand' to enlarge the partition label on c2d3s0
// Please see info below "procedure to expand a disk label using the new Solaris 11
'expand' feature in Solaris 11"
# df -kl /rpool
Filesystem 1024-blocks Used Available Capacity Mounted on
rpool 102703104 31 102703017 1% /rpool
# df -kl /rpool
Filesystem 1024-blocks Used Available Capacity Mounted on
rpool 143990784 31 143990696 1% /rpool
Note: Important fixes for this procedure are available in Oracle Solaris 11.2.8.4.0 (or greater) / Oracle
Solaris 10 150400-23 (SPARC) / 150401-23 (x86)
Procedure to increase size of a UFS filesystem based on SMI label in a guest domain running Solaris 11
Before you start with the procedure to increase the size, ensure you have a recent full backup of the
data on the volume you are trying to expand.
Even though the data on the guest domain suppose to be fully available after finishing the given
procedures, we recommend to have a full backup to be on the safe side.
Assumptions:
- Guest domain is running Solaris 11
- underlying device for the vdisk on primary is a zvol
- vdisk in guest is SMI-labeled
- filesystem on vdisk in guest domain is UFS
On primary domain:
VDS
NAME VOLUME OPTIONS MPGROUP DEVICE
primary-vds0
g003-
dp /dev/zvol/dsk/g003-
pool/dpool.img
--- lines omitted --
------------------------------------------------------------------------------
NAME
g003
DISK
NAME VOLUME TOUT
ID DEVICE SERVER MPGROUP
--- lines omitted --
g003-dp g003-dp@primary-vds0 2 disk@2 primary
On Guest LDom:
Unmount /dev/dsk/c2d2s0
# umount /dev/dsk/c2d2s0
// Expand the size of the slice 0 to full size ( in this case )
// Use new format(1M) subcommand 'expand' to enlarge the partition label on c2d2s0
// Please see info below "procedure to expand a disk label using the new Solaris 11
'expand' feature in Solaris 11"
Procedure to expand a SMI disk label using the new Solaris 11 format subcommand 'expand'
(the 'expand' appears in partition menu only in case the underlying vdisk size in greater than the
currently label'ed size)
# format -e /dev/rdsk/c2d3s0
format> partition
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
expand - expand label to use the maximum allowed space
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> expand
Expansion of label cannot be undone; continue (y/n) ? y
The expanded capacity was added to the disk label and "s2".
Disk label was written to disk.
partition> print
Current partition table (original):
Total disk cylinders available: 3980 + 2 (reserved
cylinders) << *new* "Total disk cylinders available"
partition> 0
Part Tag Flag Cylinders Size Blocks
0 root wm 0 - 2841 99.91GB (2842/0/0) 209534976
partition> print
Current partition table (unnamed):
Total disk cylinders available: 3980 + 2 (reserved cylinders)
partition> label
[0] SMI Label
[1] EFI Label
Specify Label type[0]: 0
Ready to label disk, continue? y
partition> q
If the label is EFI we have to pay attention to the last Sector of partition 0: 629129182, and
first sector of partition 8: 671072223, then you have to choose with format the partition you
want to assign these new sectors and increase that partition and label the disks
partition> p
Volume: test1
Current partition table (original):
Total disk sectors available: 671072189 + 16384 (reserved sectors)
Assumptions:
- Guest domain is running Solaris 10
- underlying device for the root vdisk in guest is of size 20G and SMI-labeled
- a second vdisk with the expected size (e.g. 40G) can be exported to the Solaris 10 Guest
domain for live upgrade
1) create a new zfs zvol with size of 40G (or any desired new size)
# zfs create -V 40g ldoms/ldg3-root2.img
4) label the new vdisk in Guest to have all space to slice 0 and create a new BE
# zfs create rpool2 c0d1s0
# lucreate -c BE1 -n BE2 -p rpool2
# luactivate BE2
# init 6
5) confirm that the newly booted ABE has the desired new size
# lustatus
Boot Environment Is Active Active Can Copy
Name Complete Now On Reboot Delete Status
-------------------------- -------- ------ --------- ------ ----------
BE1 yes no no yes -
BE2 yes yes yes no -
# zpool list
NAME SIZE ALLOC FREE CAP HEALTH ALTROOT
rpool2 39.8G 8.44G 31.3G 21% ONLINE -
// new BE2
# df -kl /
Filesystem kbytes used avail capacity Mounted on
rpool2/ROOT/BE2 41029632 4646133 32051953 13% /
// former BE1
# lumount BE1
# df -kl /.alt.BE1/
Filesystem kbytes used avail capacity Mounted on
/dev/dsk/c0d0s0 18479546 4439508 13855243 25% /.alt.BE1
# luumount BE1
Procedure to expand a vdisk in a Kernel Zone when Global Zone is a LDom Guest
In the following example, the vdisk for the Kernel Zone is based on a ZVOL with 80GB initial
size and got expanded to 100GB
The new size has been recognized in Guest LDom immediately after resizing of the underlying
backing store on primary
*No* further actions required on Guest LDom
Check the status in Kernel zone. Please note that the resize of the underlying backing store does
not get recognized without reboot of the kernel zone.
After reboot of the Kernel zone, the new size of the underlying backing store gets recognized in
VOLNAME by format(1M), but the label still remained in former size of 80GB
The label of the vdisk needs to be expanded and the zpool must be expanded as well using
"zpool online -e"
root@Kernel-Zone:~# init 6
// after reboot
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
repair - repair a defective sector
show - translate a disk address
label - write label to the disk
analyze - surface analysis
defect - defect list management
backup - search for backup labels
verify - read and display labels
inquiry - show disk ID
volname - set 8-character volume name
!<cmd> - execute <cmd>, then return
quit
format> partition
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
expand - expand label to use the maximum allowed space
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> expand
The expanded capacity is added to the unallocated space.
partition> print
Current partition table (original):
Total disk sectors available: 209698749 + 16384 (reserved sectors)
partition> 0
Part Tag Flag First Sector Size Last Sector
0 usr wm 256 79.99GB 167755741
partition> print
Current partition table (unnamed):
Total disk sectors available: 209698749 + 16384 (reserved sectors)
partition> label
Ready to label disk, continue? y
partition> q
format> q
// new size has been recognized now in format as well as in zpool 'data'
Please note, the new subcommand 'expand' is available in Solaris 11 only and not referenced in
format(1M) man page
Note: Important fixes for this procedure are available in Oracle Solaris 11.2.8.4.0 (or greater) / Oracle
Solaris 10 150400-23 (SPARC)/ 150401-23 (x86)
REFERENCES
NOTE:1538587.1 - Failure to Add Vdisk to Guest Domain: 'LDom {ldomname} did not respond to request
to configure VIO device'
BUG:15479057 - SUNBT6699271-SOLARIS_11 DYNAMIC VIRTUAL DISK SIZE MANAGEMENT
NOTE:1676533.1 - ZFS Pools in Guest LDOMs may become UNAVAIL if format(1M) is used in the
Control/Primary/Service Domains
NOTE:1367098.1 - Oracle VM Server for SPARC (LDoms) Document Index
NOTE:1592785.1 - Vdc Driver - Configuring Vdisk Physical Block Size in vdc.conf on a Guest Ldom
NOTE:1458631.1 - How to add/remove a vdisk to/from a guest LDom dynamically
NOTE:1382180.1 - Solaris Does Not Automatically Handle an Increase in LUN Size
NOTE:1912796.1 - Zpool Online -e Does Not Increase The Pool Size
NOTE:1611403.1 - How to Add the Additional Storage Space Created from Dynamic LUN Expansion to
the Solaris Operating System