HI everyone ..You probably are here because you maybe searching ho to make ISCSI or FC luns avilable through Solaris OS.
We then i wont be talking much but lets start working.
Initially please proceed if you have the following things:
1) A solaris machine with lots of Hard drive of course ;)
Thing we will be needing are as follows :
1) Internet connection
2) Solaris OS
3) Oracle account
..
The procedure are as follows :
First make sure you have the repo downloaded and setup your Local IPS repo. IF not you can visit my blog that explains ho to do that . Its title is creating a local IPS Repo in solaris.
Assuming you have create your repo lets move forward .
The first thing you want to do is intall comstar .
Comstar is a protocal that will be very important to create luns of disks.
Installing Comstar:
Now assuming that your stmf service is live lets start creating disks pool.
Create a ZPOOL
target# zpool create (desired pool name ) (disk names you want to include)
now that your pool is created lets create a volume that you want to share .
We then i wont be talking much but lets start working.
Initially please proceed if you have the following things:
1) A solaris machine with lots of Hard drive of course ;)
Thing we will be needing are as follows :
1) Internet connection
2) Solaris OS
3) Oracle account
..
The procedure are as follows :
First make sure you have the repo downloaded and setup your Local IPS repo. IF not you can visit my blog that explains ho to do that . Its title is creating a local IPS Repo in solaris.
Assuming you have create your repo lets move forward .
The first thing you want to do is intall comstar .
Comstar is a protocal that will be very important to create luns of disks.
Installing Comstar:
Now assuming that your stmf service is live lets start creating disks pool.
Create a ZPOOL
target# zpool create (desired pool name ) (disk names you want to include)
now that your pool is created lets create a volume that you want to share .
- Create a LUN for the ZFS volume.
You can find the device path for the ZFS volume in the /dev/zvol/rdsk/pool-name/ directory.
- Confirm that the LUN has been created.
- Add the LUN view.This command makes the LUN accessible to all systems.If you want to restrict the LUN view to specific systems, see How to Restrict LUN Access to Selected Systems.
- Verify the LUN configuration.
How to Create the iSCSI Target
This procedure assumes that you are logged in to the local system will contains the iSCSI target.
- Enable the iSCSI target service.
Confirm that the service is enabled.
- Create the iSCSI target.
- Display the iSCSI target information.
How to Configure an iSCSI Initiator
Part of the initiator configuration process is to identify the iSCSI target discovery method, which presents an initiator with a list of available targets. You can configure iSCSI targets for static, SendTargets, or iSNS dynamic discovery. Dynamic discovery using the SendTargets option is the optimum configuration for an iSCSI initiator that accesses a large number of targets, such over an iSCSI to Fibre Channel bridge. SendTargets dynamic discovery requires the IP address and port combination of the iSCSI target for the iSCSI initiator to perform the target discovery. The most common discovery method is SendTargets.
When configuring the target discovery method, you must provide the following information, depending on which method you choose:
- SendTargets – Target IP address
- iSNS – iSNS server address
- Static – Target IP address and target name
For more information about configuring target discovery methods, see Configuring Dynamic or Static Target Discovery.
- Enable the iSCSI initiator service.
- Verify the target's name and IP address while logged in to the server that is providing the target.
- Configure the target to be statically discovered.
- Review the static configuration information.
The iSCSI connection is not initiated until the discovery method is enabled. See the next step.
- Configure one of the following target discovery methods:
- If you have configured a dynamically discovered (SendTargets) target, configure the SendTargets discovery method.
- If you have configured a dynamically discovered (iSNS) target, configure the iSNS discovery method.
- Enable one of the following the target discovery methods:
- If you have configured a dynamically discovered (SendTargets) target, enable the SendTargets discovery method.
- If you have configured a dynamically discovered (iSNS) target, enable the iSNS discovery method.
- If you have configured static targets, enable the static target discovery method.
- Reconfigure the /dev namespace to recognize the iSCSI disk, if necessary.
Now you are ready with a remote ISCSI disk ..use the format command to verify the same.
Now to deal with FC disk please follow the below procedure:
Configuring Fibre Channel Devices With COMSTAR
You can set up and configure a COMSTAR target on a SPARC system or x86 system in a FC network environment and make it accessible to the storage network. Ensure the following prerequisite step has been completed:
Configuring Fibre Channel Ports For COMSTAR
The Fibre Channel (FC) port provider can use the same HBAs that are used for the FC initiators. A given FC port can be used as an initiator or as a target, but not as both. You can also configure a dual port or quad port FC HBA so that a subset of the HBA ports is in target mode and the rest of the ports are in initiator mode.
The procedures in this section are specific to QLogic HBAs. The driver to use with HBAs in initiator mode is qlc, which is a Qlogic driver. The qlc driver works only in initiator mode, and cannot be used for target mode. The COMSTAR driver for a target QLogic 4G HBA is qlt.
Because initiator mode and target mode use different drivers, the driver you attach to an HBA port defines its function as a target or initiator. You can specify a driver for all the ports by specifying the PCI device ID of the HBA. Or, you can configure the driver on a port-by-port basis. Both methods use the update_drv command and are described in this section. For more information, see update_drv(1M).
How to Display Existing FC Port Bindings
Before making changes to the HBA ports, first check the existing port bindings.
- Become an administrator.
- Display what is currently bound to the port drivers.In this example, the current binding is pciex1077,2432.
How to Set All FC Ports to a Specific Mode
This procedure changes all ports on all HBAs with a specific PCI device ID to target mode. The PCI device ID number binds a driver to a port, thereby setting all the HBA ports with that PCI device ID, for example, all QLogic 4G PCI express HBAs, to target mode.
- Become an administrator.
- Remove the current binding.In this example, the qlc driver is actively bound to pciex1077,2432. You must remove the existing binding for qlc before you can add that binding to a new driver. Single quotation marks are required in this syntax.This message does not indicate an error. The configuration files have been updated but the qlc driver remains bound to the port until the system is rebooted.
- Establish the new binding.In this example, qlt is updated. Single quotes are required in this syntax.This message does not indicate an error. The qlc driver remains bound to the port, until the system is rebooted. The qlt driver attaches when the system is rebooted.
- Reboot the system to attach the new driver. Then, recheck the bindings.
- Verify that the target mode framework has access to the HBA ports.
How to Set Selected FC Ports to Initiator or Target Mode
This procedure uses path-based bindings. It shows you how to use a specific device path to bind a port to a driver that is different from the driver to which it is currently bound.
- Become an administrator.
- Display a list of the HBA ports and their respective device paths.This example shows the device paths for a single HBA with two ports.
- Set the top port to target mode, and leave the bottom port in initiator mode.Remove the initial /devices portion of the path, and include everything up to /fp@0.... The path with the /devices portion removed is the path to which the system binds the qltdriver.Single quotation marks are required in this syntax.This message does not indicate an error. The qlc driver remains bound to the port until reboot. The qlt driver attaches during reboot.
- Reboot the system to attach the new driver. Then, recheck the bindings.You should see that the port changed from initiator mode (qlc) to target mode (qlt).
- Verify that the target mode framework has access to the HBA ports.
Making Logical Units Available for FC and FCoE
Simply registering a logical unit (LUN) with the STMF framework does not make it available to hosts (initiators) on the network. You must make logical units visible to initiator hosts for Fibre Channel and FCoE configurations by mapping the logical unit. To determine which method to use and how to map the logical unit, see How to Make a Logical Unit Available to All Systems. Both methods use the stmfadm command. The additional steps below are for FC and FCoE configurations.
How to Make Logical Units Available for FC and FCoE
This procedure makes the LUN available to all hosts or selected hosts for FC or FCoE configurations on a storage network. The steps are run on the host.
- Become an administrator.
- Make a LUN available to hosts.Obtain the global unique identification (GUID) number for the LUN.Identify the WWNs for the FC or FCoE ports of the host.
- Add a view and perform mapping.Follow the instructions in How to Make a Logical Unit Available to All Systems.
- Verify that the LUN is visible on an Oracle Solaris initiator host by running the following script.
All subsequent LUNs appear in the format output, because the script forces the initiator to touch all the LUNs through all the ports. If you do not see the LUNs, run the format command again. If you still do not see the LUNs, ensure that the service is enabled on the target by using the svcs stmf command. Also ensure that you added view entries for the LUN, as described in How to Make a Logical Unit Available to All Systems.
- Verify that the LUN is visible on other systems.
- For a Linux initiator host, verify that the LUN is visible by running the utility provided by the HBA vendor. The utility scans for configuration changes.
- For a Windows initiator host, verify that the logical unit is visible by selecting Control Panel -> Administrative Tools -> Computer Management -> Disk Management. Then, from the Action menu, choose Rescan Disks.