iscsi/client_connect.sh

raw link view readme
1 iscsiadm --mode discovery --type sendtargets --portal 10.17.0.4 --discover
2
3 iscsiadm --mode node --targetname iqn.2016-01.com.domain:tgt1 --portal 10.17.0.4 --login
4
5 fdisk /dev/sdc <
6 n
7 p
8 1
9
10
11 w
12 EOF
13
14 mkfs.xfs /dev/sdc1
15
16 mkdir /var/lib/mongo
17
18 echo "$(xfs_admin -u /dev/sdc1 | sed "s/ //g") /var/lib/mongo xfs defaults,noatime 0 0" >> /etc/fstab
19
20 mount -a
21