Powered By Blogger
Showing posts with label Solaris 11. Show all posts
Showing posts with label Solaris 11. Show all posts

2014/02/03

P2V Migration From Solaris 10 Global Zone to Oracle Solaris 11 Local Zone (Solaris 10 Branded Zone)

The aim of this post is to describe a Physical to Virtual (P2V) migration of a Bare-Metal Solaris 10 (a Physical Node) on a Solaris 11 Global Zone (Solaris 10 Branded Zone on Oracle Solaris 11). The scenario describes below involves a Solaris 10 Physical node named oranode (hosts an Oracle Database 10G and another Oracle application) and a Solaris 11 Global Zone named sol11-gz (already hosting some other Local Zones). 
In order to make this migration easily understandable, It has been technically divided in in 03 parts, the first parts deals with Analysis of the Source System, the second is about System/Data Collection and the third is about Target Zone Configuration and Installation.

I. Analysis of the Source System


The Data Analysis phase aims to collect some initial analysis Data. Oracle has provided a very nice tool for that phase, namely zonep2vchk. zonep2vchk serves two functions. First, it can be used to report issues on the source which might prevent a successful p2v migration. Second, it can output a template zonecfg, which can be used to assist in configuring the non-global zone target (man page).
The /usr/sbin/zonep2vchk script is belonging to pkg:/system/zones on Solaris 11 and can be copied from an Oracle Solaris 11 system to an Oracle Solaris 10 system. It is not required to run this utility from a specific location on the system.
Below, we're copying this utility to our Solaris 10 (oranode) and then we're running it with the option -T S11 which specifies that the target node for our planned migration of this Solaris 10 System is running on Oracle Solaris 11.



Quite verbose! Indeed this initial analysis give us a lot of insights for the whole p2v procedure. For example, we can see that in this study case, we have much more than 01 ZFS Zpool (beside the initial rpool). These are File-system which host the Oracle Database 10G (mentioned above) Data Files.
Thus, we must decide how these  application Data's file-systems will be migrated. The strategy we're applying here is to migrate just the Operating System (excluding the Application Data File-System), and use SAN replication for the Application Data. Note that this decision is based on the source system architecture (we may for example decide to go for a zfs send/receive if these Data file-system are not located on an external storage…).

Once done with that, we complete this analysis phase by creating a template file for the Target Zone Creation (using the same zonep2vchk tool with the option -c). This is just a template , it is used to ease the creation of the target Zone and should be adjusted to suit with the requirement of the target environment.


II. System/Data Collection


This phase aims to collect Source System's Data (Solaris 10 System - oranode) and transferred them to the Target System (Solaris 11 Global Zone - s11-gz). As discussed during the analysis phase, I have decided to migrate System Data and Application Data in separate processes.
For the system, I’m making use of the classic flarcreate to generate system archive (due to the presence of Data File-System that i'd like to exclude, i'm using CPIO as method to archive the file). For the Application Data, they're being migrated using External Storage Cloning features (not described here!). 



The transfer of this archive to the target Global Zone can be done using any conventional method (scp/sftp/ftp, SAN Replication...). Once completed, we can move to the last part.

III. Target Zone Configuration and Installation


Now that we've the Data Collection phase completed, we’re going to create the target zone and start the restoration of the flararchive that was created. We’ll also add the Zpool Dataset which were migrated using the SAN replication features.
The zone will be created using the template that was generated by the zonep2vchk tool (we'll obviously customize it to fit the target environment). Before starting, we have to create the zonepath needed for the target zone and import the zpool that was migrated through the SAN replication.



Let’s now configure our new local zone by using the template generated by zonep2vchk tool during the first phase.



Having the configuration done, we can start the zone Installation



Finally, We are adding the ZFS dataset migrated through SAN Replication,



And the big moment! Boot the new zone...

2014/01/31

Oracle Solaris 11: EMC PowerPath / powermt display dev ; Device(s) not found.

This is just a small post about Oracle Solaris 11 and EMC PowerPath Configuration. If you've been trying to get EMC PowerPath configured on Solaris 11 and facing error(s) similar to the one below, then follow steps described below (can also follow the same for initial PowerPath Configuration on Oracle Solaris 11)




1. Make sure that Zoning/Lun Mapping from SAN/Storage is well configured.
For the zoning , run fcinfo remote-port -p <pwwn_connected_hba> (must list the PWWN and others details of the storage, otherwise must check that the zoning is well complete);
For the Storage Configuration, you can use fcinfo lu -v (list all fibre channel  logical  units, must have one or more "OS Device Name" listed here, otherwise must check that mapping is well done at the SAN Level). 




2. Check that Oracle Solaris mpxio is disabled.
That can easilly be achieved by running stmsboot with -L option.  If Solaris  I/O  multipathing  is not enabled, then no mappings are displayed. If It's enabled, then disable it by running "stmsboot -d". For example, below we can see the output with Solaris mpxio enabled (and the output printed when disabling -and the reboot required-).




3. Check that your storage's type is managed by EMC PowerPath
For that , we're using powermt with options display options. If our storage's type is listed as unmanaged (like the clariion below), then simply mark it as managed (using powermt manage as seen below) and you're done!





We should also pay attention to /kernel/drv/iscsi.conf. In fact, though Solaris  can distinguish between FC and iSCSI devices, some PowerPath versions don't make this distinction for manage and unmanage. So the mpxio-disable value must be set to yes in both the fp.conf (for fp.conf, it's also done automatically with stmsboot -d) and iscsi.conf files for PowerPath to manage EMC Clariion and VNX Storage Arrays.

2013/04/25

Migration : From Solaris 10 Sparse Local Zone to Solaris 11 Local Zone

Let's described the migration process of Solaris 10 Sparse Local Zone to Solaris 11 Local Zone in 09 easy steps. But before delving into the subject, it's important to remind the following. 
In Solaris 10, we had 02 types of zones/containers that we could create, the first (and the default type) is "Sparse root zone" and the second is "Whole root zone". 
The main difference between these 02 types was that with "sparse root zone", you shared part of the root filesystem with the global zone while with  "whole root zone", every Solaris packages are copied to the local zone private filesystem. In Solaris 11, this distinction goes away (more details about Comparison between Solaris 11 Zone and Solaris 10 Zone can be found here). What we address below is the migration of a sparse Solaris 10 zone from Solaris 10 Global Zone to Solaris 11 Global Zone.

1. Let’s Print the existing zone's configuration. We will need this information to recreate the zone on the destination system:




2. The next step is to stop this source local zone and bring it to a state where it can be archived.
The reason for stopping the zone is that we should not archive a running zone because the application or system data within the zone might be captured in an inconsistent state.Also,  the zone is a sparse root zone that has inherit-pkg-dir settings, For that reason we need to bring it in the state "ready" ( that'll enable the archiving of  inherited directories).



3. Now, we should copy the /var/sadm/system/admin/INST_RELEASE from the source global zone to the source local zone, otherwise we may face the  Bug 15751945 (with an error stating that The image release version must be 10 (got unknown), the zone is not usable on this system).




4. Let’s archived the local zone (zonepath: /zpool_slz/slz).  For that we’ll create a gzip compressed cpio archive named Source_local_zone.cpio.gz (The local zone will still be named Source_local_zone on the target system)




N.B: the –c option of cpio is to avoid the error similar to “UID or GID are too large to fit in the selected header format”



5. Transfer the archive to the target Oracle Solaris 11.1 system, using any file transfer mechanism to copy the file, we’ll use sftp here.




6. On the target systems (DEST_GLOBAL_ZONE), create the target zone. Below, we're using a configuration file that's sourced for the creation of the zone.
Note – The zone's brand must be solaris10 and the zone cannot use any inherit-pkg-dir settings, even if the original zone was configured as a sparse root zone.




7. Display the new local zone's configuration:




8. Install the zone from the archive that was created on the source system, with the archive transferred into the /zpool_slz directory on the destination system




N.B: Again, you might get an error here specifying that “The image release version must be 10 (got unknown)” if you haven’t copied the /var/sadm/system/admin/INST_RELEASE file in the source local zone as specified above.



9. Once the zone installation has completed successfully, the zone is ready to boot.




Migration Completed....

2012/11/05

Solaris 11 REPO - Configuration of Multiple Repositories Using Multiple Depot Server Instances


As part of the exercise to install some virtualized highly available infrastructures using Oracle Solaris Technologies (Solaris Cluster, Solaris Zones, Solaris LDOMs…), I started by configuring and installing a Solaris 11  local IPS repository server. In this post, we’ll address the topic of installing an http shared repository for Solaris 11.1, Solaris Cluster 4.1 and EMC PowerPath.

As prerequisite for this configuration we need a working Solaris 11 System (can be either an x86-based or a SPARC-based system) with enough space available to copy the repositories (15Gb for Oracle Solaris 11.1 release repository and about 500 Mb for Oracle Solaris Cluster 4.0 and EMC PowerPath)

1.        Oracle Solaris 11.1 IPS Repository

There’s 02 ways to obtain a copy of the Oracle Solaris 11.1 IPS package repository: the first is to download the repository images files from the Oracle Solaris 11 download site and the second is to retrieve the repository directly from the Internet (using pkgrecv). We’ll go for the first method.
We’ll first create a zfs dataset for the package repository and disable the atime of this dataset (to improve performance during the update of this repo).

Then, concatenate the iso files downloaded , validate the download using digest and mount it

Synchronize the content of the repo directory by using rsync (pay attention to the / at the end of repo) and unmount the lofi device (optionally delete the iso files)


To enable clients to search for packages in the local repository, we’ll use the following command ( catalogs packages in the repository and updates search indexes).


At this stage, the repository is in place and can be used locally. But, in order to enable clients to retrieve packages in this local repository, we’ll configure an HTTP interface (also possible by using NFS Share). We’re using pkg.depotd to serve the repository to clients. Pkg.depotd (svc:/application/pkg/server) is the depot server for the image packaging system. It provides network access to the data contained within a package repository. By default, pkg.depotd listens for connections on port 80. For this Solaris Repository, we’ll use port 8080.


First of all, let’s make sure the publisher prefix is set on the ha-cluster repository:


If not, then let’s do it


To enable clients to access the local repository via HTTP, let’s configure and enable the svc:/application/pkg/server Service Management Facility (SMF) service.


Check and Browse the repository at http://<reposerver_ip_address>:8080/.



Now we can configure our repository on client system by resetting the origin for the Solaris publisher.
We first check the actual solaris publisher which is configured for the client node (by default it’s the oracle public repository).


We can reset the origin of this Solaris Publisher by running



2.       Oracle Solaris Cluster 4.1

Let’s now configure a second instance for the pkg.depotd (svc:/application/pkg/server)which will serve Oracle Solaris Cluster 4.1 Packages. The iso is downloaded from  OTN.



Again, the repository creation commands do not build a search index by default. To enable clients to search for packages in the local repository, we’ll use the following command  (catalogs packages in the repository and updates search indexes).



As described above, the repository for Solaris 11.1 is already configured using an http interface (pkg.depotd daemon handling the web service) So we’re going to serve multiple repositories using multiple pkg.depotd daemons running on different ports on the same repository server.  As we used port 8080 for Solaris 11.1 Repository, we’ll use 8081 for Solaris Cluster 4.1 Repository
Let’s make sure that the publisher prefix is set on the ha-cluster repository:



Add a new instance of the pkg/server service:


Complete configuration of the new pkg/server instance:


Start the new service:


Check and Browse the repository at http://<reposerver_ip_address>:8081/.


Configure the Solaris Cluster Repository on The client


3.       EMC PowerPath

For EMC PowerPath, the Archive was downloaded from EMC PowerLink and uncompressed.
Below are the steps to configure its repository.


To enable clients to search for packages in the local repository



As described above, the repositories for Solaris 11.1 and Solaris Cluster 4.1 are already configured using an http interface (pkg.depotd daemon handling the web service) So we’re going to add a third instance of pkg.depotd.  As we’ used port 8080 for Solaris 11.1 Repository and 8081 for Solaris Cluster 4.1, we’ll use 8082 for EMC PowerPath. Let’s check the publisher prefix of this new repository.


Add a new instance of the pkg/server service:


Complete configuration of the new pkg/server instance:


Start the new service:


Check and Browse the repository at http://<reposerver_ip_address>:8082/.


Configure the EMC PowerPath Repository on The client


Install EMC PowerPath Package