fdhfgh 发表于 2019-1-27 08:04:38

Open Filer安装及连接WIN\linux主机

转载1.安装iscsi initiator
  #rpm –ivh iscsi.initiator.rpm
2.编辑iscsi配置文件
  编辑/etc/iscsi.conf加入以下行
  DiscoveryAddress=172.16.11.250
  Continuous=yes
  SendAsyncText=yes
  
  其中172.16.11.250是OPENFILER的IP地址
  
3.启动iscsi服务
  # chkconfig iscsi on
  # chkconfig --list |grep scsi
  iscsi         0:off   1:off    2:on    3:on    4:on   5:on    6:off
  
  # service iscsi restart
  Searching for iscsi-based multipath maps
  Found 0 maps
  Stopping iscsid: iscsid not running
  Checking iscsi config:
  Loading iscsi driver:
  mknod: `/dev/iscsictl': File exists
  Starting iscsid:
  
  # iscsi-ls
  *******************************************************************************
  SFNet iSCSI Driver Version ...4:0.1.11-4(15-Jan-2007)
  *******************************************************************************
  TARGET NAME             :iqn.2006-01.com.openfiler:ricky.vote
  TARGET ALIAS            :

  HOST>
  BUS >
  TARGET>  TARGET ADDRESS          :172.16.11.250:3260,1
  SESSION STATUS          :ESTABLISHED AT Thu Oct1 00:00:07 CST2009

  SESSION>  *******************************************************************************
  # iscsi-rescan
  Rescanning host1
4.识别openfiler存储
  #iscsi-iname
  iqn.1987-05.com.cisco:01.a1577bbb48ad
  # fdisk-l
  Disk /dev/sda: 8589 MB, 8589934592 bytes
  255heads, 63 sectors/track, 1044 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sda1   *         1          13      104391    83Linux
  /dev/sda2            14          89      610470    82Linux swap
  /dev/sda3            90      1044   7671037+   83Linux
  
  Disk /dev/sdb: 2147 MB, 2147483648 bytes
  255heads, 63 sectors/track, 261 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sdb1               1         261   2096451   5Extended
  /dev/sdb5               1          74      594342    83Linux
  /dev/sdb6            75         136      497983+   83Linux
  /dev/sdb7             137         173      297171    83Linux
  /dev/sdb8             174         186      104391    83Linux
  /dev/sdb9             187         199      104391    83Linux
  /dev/sdb10            200         206       56196    83Linux
  /dev/sdb11            207         213       56196    83Linux
  /dev/sdb12            214         220       56196    83Linux
  /dev/sdb13            221         223       24066    83Linux
  
  Disk /dev/sdc: 2147 MB, 2147483648 bytes
  255heads, 63 sectors/track, 261 cylinders
  Units = cylinders of 16065 * 512 = 8225280 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sdc1               1         261   2096451   5Extended
  /dev/sdc5               1         7       56164+   83Linux
  /dev/sdc6               8          20      104391    83Linux
  /dev/sdc7            21          27       56196    83Linux
  /dev/sdc8            28          30       24066    83Linux
  /dev/sdc9            31          33       24066    83Linux
  
  Disk /dev/sdd: 100 MB, 100663296bytes
  4 heads, 48 sectors/track, 1024cylinders
  Units = cylinders of 192 * 512 = 98304bytes
  
  Disk /dev/sdd doesn't contain a valid partition table
  #
  
  # iscsi-device/dev/sdd
  /dev/sdd is an iSCSI device
  #
  
5.分区并创建文件系统
  # fdisk /dev/sdd
  
  Command (m for help): m
  Command action
  a   toggle a bootable flag
  b   edit bsd disklabel
  c   toggle the dos compatibilityflag
  d   delete a partition
  l   list known partition types
  m   print this menu
  n   add a new partition
  o   create a new empty DOS partitiontable
  p   print the partition table
  q   quit without savingchanges
  s   create a new empty Sundisklabel

  t   change a partition's system >  u   change display/entry units
  v   verify the partition table
  w   write table to disk andexit
  x   extra functionality (expertsonly)
  
  Command (m for help): n
  Command action
  e   extended
  p   primary partition (1-4)
  p
  Partition number (1-4): 1
  First cylinder (1-1024, default 1):
  Using default value 1
  Last cylinder or +size or +sizeM or +sizeK (1-1024, default 1024):
  Using default value 1024
  
  Command (m for help): w

  Thepartition table has been>  
  Calling ioctl() to re-read partition table.
  Syncing disks.
  # fdisk -l /dev/sdd
  
  Disk /dev/sdd: 100 MB, 100663296 bytes
  4heads, 48 sectors/track, 1024 cylinders
  Units = cylinders of 192 * 512 = 98304 bytes
  

  Device Boot      Start         End      Blocks   >  /dev/sdd1               1      1024       98280    83Linux
  # mkfs -t ext3/dev/sdd1
  mke2fs 1.35 (28-Feb-2004)
  Filesystem label=
  OStype: Linux

  Block>
  Fragment>  24576 inodes, 98280 blocks
  4914 blocks (5.00%) reserved for the super user
  First data block=1
  Maximum filesystem blocks=67371008
  12block groups
  8192 blocks per group, 8192 fragments per group
  2048 inodes per group
  Superblock backups stored on blocks:
  8193, 24577, 40961, 57345,73729
  
  Writing inode tables: done
  Creating journal (4096 blocks): done
  Writing superblocks and filesystem accounting information:done
  
  This filesystem will be automatically checked every 26 mountsor
  180days, whichever comes first.Use tune2fs-c or -i to override.
  #
  
6.读写测试
  # mount /dev/sdd1/openfiler
  # df -h

  Filesystem         >  /dev/sda3            7.3G3.5G   3.5G51% /
  /dev/sda1               99M8.6M    86M10% /boot
  none                   157M   0   157M   0% /dev/shm
  /dev/sdd1               93M5.6M    83M   7% /openfiler
  #
  
  # tar -cvf/openfiler/var.tar /var
  /var/www/manual/mod/module-dict.html.ko.euc-kr
  /var/www/manual/mod/index.html.de
  /var/www/manual/mod/mpm_winnt.html.es
  /var/www/manual/mod/mod_info.html.ja.euc-jp
  /var/www/manual/mod/mod_dav.html
  /var/www/manual/mod/mpm_winnt.html.en
  /var/www/manual/mod/mod_imap.html
  /var/www/manual/mod/mod_status.html.ja.euc-j
  
  # ls
  lost+found   var.tar
  #
  
  # df -h

  Filesystem         >  /dev/sda3            7.3G3.5G   3.5G51% /
  /dev/sda1               99M8.6M    86M10% /boot
  none                   157M   0   157M   0% /dev/shm
  /dev/sdd1               93M   75M    14M85% /openfiler
  #
  
  
  
  
  
  
  
  

页: [1]
查看完整版本: Open Filer安装及连接WIN\linux主机