Created
January 10, 2014 09:55
-
-
Save tkuchiki/8349332 to your computer and use it in GitHub Desktop.
iscsi over ssh tunnel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ autossh -M 33333 -N -f -L 13260:10.150.1.26:3260 sg | |
$ yum install -y iscsi-initiator-utils | |
$ iscsiadm -m discovery -t sendtargets -p 127.0.0.1:13260 | |
$ vim /var/lib/iscsi/send_targets/127.0.0.1\,13260/iqn.1997-05.com.amazon\:myvolume\,10.150.1.26\,3260\,1\,default/default | |
#node.conn[0].address = 10.150.1.26 | |
#node.conn[0].port = 3260 | |
node.conn[0].address = 127.0.0.1 | |
node.conn[0].port = 13260 | |
$ iscsiadm -m node -T iqn.iqn.1997-05.com.amazon:myvolume --login | |
$ fdisk -l | |
$ fdisk /dev/sdX | |
... | |
$ yum install -y xfsprogs xfsdump | |
$ mkfs.xfs -f /dev/sdX | |
... | |
$ mkdir /data | |
$ mount /dev/sdX /data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# $HOME/.ssh/config | |
Host sg | |
HostName Your Elastic IP | |
IdentityFile /root/.ssh/id_rsa | |
User root |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment