Monday, May 30, 2016

iscsiadm ipuçları

iSCSI nedir?

iSCSI, depolama aygıtlarını TCP/IP kullanan bir ağ üzerinden bağlama yöntemidir. Yerel ağ (LAN), geniş alan ağı (WAN) veya Internet üzerinden kullanılabilir. iSCSI aygıtları, ağ üzerinden erişilebilen başka bir bilgisayarda bulunan, bağlanabileceğiniz disk, teyp, CD ve benzeri diğer depolama aygıtlarıdır.

10.1.0.3 ip adresli makinaya openfiler kurdum ve vg ve lun yapılandırması gerçekleştirdim.

node'lara ait ip blokları için initialize yetkisi tanıdım.

Platform: 

Red hat Linux 6.5 x86_64

iscsiadm -m session --rescan

iscsiadm -m discovery -t sendtargets -p 10.1.0.3:3260

iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.ce262c997ea5 -p 10.41.0.2:3260

iscsiadm -m node -T iqn.2006-01.com.openfiler:tsn.ce262c997ea5 -p 10.41.0.2:3260 -l


# disable all active sessions

iscsiadm -m node | while read line; do iqn=$(echo $line | awk '{print $2 }'); iscsiadm -m node -T $iqn --portal $(echo $line | awk '{print $1 }' | sed -r 's/(.+:3260),.*/\1/') -u;  done



# delete all node records

iscsiadm -m node | while read line; do iqn=$(echo $line | awk '{print $2 }'); iscsiadm -m node -o delete -T $iqn --portal $(echo $line | awk '{print $1 }' | sed -r 's/(.+:3260),.*/\1/');  done


# list node records

iscsiadm -m node


# discover targets on specific hosts

iscsiadm -m discovery -t sendtargets -p 10.41.0.131:3260

# login to target


iscsiadm -m node -T iqn.2005-10.org.freenas.ctl:target01 -p 10.41.0.131:3260 -l



Wednesday, May 18, 2016

virtualbox: create internal test vm network


$ VBoxManage dhcpserver add --netname testlab --ip 10.1.0.1 --netmask 255.255.255.0 --lowerip 10.1.0.2 --upperip 10.1.0.100 --enable


localuser-MacBook-Pro:~ localuser$ VBoxManage list dhcpservers
NetworkName:    HostInterfaceNetworking-vboxnet0
IP:             192.168.56.100
NetworkMask:    255.255.255.0
lowerIPAddress: 192.168.56.101
upperIPAddress: 192.168.56.254
Enabled:        Yes

NetworkName:    testlab
IP:             10.1.0.1
NetworkMask:    255.255.255.0
lowerIPAddress: 10.1.0.2
upperIPAddress: 10.1.0.100

Tuesday, May 17, 2016