NASSRV Administration
From FGARWiki
NASSRV Administration
How to allocate new LUNs to iSCSI target:
1. SSH into the iSCSI target IP of the nassrv cluster: 10.100.0.100
2. Create a new LVM logical volume.
nassrv03:~ # lvcreate -n camera3 -L20G pool3 Logical volume "camera3" created
3. Add a new pacemaker resource for this LV. The easiest way to do this is to use crm configure edit, which will invoke the editor defined by the EDITOR environment variable.
Add these entries:
iqn, tid and allowed_initiators need to be unique for resource type ocf:iSCSITarget.
target_iqn, path, and scsi_sn need to be unique or match their equivilent iSCSITarget for resource type ocf:iSCSILogicalUnit
primitive zonehost3_iscsiT ocf:iSCSITarget \ params implementation="tgt" iqn="iqn.nas.faikvm.com:zonehost3" tid="3" allowed_initiators="10.100.0.60" \ op monitor interval="5s" \ op start interval="0" timeout="30" \ op stop interval="0" timeout="30" \ meta target-role="Started" primitive zonehost3_camera3 ocf:iSCSILogicalUnit \ params implementation="tgt" target_iqn="iqn.nas.faikvm.com:zonehost3" lun="1" path="/dev/pool3/camera3" scsi_sn="camera3" \ op monitor interval="5" timeout="10" depth="0" \ op start interval="0" timeout="30" \ op stop interval="0" timeout="30" \ meta target-role="Started"
Edit the following preexisting entries to include the new primitive resource names you added above. name_iscsiT should come before name_camera# because the iscsiTarget should be started before an iSCSILogicalUnit
colocation colo-group3 inf: md3_raid mdadmd pool3 pool3_ip tgtd zonehost1_iscsiT zonehost2_iscsiT zonehost3_iscsiT zonehost1_camera1 zonehost2_camera2 zonehost3_camera3 order order_pool3 inf: md3_raid mdadmd pool3 pool3_ip tgtd zonehost1_iscsiT zonehost2_iscsiT zonehost3_iscsiT zonehost1_camera1 zonehost2_camera2 zonehost3_camera3
4. Run crm_mon -1fr to confirm cluster is up, stable and shows no serious errors. You should see something like this:
nassrv03:~ # crm_mon -1fr ============ Last updated: Sat Nov 5 19:06:28 2011 Stack: openais Current DC: nassrv03 - partition with quorum Version: 1.1.5-ecb6baaf7fc091b023d6d4ba7e0fce26d32cf5c8 3 Nodes configured, 3 expected votes 12 Resources configured. ============ Online: [ nassrv01 nassrv02 nassrv03 ] Full list of resources: md3_raid (ocf::heartbeat:Raid1): Started nassrv03 mdadmd (lsb:mdadmd): Started nassrv03 pool3 (ocf::heartbeat:LVM): Started nassrv03 pool3_ip (ocf::heartbeat:IPaddr2): Started nassrv03 stonith_sbd (stonith:external/sbd): Started nassrv02 tgtd (lsb:tgtd): Started nassrv03 zonehost1_camera1 (ocf::heartbeat:iSCSILogicalUnit): Started nassrv03 zonehost1_iscsiT (ocf::heartbeat:iSCSITarget): Started nassrv03 zonehost2_iscsiT (ocf::heartbeat:iSCSITarget): Started nassrv03 zonehost3_iscsiT (ocf::heartbeat:iSCSITarget): Started nassrv03 zonehost2_camera2 (ocf::heartbeat:iSCSILogicalUnit): Started nassrv03 zonehost3_camera3 (ocf::heartbeat:iSCSILogicalUnit): Started nassrv03 Migration summary: * Node nassrv02: * Node nassrv03: * Node nassrv01: