Target system storage space is needed for the incoming application data. In this procedure, storage space is prepared on a target system that uses Oracle Solaris zones for virtualization. If the target system uses logical domain virtualization, instead see Configure the Target's Virtual Storage (Logical Domain Virtualization).
These are the key activities:
Provision a LUN (virtual disk)
Add a file system to the zone.
Add a zpool dataset
The following commands create two LUNs for an Oracle Solaris 11 zone called s11zone to support the incoming application data.
You can obtain the physical disk name (for example, /dev/rdsk/c0t6000B08414B30303130353531350167Bd0s6) from the format utility. See Determine the Data Storage Requirements.
Note that the file system is not available until the zone is rebooted. A reboot is performed later in this procedure.
root@Target# zonecfg -z s11zone zonecfg:s11zone>add device zonecfg:s11zone>set match=/dev/rdsk/c0t6000B08414B30303130353531350167Bd0s6 zonecfg:s11zone>set allow-partition=true zonecfg:s11zone>set allow-raw-io=true zonecfg:s11zone>end zonecfg:s11zone>add device zonecfg:s11zone>set match=/dev/rdsk/c0t6000B08414B30303130353531350167Dd0s6 zonecfg:s11zone>set allow-partition=true zonecfg:s11zone>set allow-raw-io=true zonecfg:s11zone>end zonecfg:s11zone>commit zonecfg:s11zone>exit
The following commands add a raw UFS file system ( /u01) to an Oracle Solaris 11 zone called s11zone.
Note that the file system is not available until the zone is rebooted. A reboot is performed after the zpool is added.
root@Target# zonecfg -z s11zone zonecfg:s11zone> add fs zonecfg:s11zone> set dir=/u01 zonecfg:s11zone> set special=/dev/md/db_set/dsk/d0 zonecfg:s11zone> set raw=/dev/md/db_set/rdsk/d0 zonecfg:s11zone> set type=ufs zonecfg:s11zone> end zonecfg:s11zone> commit zonecfg:s11zone> exit
root@Target# zonecfg -z s11zone zonecfg:s11zone> add dataset zonecfg:s11zone> set name = data zonecfg:s11zone> end zonecfg:s11zone> commit zonecfg:s11zone> exit
root@Target# zoneadm -z s11zone reboot
root@Target# zlogin z11zone 'find /dev/*dsk' /dev/dsk /dev/dsk/c0t6000B08414B30303130353531350167Bd0s6 /dev/dsk/c0t6000B08414B30303130353531350167Dd0s6 /dev/rdsk /dev/rdsk/c0t6000B08414B30303130353531350167Bd0s6 /dev/rdsk/c0t6000B08414B30303130353531350167Dd0s6
root@Target# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT rpool 1.09T 200G 912G 18% 1.00x ONLINE - data 1.09T 284G 828G 25% 1.00x ONLINE -
root@Target# df -k /data Filesystem 1024-blocks Used Available Capacity Mounted on data 154828800 26928890 127892854 18% /data