Description
ZFS is a type of file system presenting a pooled storage model developed by SUN (Oracle). File systems can directly draw from a common storage pool (zpool).
Traditionally, Solaris based LUNs which are larger than 1TB in size, are configured with an Extensible Firmware Interface (EFI) labels (instead of Sun Microsystems, Inc "SMI" labels).
NOTE: ZFS configured devices will default with an EFI disk label regardless of the physical LUN size.
Veritas Volume Manager (VxVM) in conjunction with Veritas DMP can be used to manage ZFS pools and any ZFS file system(s) that operate on those pools.
If enabled, DMP can be used as the multi-pathing driver for the management of ZFS pools.
Veritas requires the DMP tunable "dmp_native_support" to be enabled for Veritas DMP to manage the multi-pathing operations for the ZFS zpool:
# vxdmpadm gettune dmp_native_support
Tunable Current Value Default Value
------------------------------ ------------- -------------
dmp_native_support on off
DeviceDir |
Specifies the directories or block device files that the zpool import command searches for devices or files. Each directory or block device file is passed to the zpool import command with the -d option. The directory or block device file path must exist and be absolute. For more information, refer to the zpool manual pages. To reduce the time taken for zpool imports, provide the block device file path or create links to the devices constituting the zpool in a directory and provide that directory path in the DeviceDir attribute. Type and dimension: string-vector Default: n/a Example 1: "/dev/vx/dmp" Example 2: "/dev/vx/dmp/disk_1s2" |
Multiple Veritas DMPNODE names can be specified with the Veritas Cluster Server (VCS) Zpool Agent using the DeviceDir attribute for the Zpool resource.
Example (/etc/VRTSvcs/conf/config/main.cf)
group ZPOOL_SG (
SystemList = { node1 = 1, node2 = 0 }
AutoStartList = { node2 }
)
Zpool zroot-pool (
Critical = 0
DeviceDir = { "/dev/vx/dmp/emc0_0e91s0",
"/dev/vx/dmp/emc0_0e92s0",
"/dev/vx/dmp/emc0_0e93s0",
"/dev/vx/dmp/emc0_0e94s0",
"/dev/vx/dmp/emc0_0e9as0",
"/dev/vx/dmp/emc0_0e9bs0",
"/dev/vx/dmp/emc0_0e9cs0",
"/dev/vx/dmp/emc0_0e9ds0",
"/dev/vx/dmp/emc0_0e9es0",
"/dev/vx/dmp/emc0_0e9fs0" }
PoolName = Zone-zroot-pool
)
The above Zpool resource example will enable VCS to manage the import and export related operations for the ZFS zpool "Zone-zroot-pool".
Each Veritas DMPNODE is contained within double-quotes " ", along with the full /dev/vx/dmp path. In addition slice 0 is specified for each DMPNODE name associated with the ZFS zpool.
The import time for the DMP managed ZFS devices can be dramatically improved by the user specifying the /dev/vx/dmp/<da-name><slice-number> path details when importing the ZFS zpool,
This also ensure Veritas can provide multi-pathing support when using Veritas DMP.
Once the ZFS zpool resource has been onlined, the zpool imported state can be shown using the "zpool list" command:
# zpool list
NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT
-
swap-pool 24.9G 20G 4.87G 80% 1.00x ONLINE -
Zone-zroot-pool 249G 76.4G 172G 30% 1.00x ONLINE /
rpool 99.5G 79.9G 19.6G 80% 1.00x ONLINE
The list of dmpnodes for an exported ZFS zpool can be shown by running the command "zpool import"
# zpool import
<snippet>
pool: Zone-zroot-pool
id: 10433321583189607817
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: The pool can be imported using its name or numeric identifier, though
some features will not be available without an explicit 'zpool upgrade'.
scan: none requested
config:
NAME STATE
root ONLINE
emc0_0e91s0 ONLINE
emc0_0e92s0 ONLINE
emc0_0e93s0 ONLINE
emc0_0e94s0 ONLINE
emc0_0e9as0 ONLINE
emc0_0e9bs0 ONLINE
emc0_0e9cs0 ONLINE
emc0_0e9ds0 ONLINE
emc0_0e9es0 ONLINE
emc0_0e9fs0 ONLINE
<snippet>
The ZFS zpool can be imported using multiple DMPNODEs from the command line as follows:# zpool import -d /dev/vx/dmp/emc0_0e91s0 -d /dev/vx/dmp/emc0_0e92s0 -d /dev/vx/dmp/emc0_0e93s0 -d /dev/vx/dmp/emc0_0e94s0 -d /dev/vx/dmp/emc0_0e9as0 -d /dev/vx/dmp/emc0_0e9bs0 -d /dev/vx/dmp/emc0_0e9cs0 -d /dev/vx/dmp/emc0_0e9ds0 -d /dev/vx/dmp/emc0_0e9es0 -d /dev/vx/dmp/emc0_0e9fs0 Zone-zroot-pool
Veritas recommends disabling the auto-import behaviour for ZFS zpools. This can be controlled by disabling the DMP tunable "dmp_import_exported_zpools".
# vxdmpadm gettune dmp_import_exported_zpools
Tunable Current Value Default Value
------------------------------ ------------- -------------
dmp_import_exported_zpools off off
Once the ZFS zpool have been imported, the disk related details can be shown as below:
# zpool status Zone-zroot-pool
pool: Zone-zroot-pool
id: 10433321583189607817
state: ONLINE
status: The pool is formatted using an older on-disk format. The pool can
still be used, but some features are unavailable.
action: Upgrade the pool using 'zpool upgrade'. Once this is done, the
pool will no longer be accessible on older software versions.
scan: none requested
config:
NAME STATE READ WRITE CKSUM
Zone-zroot-pool ONLINE 0 0 0
/dev/vx/dmp/emc0_0e91s0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e92s0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e93s0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e94s0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e9as0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e9bs0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e9cs0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e9ds0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e9es0 ONLINE 0 0 0
/dev/vx/dmp/emc0_0e9fs0 ONLINE 0 0 0
errors: No known data errors
The "zdb -C" command can be used to confirm DMP is handling the multi-pathing for the specific ZFS zpool:# zdb -C Zone-zroot-pool | egrep ' name:|path'
name: 'Zone-zroot-pool'
path: '/dev/vx/dmp/emc0_0e91s0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453931-a'
path: '/dev/vx/dmp/emc0_0e92s0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453932-a'
path: '/dev/vx/dmp/emc0_0e93s0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453933-a'
path: '/dev/vx/dmp/emc0_0e94s0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453934-a'
path: '/dev/vx/dmp/emc0_0e9as0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453941-a'
path: '/dev/vx/dmp/emc0_0e9bs0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453942-a'
path: '/dev/vx/dmp/emc0_0e9cs0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453943-a'
path: '/dev/vx/dmp/emc0_0e9ds0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453944-a'
path: '/dev/vx/dmp/emc0_0e9es0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453945-a'
path: '/dev/vx/dmp/emc0_0e9fs0'
phys_path: '/pseudo/vxdmp@0:n60000970000297801716533030453946-a'
NOTE: The path states "/dev/vx/dmp/..." and phys_path shows "/pseudo/vxdmp...".
To confirm if MPxIO is disabled, type:
# stmsboot -L
stmsboot: MPXIO disabled
MPxIO is not supported in Solaris LDOM (Oracle VM for SPARC) environments, I/O domains & LDOM guests
MPxIO is not supported when Veritas DMP_NATIVE_SUPPORT is enabled
The following "for" loop can be used to extract the "path" and "phys_path" details for a ZFS pool:
Sample Output:
# for pool in `zpool list -H -o name` ; do echo "$pool" ; zdb -C "$pool" | grep path ; done
rpool
path: '/dev/dsk/emc0_01das0'
phys_path: '/pseudo/vxdmp@0:n60000970000297802241533030344435-a'
See related articles for more information:
How to prevent Solaris ZFS zpool corruption by disabling DMP tunable dmp_import_exported_zpools
https://www.veritas.com/support/en_US/article.100047984
Veritas Cluster Server (VCS) Zpool agent includes the enhanced functionality to specify the /dev/vx/dmp/ path details with the DeviceDir attribute
https://www.veritas.com/support/en_US/article.100033999