Presentation is loading. Please wait.

Presentation is loading. Please wait.

SERVER ISSUES KEEPING YOU UP? CHOOSE NET DIRECT. iSCSI A new path to your data.

Similar presentations


Presentation on theme: "SERVER ISSUES KEEPING YOU UP? CHOOSE NET DIRECT. iSCSI A new path to your data."— Presentation transcript:

1 SERVER ISSUES KEEPING YOU UP? CHOOSE NET DIRECT

2 iSCSI A new path to your data

3 What is it ● Let's look at SCSI, a predecessor: ● Extension of SCSI standardized in 1986 and popularized by Amiga, Apple and Sun. ● SCSI is – Used commonly for disks and tape, but also for scanners and other devices. – Uses “wide cables” for speeds up to 2.5Gbps – Only for short distances (up to 25m) – Limited number of devices (practically about 15) – Complicated to work with

4 What is iSCSI ● iSCSI extends SCSI protocol ● SCSI over TCP/IP Internet protocol – Ethernet, DSL, WiFi, PPP, etc. ● Standardized in 2004 ● Cheap (free!!!!) ● Feature rich ● Block IO not File IO

5 Block IO vs File IO ● Direct examples: – IDE, SATA, SCSI, Fibrechannel, etc. ● Network examples: – iSCSI, NBD, Fibrechannel ● Simple structure: a sequence of blocks, easily virtualized: RAID, LVM, bad block mapping ● Direct examples: – ext2, xfs, jfs, iso9660, fat, ntfs, etc. ● Network examples: – nfs, samba, cifs, afs, apf, etc. ● Complex structure: superblocks, inodes, directories, files, device nodes, links, etc.

6 Why Block IO ● Lowest common denominator – Windows servers can put NTFS file systems on a Linux iSCSI target ● Some applications require Block IO – Cluster file systems – Enterprise databases ● Some OSes won't net boot ● Faster (YMMV) ● Simpler for targets = more reliable

7 File IO Benefits ● Easiest way to have many clients access the same data ● Simple to setup and administer ● Well known and familiar.

8 What iSCSI isn't ● Not a network file system ● Not easily concurrently shared. Special cluster file systems needed for sharing. ● Not CPU efficient for very high loads, unless specialized hardware is used.

9 Terms ● Initiator: An iSCSI device that acts as a client. (i.e. mounts a disk) ● Target: An iSCSI device that acts as a server. (i.e. provides the storage) ● Address: A unique ID for an iSCSI device ● Logical Unit Number (LUN): A sub-device of an iSCSI device. Often a logical disk. ● SAN: Storage Area Network

10 Terms Target (server) LUN 2 Storage Area Network (SAN) Initiator (Client) LUN 0LUN 1 LUN 3 iqn.1995- 04.ca.netdirect.ca:storage.d isk.media iqn.1995- 04.ca.netdirect.ca:work stations.john

11 Getting Started ● Target (Server) needs: – iscsitarget package with kernel modules – Internet access – Spare disk space ● Initiator (Client) needs: – open-iscsi – kernel with iSCSI enabled – For boot from iscsi: ● BIOS that supports iSCSI, or HBA card

12 Configuring a Target ● Create a “disk” – dd if=/dev/null of=media1 seek=999 bs=1M count=1 ● Configure ietd.conf – Target iqn.1995-04.ca.netdirect:storage.disk.media ● Lun 0 Path=/images/media,Type=fileio ● Start ietd daemon – chkconfig iscsitarget on – service iscsitarget start

13 Configure a client ● Configure /etc/iscsi/initiatorname.iscsi – InitiatorName=iqn.1995.04.ca.netdirect:initiators.wo rkstations.john ● Start the daemon – chkconfig open-iscsi on – service open-iscsi start ● Discovery devices – iscsiadm -m discovery -t sendtargets -p 1.2.3.4 ● Attach all discovered nodes – iscsiadm -m node -L all

14 Configure a Client cont. ● Check dmesg for the device name: – sd 8:0:0:0: [sdb] 2045952 512-byte hardware sectors (1048 MB) – or use lsscsi ● Create a file system: – mke2fs -j /dev/sdb ● And mount: – mkdir /media – mount /dev/sdb /media

15 Admin commands ● Show all SCSI devices – cat /proc/scsi/scsi – lsscsi ● Show known iscsi targets – iscsiadm -m node ● Show connected iscsi targets – iscsiadm -m session

16 More Admin Commands ● Specifically add a target and login: – iscsiadm -m node -T iqn.1995-04.ca.netdirect:storage.disk.media -p 127.0.0.1 -o new – iscsiadm -m node -T iqn.1995-04.ca.netdirect:storage.disk.media -p 127.0.0.1 -l ● Specifically logout of and delete a target: – umount /media – iscsiadm -m node -T iqn.1995-04.ca.netdirect:storage.disk.media -p 127.0.0.1 -u – iscsiadm -m node -T iqn.1995-04.ca.netdirect:storage.disk.media -p 127.0.0.1 -o delete

17 iSCSI Naming ● Target names are big: – iqn.1995-04.ca.netdirect.ca:storage.disk.media ● IQN naming seems to be popular – format is “iqn. : ” ● Date is used to make domain name unique in case it changes registrants ● The scheme recognizes the potential for a huge number of devices.

18 Device Naming ● Device names are not static ● They show up as sdb, sdc, sdd, sde, sdf and so on ● Devices may show up more than once ● Use multipath for persistent naming and fail- over

19 Multipath Setup ● Install multipath-tools ● Create empty /etc/multipath.conf file ● Start multipathd – chkconfig multipathd on – service multipathd start ● init multipath – multipath -v2 – multipath -ll

20 Multipath Setup cont. ● Get wwid from multipath -ll (it's the big number) ● Add multipaths section to /etc/multipath.conf – multipaths { ● multipath { – wwid12345000000000012300123000 – aliasmedia ● } – } ● Restart multipathd – service multipathd restart

21 Multipath Setup cont ● multipath -ll now shows alias name ● Use /dev/mapper/media as device – mount /dev/mapper/media /media

22 Authentication & Authorization ● Only allow authorized access to targets ● Targets can be authenticated as well – Add Lines like these to general and Targets section of ietd.conf ● IncomingUser Alice hersecret123 ● OutgoingUser Bob hissecret123 – Add lines like these to /etc/iscsi/node/*/* file ● node.session.auth.authmethod = CHAP ● node.session.auth.username = alice ● node.session.auth.password = hersecret123

23 Encryption? ● iSCSI doesn't have authentication as part of the protocol ● Use IPSEC ● or VPN on Internet tunnels ● or encrypted file systems? ;)

24 Advanced Topics ● Redundant Multipath ● Boot from iSCSI ● Clustering

25 Multipath ● Redundant network paths to storage Target Initiato r Ethernet Switches Dual NICs

26 Boot from iSCSI ● Requires support from BIOS ● Or booting an initramdisk: PXE, USB, CD-ROM ● Initramdisk needs special care: iscsi modules, iscsistart, custom init script ● Try http://wpkg.org/Diskless_/_remote_boot_with_O pen-iSCSI

27 Clustering ● Clustering needs shared storage – for relocatable services – or scaling out Target Ethernet Switches Nodes

28 What to watch out for ● What disk are you formatting? ● Speed on slow links ● High CPU on high workloads ● Network reliability ● No-sharing!!!

29 Easy iSCSI ● OpenFiler (www.openfiler.com) – Linux based ● FreeNAS (www.freenas.org)www.freenas.org – FreeBSD based ● Hardware solutions – IBM DS-3000, NetApp, etc. – HBA cards

30 NICs, TOEs, and HBAs, oh my! ● All can be used to access iSCSI targets ● TCP Offload Engine, is a special NIC that offloads TCP handling, reduces CPU usage. ● HBAs act like storage adapters – Eliminate CPU overhead – Fast – Bootable

31 Contact Information ● http://www.netdirect.ca http://www.netdirect.ca ● 866-883-1172 ● info@netdirect.ca info@netdirect.ca ● Questions??


Download ppt "SERVER ISSUES KEEPING YOU UP? CHOOSE NET DIRECT. iSCSI A new path to your data."

Similar presentations


Ads by Google