<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://alteeve.com/w/index.php?action=history&amp;feed=atom&amp;title=Setting_Up_tgtd_As_A_SAN</id>
	<title>Setting Up tgtd As A SAN - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://alteeve.com/w/index.php?action=history&amp;feed=atom&amp;title=Setting_Up_tgtd_As_A_SAN"/>
	<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Setting_Up_tgtd_As_A_SAN&amp;action=history"/>
	<updated>2026-05-04T19:14:30Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.3</generator>
	<entry>
		<id>https://alteeve.com/w/index.php?title=Setting_Up_tgtd_As_A_SAN&amp;diff=4520&amp;oldid=prev</id>
		<title>Digimer: Created page with &quot;{{howto_header}}  {{note|1=This is far from a comprehensive tutorial.}}  = Setting Up tgtd As A SAN =  Note that this is hosted on a machine outside of the cluster with the IP ad...&quot;</title>
		<link rel="alternate" type="text/html" href="https://alteeve.com/w/index.php?title=Setting_Up_tgtd_As_A_SAN&amp;diff=4520&amp;oldid=prev"/>
		<updated>2012-10-12T04:34:17Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;{{howto_header}}  {{note|1=This is far from a comprehensive tutorial.}}  = Setting Up tgtd As A SAN =  Note that this is hosted on a machine outside of the cluster with the IP ad...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Páàjì titun&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{howto_header}}&lt;br /&gt;
&lt;br /&gt;
{{note|1=This is far from a comprehensive tutorial.}}&lt;br /&gt;
&lt;br /&gt;
= Setting Up tgtd As A SAN =&lt;br /&gt;
&lt;br /&gt;
Note that this is hosted on a machine outside of the cluster with the IP address of &amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;10.255.0.222&amp;lt;/span&amp;gt; and is exporting a storage device found at &amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;/dev/mmcblk0&amp;lt;/span&amp;gt;. A proper SAN device should be used in production, of course.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;On the SAN server&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
yum install scsi-target-utils&lt;br /&gt;
vim /etc/tgt/conf.d/sanlock.conf&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;xml&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;target iqn.2012-10.ca.alteeve:an-cluster-01.sanlock01&amp;gt;&lt;br /&gt;
	direct-store /dev/mmcblk0&lt;br /&gt;
	vendor_id Alteeve&lt;br /&gt;
&amp;lt;/target&amp;gt;&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
systemctl start tgtd.service&lt;br /&gt;
systemctl status tgtd.service&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
tgtd.service - tgtd iSCSI target daemon&lt;br /&gt;
	  Loaded: loaded (/usr/lib/systemd/system/tgtd.service; disabled)&lt;br /&gt;
	  Active: active (running) since Thu, 11 Oct 2012 17:22:20 -0400; 10min ago&lt;br /&gt;
	 Process: 13552 ExecStop=/usr/sbin/tgtadm --op delete --mode system (code=exited, status=0/SUCCESS)&lt;br /&gt;
	 Process: 13548 ExecStop=/usr/sbin/tgt-admin --update ALL -c /dev/null (code=exited, status=0/SUCCESS)&lt;br /&gt;
	 Process: 13546 ExecStop=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS)&lt;br /&gt;
	 Process: 13622 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v ready (code=exited, status=0/SUCCESS)&lt;br /&gt;
	 Process: 13589 ExecStartPost=/usr/sbin/tgt-admin -e -c $TGTD_CONFIG (code=exited, status=0/SUCCESS)&lt;br /&gt;
	 Process: 13587 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS)&lt;br /&gt;
	Main PID: 13586 (tgtd)&lt;br /&gt;
	  CGroup: name=systemd:/system/tgtd.service&lt;br /&gt;
		  └ 13586 /usr/sbin/tgtd -f&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;On the cluster nodes&amp;#039;&amp;#039;&amp;#039;:&lt;br /&gt;
&lt;br /&gt;
Make sure they can see the SAN;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
iscsiadm -m discovery -t sendtargets -p 10.255.0.222&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
10.255.0.222:3260,1 iqn.2012-10.ca.alteeve:an-cluster-01.sanlock01&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then connect to the LUN;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
iscsiadm --mode node --portal 10.255.0.222 --target iqn.2012-10.ca.alteeve:an-cluster-01.sanlock01 --login&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
Logging in to [iface: default, target: iqn.2012-10.ca.alteeve:an-cluster-01.sanlock01, portal: 10.255.0.222,3260] (multiple)&lt;br /&gt;
Login to [iface: default, target: iqn.2012-10.ca.alteeve:an-cluster-01.sanlock01, portal: 10.255.0.222,3260] successful.&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Looks good. Confirm with &amp;lt;span class=&amp;quot;code&amp;quot;&amp;gt;fdisk&amp;lt;/span&amp;gt;;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;bash&amp;quot;&amp;gt;&lt;br /&gt;
fdisk -l&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;snip&amp;gt;&lt;br /&gt;
Disk /dev/sdb: 125 MB, 125960192 bytes&lt;br /&gt;
4 heads, 61 sectors/track, 1008 cylinders, total 246016 sectors&lt;br /&gt;
Units = sectors of 1 * 512 = 512 bytes&lt;br /&gt;
Sector size (logical/physical): 512 bytes / 512 bytes&lt;br /&gt;
I/O size (minimum/optimal): 512 bytes / 512 bytes&lt;br /&gt;
Disk identifier: 0x00000000&lt;br /&gt;
&lt;br /&gt;
Disk /dev/sdb doesn&amp;#039;t contain a valid partition table&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Done!&lt;br /&gt;
&lt;br /&gt;
{{footer}}&lt;/div&gt;</summary>
		<author><name>Digimer</name></author>
	</entry>
</feed>