Guest User

Untitled

a guest
Nov 1st, 2017
108
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #!/bin/sh -x
  2.  
  3. iscsiadm -m discovery -t st -p 192.168.101.100
  4. echo "node.session.auth.username = ausername" >> /etc/iscsi/nodes/iqn.2010-01.com.example:\storage.authenticated/192.168.101.100\,3260\,1/default
  5. echo "node.session.auth.password = apassword" >> /etc/iscsi/nodes/iqn.2010-01.com.example:\storage.authenticated/192.168.101.100\,3260\,1/default
  6. iscsiadm -m node --targetname "iqn.2010-01.com.example:storage.authenticated" --portal "192.168.101.100:3260" --login
  7. mkdir -p /target
  8. mount /dev/sdb1 /target
  9. cp /target/boot/initrd.img-* /var/lib/tftpboot/initrd-authenticated.img
  10. cp /target/boot/vmlinuz-* /var/lib/tftpboot/vmlinuz-authenticated
  11. umount /target
  12. iscsiadm -m node --targetname "iqn.2010-01.com.example:storage.authenticated" --portal "192.168.101.100:3260" --logout
Add Comment
Please, Sign In to add comment