分类: LINUX
2009-05-25 17:32:17
cman-2.0.98-1.el5.i386.rpm cman-devel-2.0.98-1.el5.i386.rpm dkms-2.0.22.0-1.noarch.rpm dkms-iscsi_sfnet-4.0.2-7fc5.i386.rpm dkms-iscsi_trgt-0.4.13-1fs.i386.rpm dkms-iscsi_trgt-0.4.13-2fc5.i386.rpm gfs2-utils-0.1.53-1.el5.i386.rpm gfs-utils-0.1.18-1.el5.i386.rpm ibft-1.0.1-1fc5.i386.rpm iscsi-initiator-utils-6.2.0.868-0.18.el5.i386.rpm iscsitarget-0.4.13-2fc5.i386.rpm iscsitarget-0.4.15.tar.gz linux-iscsi-4.0.2-6fc5.i386.rpm mkinitrd-iscsi-5.0.32-2.1fc5.i386.rpm open-iscsi-2.0.713-11.i586.rpm perl-Config-General-2.40-1.el5.noarch.rpm perl-Net-Telnet-3.03-5.noarch.rpm scsi-target-utils-0.0-5.20080917snap.el5.i386.rpm Cluster_Administration-zh-CN-5.2-1.noarch.rpm Global_File_System-zh-CN-5.2-1.noarch.rpm isns-utils-0.91-0.1.el5.i386.rpm kmod-gfs-0.1.31-3.el5.i686.rpm piranha-0.8.4-11.el5.i386.rpm |
dd if=/dev/zero of=gfs bs=1024k count=2000 losetup /dev/loop1 gfs [root@gfs ~]# blockdev --getsize /dev/loop1 4096000 [root@gfs ~]# mkfs.gfs -p lock_nolock -j 3 /dev/loop1 [root@gfs ~]# mount /dev/loop1 /mnt/max/ [root@gfs ~]# df -hT Filesystem Type Size Used Avail Use% Mounted on /dev/sda1 ext3 6.8G 4.5G 2.1G 69% / tmpfs tmpfs 494M 0 494M 0% /dev/shm /dev/hdc iso9660 2.9G 2.9G 0 100% /media/RHEL_5.3 i386 DVD /dev/loop1 gfs 1.6G 1.1M 1.6G 1% /mnt/max [root@gfs ~]# |
[root@gfs ~]# ls /mnt/max/ cman-2.0.98-1.el5.i386.rpm gfs2-utils-0.1.53-1.el5.i386.rpm perl-Net-Telnet-3.03-5.noarch.rpm cman-devel-2.0.98-1.el5.i386.rpm perl-Config-General-2.40-1.el5.noarch.rpm [root@gfs ~]# |
[root@gfs ~]# !cat cat /etc/ietd.conf | grep -v "#" | grep -v "^$" Target iqn.2009-05.gfs:storage Lun 0 Path=/dev/loop1,Type=fileio [root@gfs ~]# |
[root@gfs ~]# /etc/init.d/iscsi-target start [root@gfs ~]# dmesg | grep loop1 Trying to join cluster "lock_nolock", "loop1" GFS: fsid=loop1.0: jid=0: Trying to acquire journal lock... GFS: fsid=loop1.0: jid=0: Looking at journal... GFS: fsid=loop1.0: jid=0: Done GFS: fsid=loop1.0: jid=1: Trying to acquire journal lock... GFS: fsid=loop1.0: jid=1: Looking at journal... GFS: fsid=loop1.0: jid=1: Done GFS: fsid=loop1.0: jid=2: Trying to acquire journal lock... GFS: fsid=loop1.0: jid=2: Looking at journal... GFS: fsid=loop1.0: jid=2: Done [root@gfs ~]# |
[root@gfs ~]# !lsof lsof -i:3260 COMMAND PID USER FD TYPE DEVICE SIZE NODE NAME ietd 7993 root 7u IPv6 24656 TCP *:iscsi-target (LISTEN) ietd 7993 root 8u IPv4 24657 TCP *:iscsi-target (LISTEN) [root@gfs ~]# |
[root @ ]# /etc/init.d/iscsi start iscsid 已停 Turning off network shutdown. Starting iSCSI daemon: [确定] [确定] 设置 iSCSI 目标:Login session [192.168.228.21:3260 iqn.2009-05.gfs:storage] [确定] [root @ ]# |
[root @ ]# iscsiadm -m node -T iqn.2009-05.gfs:storage -p 192.168.228.21 node.name = iqn.2009-05.gfs:storage node.transport_name = tcp node.tpgt = 1 node.active_conn = 1 node.startup = automatic node.session.initial_cmdsn = 0 node.session.auth.authmethod = None node.session.auth.username = node.session.auth.password = node.session.auth.username_in = node.session.auth.password_in = node.session.timeo.replacement_timeout = 120 node.session.err_timeo.abort_timeout = 10 node.session.err_timeo.reset_timeout = 30 node.session.iscsi.InitialR2T = No node.session.iscsi.ImmediateData = Yes node.session.iscsi.FirstBurstLength = 262144 node.session.iscsi.MaxBurstLength = 16776192 node.session.iscsi.DefaultTime2Retain = 0 node.session.iscsi.DefaultTime2Wait = 0 node.session.iscsi.MaxConnections = 1 node.session.iscsi.MaxOutstandingR2T = 1 node.session.iscsi.ERL = 0 node.conn[0].address = 192.168.228.21 node.conn[0].port = 3260 node.conn[0].startup = manual node.conn[0].tcp.window_size = 524288 node.conn[0].tcp.type_of_service = 0 node.conn[0].timeo.logout_timeout = 15 node.conn[0].timeo.login_timeout = 15 node.conn[0].timeo.auth_timeout = 45 node.conn[0].timeo.active_timeout = 5 node.conn[0].timeo.idle_timeout = 60 node.conn[0].timeo.ping_timeout = 5 node.conn[0].timeo.noop_out_interval = 10 node.conn[0].timeo.noop_out_timeout = 15 node.conn[0].iscsi.MaxRecvDataSegmentLength = 65536 node.conn[0].iscsi.HeaderDigest = None,CRC32C node.conn[0].iscsi.DataDigest = None node.conn[0].iscsi.IFMarker = No node.conn[0].iscsi.OFMarker = No |
[root @ ]# modprobe gfs [root @ ]# modprobe gfs2 [root @ ]# mount /dev/disk/by-path/ip-192.168.228.21\:3260-iscsi-iqn.2009-05.gfs\:storage /mnt/cd/ |
[root @ ]# df -hT 文件系统 类型 容量 已用 可用 已用% 挂载点 /dev/hda2 ext3 19G 8.4G 9.7G 47% / tmpfs tmpfs 244M 0 244M 0% /dev/shm /dev/hda1 ext3 9.2G 7.7G 1.1G 88% /mnt/hda1 /dev/hda5 ext3 7.4G 6.2G 838M 89% /mnt/hda5 /dev/sda gfs 1.6G 1.1M 1.6G 1% /mnt/cd [root @ ]# ls /mnt/cd/ cman-2.0.98-1.el5.i386.rpm gfs2-utils-0.1.53-1.el5.i386.rpm perl-Net-Telnet-3.03-5.noarch.rpm cman-devel-2.0.98-1.el5.i386.rpm perl-Config-General-2.40-1.el5.noarch.rpm |
[root @ ]# /etc/init.d/iscsi restart Logout session [1][192.168.228.21:3260 iqn.2009-05.gfs:storage] Stopping iSCSI daemon: /etc/init.d/iscsi: line 42: 3382 已杀死 /etc/init.d/iscsid stop iscsid 已死,但 pid 文件仍存 [确定] iscsid 已停 Turning off network shutdown. Starting iSCSI daemon: [确定] [确定] 设置 iSCSI 目标:Login session [192.168.228.21:3260 iqn.2009-05.gfs:storage] [确定] [root @ ]# |