首页 > 其他 > 详细

Centos 7 下使用Falcon的资源池 并配置为LVM mirror

时间:2014-08-16 17:14:31      阅读:526      评论:0      收藏:0      [点我收藏+]

Centos 7 下使用Falcon的资源池并配置为LVM mirror

首先得保证Falcon的设备上已经存在一个可以使用的资源池

操作环境

# uname –a

Linux ZZSRV1.localdomain 3.10.0-123.el7.x86_64 #1SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux

#cat /etc/redhat-release

CentOS Linuxrelease 7.0.1406 (Core)

安装iSCSI

# mount  /dev/cdrom  /mnt/cdrom/

mount: /dev/sr0is write-protected, mounting read-only

# cd/mnt/cdrom/Packages/

# ls iscsi*

iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpm 

iscsi-initiator-utils-iscsiuio-6.2.0.873-21.el7.x86_64.rpm

# rpm –Uvh  iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpmiscsi-initiator-utils-iscsiuio-6.2.0.873-21.el7.x86_64.rpm

 

warning:iscsi-initiator-utils-6.2.0.873-21.el7.x86_64.rpm: Header V3 RSA/SHA256Signature, key ID f4a80eb5: NOKEY

Preparing...                         ################################# [100%]

Updating / installing...

  1:iscsi-initiator-utils-iscsiuio-6.################################# [50%]

  2:iscsi-initiator-utils-6.2.0.873-2#################################[100%]

# rpm -qc iscsi-initiator-utils

/etc/iscsi/iscsid.conf

配置iSCSI

由于我采用的配置文件全部是默认的也就是没有用户名和密码,后面操作会简单一点如果你需要用户名和密码的话,可以通过配置文件更改,也可以通过命令的模式进行更改。具体的可以用iscsiadm –help查看命令

#iscsiadm-m node -T iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.liunx-test-0 -p192.168.188.128:3260 –l  

Loggingin to [iface: default, target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.liunx-test-0, portal:192.168.188.128,3260] (multiple)

Loginto [iface: default, target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.liunx-test-0, portal:192.168.188.128,3260] successful.

# fdisk l

Disk /dev/sda:21.5 GB, 21474836480 bytes, 41943040 sectors

……

 

Disk /dev/sdb:21.5 GB, 21474836480 bytes, 41943040 sectors

……

 

Disk /dev/sdc:21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectorsof 1 * 512 = 512 bytes

Sector size(logical/physical): 512 bytes / 512 bytes

I/O size(minimum/optimal): 512 bytes / 512 bytes

至此这个Linux已经可以使用Falcon的磁盘了下面进行lvmmirror的建立

# fdisk /dev/sdb

Welcome to fdisk(util-linux 2.23.2).

Changes willremain in memory only, until you decide to write them.

Be carefulbefore using the write command.

 

Device does notcontain a recognized partition table

Building a newDOS disklabel with disk identifier 0xa04efd3a.

 

Command (m forhelp): n

Partition type:

   p  primary (0 primary, 0 extended, 4 free)

   e  extended

Select (defaultp):

Using defaultresponse p

Partition number(1-4, default 1):

First sector(2048-41943039, default 2048):

Using defaultvalue 2048

Last sector,+sectors or +size{K,M,G} (2048-41943039, default 41943039):

Using defaultvalue 41943039

Partition 1 oftype Linux and of size 20 GiB is set

 

Command (m forhelp): p

 

Disk /dev/sdb:21.5 GB, 21474836480 bytes, 41943040 sectors

Units = sectorsof 1 * 512 = 512 bytes

Sector size(logical/physical): 512 bytes / 512 bytes

I/O size(minimum/optimal): 512 bytes / 512 bytes

Disk label type:dos

Disk identifier:0xa04efd3a

 

   Device Boot      Start         End      Blocks  Id  System

/dev/sdb1            2048   41943039    20970496   83 Linux

 

Command (m forhelp): w

The partitiontable has been altered!

 

Calling ioctl()to re-read partition table.

Syncing disks.

[root@ZZSRV1dev]# fdisk /dev/sdc

Welcome to fdisk(util-linux 2.23.2).

 

Changes willremain in memory only, until you decide to write them.

Be carefulbefore using the write command.

 

Device does notcontain a recognized partition table

Building a newDOS disklabel with disk identifier 0xe8278ed3.

 

Command (m forhelp): n

Partition type:

   p  primary (0 primary, 0 extended, 4 free)

   e  extended

Select (defaultp):

Using defaultresponse p

Partition number(1-4, default 1):

First sector(2048-41943039, default 2048):

Using defaultvalue 2048

Last sector,+sectors or +size{K,M,G} (2048-41943039, default 41943039):

Using defaultvalue 41943039

Partition 1 oftype Linux and of size 20 GiB is set

 

Command (m forhelp): w

The partitiontable has been altered!

 

Calling ioctl()to re-read partition table.

Syncing disks.

# ll /dev/sd*

brw-rw---- 1 root disk 8,  0 Aug16 09:43 /dev/sda

brw-rw---- 1 root disk 8,  1 Aug16 09:43 /dev/sda1

brw-rw---- 1 root disk 8,  2 Aug16 09:43 /dev/sda2

brw-rw---- 1 root disk 8, 16 Aug 16 11:49 /dev/sdb

brw-rw---- 1 root disk 8, 17 Aug 16 11:49 /dev/sdb1

brw-rw---- 1 root disk 8, 32 Aug 16 11:49 /dev/sdc

brw-rw---- 1 root disk 8, 33 Aug 16 11:49 /dev/sdc1

# pvcreate/dev/sd[bc][1]

  Physical volume"/dev/sdb1" successfully created

  Physical volume"/dev/sdc1" successfully created

# vgcreate vgdata/dev/sd[bc]1

  Volume group "vgdata"successfully created

# lvcreate -m1  -L 19.51G vgdata -n backupdlv /dev/sd[bc]1

  Rounding up size to full physicalextent 19.51 GiB

  Logical volume"backupdlv" created

# lvs -a -o +devices

  LV                   VG            Attr       LSize Pool Origin Data%  Move LogCpy%Sync Convert Devices                                   

  root                 centos_zzsrv1 -wi-ao----18.23g                                             /dev/sda2(328)                            

  swap                 centos_zzsrv1 -wi-ao----  1.28g                                             /dev/sda2(0)                              

 backupdlv            vgdata        rwi-a-r--- 19.51g                                 5.23         backupdlv_rimage_0(0),backupdlv_rimage_1(0)

 [backupdlv_rimage_0] vgdata       Iwi-aor--- 19.51g                                             /dev/sdb1(1)                              

 [backupdlv_rimage_1] vgdata       Iwi-aor--- 19.51g                                             /dev/sdc1(1)                              

 [backupdlv_rmeta_0]  vgdata        ewi-aor---  4.00m                                             /dev/sdb1(0)                              

 [backupdlv_rmeta_1]  vgdata        ewi-aor---  4.00m                                             /dev/sdc1(0)   

# mkfs.ext4 /dev/vgdata/backupdlv

mke2fs 1.42.9 (28-Dec-2013)

Filesystem label=

OS type: Linux

Block size=4096 (log=2)

Fragment size=4096 (log=2)

Stride=0 blocks, Stripe width=0 blocks

1281120 inodes, 5114880 blocks

255744 blocks (5.00%) reserved for the super user

First data block=0

Maximum filesystem blocks=2153775104

157 block groups

32768 blocks per group, 32768 fragments per group

8160 inodes per group

Superblock backups stored on blocks:

       32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,

       4096000

 

Allocating group tables: done                           

Writing inode tables: done                           

Creating journal (32768 blocks): done

Writing superblocks and filesystem accountinginformation: done     

# mkdir /backupd

# mount/dev/vgdata/backupdlv /backupd

如果你想在下次启动时直接使用这个设备,可以设置iscsi 的开机启动,和fstab中的开机挂载。

至此就完成了在Linux环境下使用Falcon的磁盘


本文出自 “云计算乐园” 博客,请务必保留此出处http://leegh.blog.51cto.com/8764149/1541024

Centos 7 下使用Falcon的资源池 并配置为LVM mirror,布布扣,bubuko.com

Centos 7 下使用Falcon的资源池 并配置为LVM mirror

原文:http://leegh.blog.51cto.com/8764149/1541024

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!