Chinaunix首页 | 论坛 | 博客
  • 博客访问: 111376
  • 博文数量: 29
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 240
  • 用 户 组: 普通用户
  • 注册时间: 2014-07-11 15:42
个人简介

多少人爱你青春欢畅的时辰, 爱你的美丽假意和真心, 只有一个人爱你那朝圣者的灵魂, 爱你衰老了的连上痛苦的皱纹.

文章分类

全部博文(29)

文章存档

2018年(1)

2015年(2)

2014年(26)

我的朋友

分类: 云计算

2014-07-17 12:53:53

HP服务器段操作:


HP F8 进入 I Light Out, 后台开关机加载光盘镜像

HF 按F8 在smart array 进入RAID


查看光纤MMN号

cat /sys/class/fc_host/host2/port_name


HP I LIGHT OUT License: 333LX-RT2DW-N54R6-SMLDH-L3N76



Reference web:


1. Linux Server Steps


  1. installing initiator
  2. yum search iscsi
  3. yum install iscsi-initiator-utils
  4. there will be two files include to /etc/iscsi

initiatorname.iscsi & iscsid.conf

  1. Start iscsi service

A: service iscsi start/restart

B: /etc/init.d/iscsi start

  1. check the iscsi status

chkconfig —list | grep iscsi

  1. Please record initiatorname

#cat  /etc/iscsi/initatorname.iscsi

initiatorName=iqn.1994-05.com.redhat:23a52db12345



2. Netapp server Steps

1.  add license

license add *******

2.    create igroup 

igroup create -i -t linux linuxas5 iqn.1994-05.com.redhat:23a52db12345

3.    create aggregate

> aggr create aggrtest -r 16 -t raid_dp 25

> sysconfig -r     显示刚创建后的配置信息

> df -Ah   显示aggr名为aggrtest的容量   (实际容量要看 aggrtest对应的total数字)

4.    create vol in from aggrtest 

>vol create iscsi1 aggrtest 2048G  //在名为aggrtest的aggr中建立卷iscsi1 大小为2048g

5.    delete exist vol

>vol offline iscsi1    //离线iscsi1卷

>vol destroy iscsi1  //删除iscsi1  

6.    create lun from vol

>lun create -s 2048G -t linux -o noreserve /vol/iscsi1/iscsilun1  //在名为iscsi1的vol中 创建igroup并映射lun

7.    Or we could manually map pun

>lun map /vol/iscsi1/iscsilun1 linuxas5    把名为iscsilun1的lun映射到IG上

8.    check lun’s status

if lun offline, we need to online: >lun  online /vol/iscsi1/iscsilun1


3. Go back to Linux server:

1. Detected new Lun, gain target Inode.

#iscsiadmin -m discovery -t st -p “IP”

#iscsiadmin -m discovery -t st -p 10.16.255.33/10.16.255.34

10.16.255.33:3260,2000 iqn.1992-08.com.netapp:sn.123123123

2.    mount login Lun

#iscsiadmin -m node -T iqn.1992-08.com.netapp:sn.123123123 -p 10.16.255.33 -l

这是一条测试命令

#iscsiadmin -m node -T iqn.1992-08.com.netapp:sn.123123123 -p 10.16.255.33 -u

需要打开新的terminal 然后输入这条命令,停止挂载

3.    modify iscsid.conf

#vi /etc/iscsi/iscsid.conf

edit: DiscoveryAddress = 10.16.255.33  // Targets IP address

SendAsyncText = yes  //Initiator能从客户端接收到 Vendor Specific的同步事件

Continuous = yes  //为了能指定全部依然打开的会话

4.   Detected Disk

#fdisk -l

#fdisk /dev/sda1

#mkfs -t ext4 /dev/sda1

#mkdir /raid/sdb1

#mount /dev/sda1 /raid/sdb1

5.   auto Mount new disk

#vi /etc/fstab

/dev/sda1 /raid/sdb1 ext4_netdev 0 0

6.   check the capacity

#df -h


reference web:

在windows2003上使用ms iscsi initiator 最新版本作为iscsi initiator端

右击iscsi initiator设备选择discovery页签->选择add->添加盘阵ip地址和端口号(netapp的端口号一般为3260)->再次选择targets页签->点击logon...->点击ok

看到status从inactive状态变化为connected状态后即可在磁盘管理器中使用该盘阵系统


Some Fdisk command


Linux磁带备份,所以我先添加一块硬盘,并相应的建立分区,格式化,然后挂载使用。下面看我操作的步骤:

1.先用Fdisk -l 来查看当前状态下磁盘情况

 

[root@linux1 ~]# fdisk -l

Disk /dev/hda: 5368 MB, 5368709120 bytes

 

255 heads, 63 sectors/track, 652 cylinders

 

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

 

/dev/hda1 * 1 13 104391 83 Linux

 

/dev/hda2 14 652 5132767 8e Linux LVM

 

Disk /dev/hdb: 2147 MB, 2147483648 bytes

 

16 heads, 63 sectors/track, 4161 cylinders

 

Units = cylinders of 1008 * 512 = 516096 bytes

 

Disk /dev/hdb doesn't contain a valid partition table

上面红色标识行可以看出,我添加了一块新硬盘/dev/hdb,大小为2G,未分区格式化状态。

 

 

 

2.用Fdisk /dev/hdb来进行分区操作。

 

 

[root@linux1 ~]# fdisk /dev/hdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

 

The number of cylinders for this disk is set to 4161.

There is nothing wrong with that, but this is larger than 1024,

and could in certain setups cause problems with:

1) software that runs at boot time (e.g., old versions of LILO)

2) booting and partitioning software from other OSs

(e.g., DOS FDISK, OS/2 FDISK)

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

Command (m for help): n //输入N表示新建一个分区

Command action

e extended

p primary partition (1-4)

p //p 表示建立一个原始分区

Partition number (1-4): 1 //1 表示此分区编号为1.

First cylinder (1-4161, default 1): 1 //1表示使用默认起始柱面号.如果要分多个区的话,先盘算好要多大,再输入数字

Last cylinder or size or sizeM or sizeK (1-4161, default 4161): // 输入: 回车 表示使用默认结束柱面号.即此分区使用整个硬盘空间

 

Using default value 4161

 

Command (m for help): w //保存分区

 

The partition table has been altered!

 

Calling ioctl() to re-read partition table.

Syncing disks.

 

 

 

3.再次查看当前分区状态:

[root@linux1 ~]# fdisk -l

 

Disk /dev/hda: 5368 MB, 5368709120 bytes

255 heads, 63 sectors/track, 652 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

 

Device Boot Start End Blocks Id System

/dev/hda1 * 1 13 104391 83 Linux

/dev/hda2 14 652 5132767 8e Linux LVM

 

Disk /dev/hdb: 2147 MB, 2147483648 bytes

16 heads, 63 sectors/track, 4161 cylinders

Units = cylinders of 1008 * 512 = 516096 bytes

 

Device Boot Start End Blocks Id System

/dev/hdb1 1 4161 2097112 83 Linux

可以看出,已经出来了一个/dev/hdb1的新分区。下一步将其格式化,再使用

 

 

 

4.用mkfs.ext3格式化新分区

[root@linux1 ~]# mkfs.ext3 /dev/hdb1

mke2fs 1.39 (29-May-2006)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

262144 inodes, 524278 blocks

26213 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=536870912

16 block groups

32768 blocks per group, 32768 fragments per group

16384 inodes per group

Superblock backups stored on blocks:

32768, 98304, 163840, 229376, 294912

 

Writing inode tables: done

Writing superblocks and filesystem accounting information: done

 

This filesystem will be automatically checked every 32 mounts or

180 days, whichever comes first. Use tune2fs -c or -i to override.

 

 

 

5.挂载使用。

[root@linux1 ~]# mkdir /mnt/hdb1 //新建一个挂载点。

[root@linux1 ~]# mount /dev/hdb1 /mnt/hdb1 //挂载。

[root@linux1 ~]# df -h

文件系统 容量 已用 可用 已用% 挂载点

/dev/mapper/VolGroup00-LogVol00

4.3G 3.6G 487M 89% /

/dev/hda1 99M 12M 82M 13% /boot

tmpfs 125M 0 125M 0% /dev/shm

/dev/hdb1 2.0G 3.0M 1.9G 1% /mnt/hdb1

 

 

 

6 .开机自动挂载

三.设置新硬盘开机自动挂载

在vi /etc/fstab中添加新硬盘的挂载信息.添加下面一行:

/dev/hdb1 /mnt/hdb1 ext3 defaults 1 2(如果还有一个分区就是1 3,以此类推)

这样,每次开机后,系统会自动将/dev/hdb1挂载到/mnt/hdb1




阅读(1344) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~