How to use NSS Storage with a SLES 10 iSCSI Server
When using an iSCSI server as shared storage with NSS, there are several issues that need to be resolved. The first issue is that NSS pools should not be accessed by multiple servers at the same time, because this may cause data corruption. The first server that connects to an NSS pool will activate the pool. Unfortunately, this is bad unless you want to manually deactivate all pools on the shared storage and manually activate them on the appropriate server. To resolve this issue you can tell NSS to only auto-activate the SYS volume. This needs to happen during the initial load of NSS by creating an nssstart.cfg in c:\nwserver on each server that connects to the iSCSI server. The file will contain the following command:
On each server that connects to the shared storage you will need to connect to the iSCSI target and activate the appropriate pool for that server. This can be accomplished by adding the following lines to the ion.ncf.
iscsinit /chap connect <IP address of server> # You need to make sure the iSCSI target is connected before activating pools delay 15 nss /PoolActivate=<pool name> mount <volume name>
Add load ion.ncf to your autoexec.ncf so when your server boots it will automatically connect to your iSCSI server, activate the appropriate pool, and then mount the volumes.
Another issue is properly disconnecting from the iSCSI server. When issuing the ioff command, your connection to the iSCSI target is terminated immediately. This abrupt disconnect could cause data corruption. To prevent corruption, simply add the following lines to the beginning of your ioff.ncf file:
unmount <volume name> nss /PoolDeactivate=<pool name>
To ensure a proper disconnect when the server is shutting down you can also create a new file sys:\system\shutdown.ncf that contains the command:
You now have iSCSI initiators that can connect to an iSCSI target with NSS storage and activate the appropriate NSS pools automatically while avoiding corruption and mass-destruction of your network.