Importing a zpool into a ldom
Identify the disk to create the zpool on source server.
lrwxrwxrwx 1 root root 67 Aug 22 12:47 /dev/rdsk/c6t6072482462EDF0001432HH90000203Bd0s2 ->
../../devices/scsi_vhci/ssd@g60760e80164ef90000014ef90000203b:c,raw
Create the zpool and zfs
(MySource:/)# zpool create MyZpool /dev/rdsk/c6t6072482462EDF0001432HH90000203Bd0
(MySource:/)#
(MySource:/)# df -h /MyFilesystem
Filesystem size used avail capacity Mounted on
MyZpool/MyFilesystem
98G 62G 36G 63% /MyFilesystem
(MySource:/)#
(MySource:/)# zpool get all MyZpool
NAME PROPERTY VALUE SOURCE
MyZpool size 99.5G -
MyZpool capacity 61% -
MyZpool altroot - default
MyZpool health ONLINE -
MyZpool guid 917911360396256368 -
MyZpool version 32 default
MyZpool bootfs - default
MyZpool delegation on default
MyZpool autoreplace off default
MyZpool cachefile - default
MyZpool failmode wait default
MyZpool listsnapshots on default
MyZpool autoexpand off default
MyZpool free 38.0G -
MyZpool allocated 61.5G -
MyZpool readonly off -
(MySource:/)#
Export the zpool
(MySource:/)# zpool export MyZpool
(MySource:/)#
/// On the physical host of the ldom's map this disk and then map the disks to the virtual disk services
Physical host - MyTargetPhy
lrwxrwxrwx 1 root root 67 Aug 22 16:39 /dev/rdsk/c12t6072482462EDF0001432HH90000203Bd0s2 ->
../../devices/scsi_vhci/ssd@g60760e80164ef90000014ef90000203b:c,raw
(MyTargetPhy:/root)# zpool import
pool: MyZpool
id: 917911360396256368
state: UNAVAIL
status: The pool is formatted using an incompatible version.
action: The pool cannot be imported. Access the pool on a system running newer
software, or recreate the pool from backup.
see: http://www.sun.com/msg/ZFS-8000-A5
config:
MyZpool UNAVAIL newer version
c12t6072482462EDF0001432HH90000203Bd0 ONLINE
status: The pool is formatted using an incompatible version.
=> the zpool was created in a machine with a higher version and the target physical host has a lower version of OS that is unable to import it. However the ldom is in the same level as of the source and the zpool can be imported into the ldom
Source:
(MySource:/)# cat /etc/release
Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Assembled 17 January 2013
(MySource:/)#
Destination - Physical
(MyTargetPhy:/root)# cat /etc/release
Oracle Solaris 10 8/11 s10s_u10wos_17b SPARC
Copyright (c) 1983, 2011, Oracle and/or its affiliates. All rights reserved.
Assembled 23 August 2011
(MyTargetPhy:/root)#
Destination LDOM
(MyLdom:/root)# cat /etc/release
Oracle Solaris 10 1/13 s10s_u11wos_24a SPARC
Copyright (c) 1983, 2013, Oracle and/or its affiliates. All rights reserved.
Assembled 17 January 2013
(MyLdom:/root)#
Map the disk to the ldom using the virtual disk service
(MyTargetPhy:/root)# ldm add-vdsdev /dev/rdsk/c12t6072482462EDF0001432HH90000203Bd0s2 ZP-MyLdom-temp@primary-vds0
(MyTargetPhy:/root)#
(MyTargetPhy:/root)# ldm add-vdisk ZP-MyLdom-temp ZP-MyLdom-temp@primary-vds0 MyLdom
(MyTargetPhy:/root)#
(MyTargetPhy:/root)# ldm list -l primary | grep MyLdom
MyLdom-boot /dev/rdsk/c12t6072482462EDF0001432HH900004530d0s2
ZP-MyLdom-temp /dev/rdsk/c12t6072482462EDF0001432HH90000203Bd0s2
(MyTargetPhy:/root)#
Check if the zpool is visible in the ldom
(MyLdom:/root)# zpool import
pool: MyZpool
id: 917911360396256368
state: ONLINE
action: The pool can be imported using its name or numeric identifier.
config:
MyZpool ONLINE
c0d5 ONLINE
(MyLdom:/root)#
Import the zpool
(MyLdom:/root)# zpool import MyZpool
(MyLdom:/root)# df -h /MyFilesystem
Filesystem size used avail capacity Mounted on
MyZpool/MyFilesystem
98G 62G 36G 63% /MyFilesystem
(MyLdom:/root)#