From Fedora Project Wiki

(initial iscsi draft)
 
(Another iscsi edit.)
Line 26: Line 26:
=== Terms ===
=== Terms ===


* initiator means client
* initiator means client
* target means server
* target means server
* swab means mop
* swab means mop
* deck means floor
* deck means floor


=== iscsi's basic login / logout procedure is ===
=== iscsi's basic login / logout procedure is ===


1. Notify your client that a new target is available (similar to editing /etc/fstab for a new nfs mount)
# Notify your client that a new target is available (similar to editing /etc/fstab for a new nfs mount)
1. Login to the iscsi target (similar to running "mount /my/nfs"
# Login to the iscsi target (similar to running "mount /my/nfs"
1. Logout from the iscsi target (similar to running "umount /my/nfs"
# Logout from the iscsi target (similar to running "umount /my/nfs"
1. Delete the target from the client (similar to removing the nfs mount from /etc/fstab)
# Delete the target from the client (similar to removing the nfs mount from /etc/fstab)


== Loggin in ==
== Loggin in ==
Line 42: Line 42:
Most mounts are covered by puppet so this should be automatic.  In the event that something goes wrong though, the best way to fix this is:
Most mounts are covered by puppet so this should be automatic.  In the event that something goes wrong though, the best way to fix this is:


{{{
<pre>
# Notify the client of the target
# Notify the client of the target
iscsiadm --mode node --targetname iqn.1992-08.com.netapp:sn.101197194 --portal 10.8.34.17:3260 -o new
iscsiadm --mode node --targetname iqn.1992-08.com.netapp:sn.101197194 --portal 10.8.34.17:3260 -o new
Line 53: Line 53:
vgscan
vgscan
vgchange -ay xenGuests
vgchange -ay xenGuests
}}}
</pre>


Once this is done, one should be able to run "lvs" to see the logical volumes
Once this is done, one should be able to run "lvs" to see the logical volumes
Line 61: Line 61:
Logging out isn't normally needed, for example rebooting a machine automatically logs the initiator out.  Should a problem arise though here are the steps:
Logging out isn't normally needed, for example rebooting a machine automatically logs the initiator out.  Should a problem arise though here are the steps:


{{{
<pre>
# Disable the logical volume:
# Disable the logical volume:
vgchange -an xenGuests
vgchange -an xenGuests
Line 67: Line 67:
# log out
# log out
iscsiadm --mode node --targetname iqn.1992-08.com.netapp:sn.101197194 --portal 10.8.34.17:3260 --logout
iscsiadm --mode node --targetname iqn.1992-08.com.netapp:sn.101197194 --portal 10.8.34.17:3260 --logout
}}}
</pre>
 
{{admon/warning| Cannot deactivate volume group|If the vgchange command fails with an error about not being able to deactivate the volume group, this means that one of the logical volumes is still in use.  By running "lvs" you can get a list of volume groups.  Look in the Attr column.  There are 6 attrs listed.  The 5th column usually has a '-' or an 'a'.  'a' means its active, - means it is not.  To the right of that (the last column) you will see an '-' or an 'o'.  If you see an 'o' that means that logical volume is still mounted and in use.  }}

Revision as of 22:27, 17 December 2008

iscsi - SOP

Contact Information

Owner: Fedora Infrastructure Team

Contact: #fedora-admin, sysadmin-main

Location: Phoenix

Servers: xen[1-15]

Purpose: Provides iscsi connectivity to our netapp.

Description

iscsi allows one to share and mount block devices using the scsi protocol over a network. Fedora currently connects to a netapp that has an iscsi export.

Typical uses

The best uses for Fedora are for servers that are not part of a farm or live replicated. For example, we wouldn't put app1 on the iscsi share because we don't gain anything from it. Shutting down app1 to move it isn't an issue because app1 is part of our application server farm.

noc1, however, is not replicated. It's a stand alone box that, at best, would have a non-live failover. By placing this host on an iscsi share, we can make it more highly available as it allows us to move that box around our virtualization infrastructure without rebooting it or even taking it down.

iscsi basics

Terms

  • initiator means client
  • target means server
  • swab means mop
  • deck means floor

iscsi's basic login / logout procedure is

  1. Notify your client that a new target is available (similar to editing /etc/fstab for a new nfs mount)
  2. Login to the iscsi target (similar to running "mount /my/nfs"
  3. Logout from the iscsi target (similar to running "umount /my/nfs"
  4. Delete the target from the client (similar to removing the nfs mount from /etc/fstab)

Loggin in

Most mounts are covered by puppet so this should be automatic. In the event that something goes wrong though, the best way to fix this is:

# Notify the client of the target
iscsiadm --mode node --targetname iqn.1992-08.com.netapp:sn.101197194 --portal 10.8.34.17:3260 -o new

# Log in to the new target
iscsiadm --mode node --targetname iqn.1992-08.com.netapp:sn.101197194 --portal 10.8.34.17:3260 --login

# Scan and activate lvm
pvscan
vgscan
vgchange -ay xenGuests

Once this is done, one should be able to run "lvs" to see the logical volumes

Logging out

Logging out isn't normally needed, for example rebooting a machine automatically logs the initiator out. Should a problem arise though here are the steps:

# Disable the logical volume:
vgchange -an xenGuests

# log out
iscsiadm --mode node --targetname iqn.1992-08.com.netapp:sn.101197194 --portal 10.8.34.17:3260 --logout
Warning.png
Cannot deactivate volume group
If the vgchange command fails with an error about not being able to deactivate the volume group, this means that one of the logical volumes is still in use. By running "lvs" you can get a list of volume groups. Look in the Attr column. There are 6 attrs listed. The 5th column usually has a '-' or an 'a'. 'a' means its active, - means it is not. To the right of that (the last column) you will see an '-' or an 'o'. If you see an 'o' that means that logical volume is still mounted and in use.