]> git.proxmox.com Git - ceph.git/blame - ceph/src/test/cli-integration/rbd/iscsi_client.t
update source to Ceph Pacific 16.2.2
[ceph.git] / ceph / src / test / cli-integration / rbd / iscsi_client.t
CommitLineData
f67539c2
TL
1Login to the target
2===================
3 $ IP=`cat /etc/ceph/iscsi-gateway.cfg |grep 'trusted_ip_list' | awk -F'[, ]' '{print $3}'`
4 > sudo iscsiadm -m discovery -t st -p $IP -l 2&> /dev/null
5 $ sleep 10
6 $ sudo ls /dev/disk/by-path/ |grep 'iscsi-iqn.2003-01.com.redhat.iscsi-gw:ceph-gw' |wc -l
7 2
8
9Make filesystem
10===============
11 $ device=`sudo multipath -l | grep 'LIO-ORG,TCMU device' | awk '{print $1}'`
12 > sudo mkfs.xfs /dev/mapper/$device -f | grep 'meta-data=/dev/mapper/mpath' | awk '{print $2}'
13 isize=512
14
15Write/Read test
16===============
17 $ device=`sudo multipath -l | grep 'LIO-ORG,TCMU device' | awk '{print $1}'`
18 > sudo dd if=/dev/random of=/tmp/iscsi_tmpfile bs=1 count=1K status=none
19 > sudo dd if=/tmp/iscsi_tmpfile of=/dev/mapper/$device bs=1 count=1K status=none
20 > sudo dd if=/dev/mapper/$device of=/tmp/iscsi_tmpfile1 bs=1 count=1K status=none
21 $ sudo diff /tmp/iscsi_tmpfile /tmp/iscsi_tmpfile1
22
23Logout the targets
24==================
25 $ IP=`cat /etc/ceph/iscsi-gateway.cfg |grep 'trusted_ip_list' | awk -F'[, ]' '{print $3}'`
26 > sudo iscsiadm -m node -T iqn.2003-01.com.redhat.iscsi-gw:ceph-gw -p $IP:3260 -u | grep 'successful' | awk -F']' '{print $2}'
27 successful.
28 $ IP=`cat /etc/ceph/iscsi-gateway.cfg |grep 'trusted_ip_list' | awk -F'[, ]' '{print $4}'`
29 > sudo iscsiadm -m node -T iqn.2003-01.com.redhat.iscsi-gw:ceph-gw -p $IP:3260 -u | grep 'successful' | awk -F']' '{print $2}'
30 successful.