[root@ZZSRV1 ~]# uname -a
Linux ZZSRV1.localdomain3.10.0-123.el7.x86_64 #1 SMP Mon Jun 30 12:09:22 UTC 2014 x86_64 x86_64 x86_64GNU/Linux
[root@ZZSRV1 ~]# cat /etc/redhat-release
CentOS Linux release 7.0.1406 (Core)
[root@ZZSRV1 ~]#
[root@ZZSRV1 dev]# mount /dev/cdrom/mnt/cdrom/
mount: /dev/sr0 is write-protected,mounting read-only
[root@ZZSRV1 dev]#
[root@ZZSRV1 ~]# cd /mnt/cdrom/Packages/
[root@ZZSRV1 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
[root@ZZSRV1 Packages]# rpm -Uvhiscsi-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%]
[root@ZZSRV1 iscsi]# viminitiatorname.iscsi
将:InitiatorName=iqn.1994-05.com.redhat:e8ace8ef66dc
改为:InitiatorName=iqn.1994-05.com.redhat:Linux-test
[root@ZZSRV1 iscsi]# iscsiadm -m discovery-t sendtargets -p 192.168.188.128:3260
192.168.188.128:3260,0iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.Linux-test22-0 #[root@ZZSRV1iscsi]# iscsiadm -m node -p 192.168.188.128
# BEGIN RECORD 6.2.0.873-21
node.name =iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.Linux-test22-0
node.tpgt = 0
node.startup = automatic
node.leading_login = No
iface.hwaddress = <empty>
iface.ipaddress = <empty>
iface.iscsi_ifacename = default
iface.net_ifacename = <empty>
……………..
………………..
[root@ZZSRV1iscsi]#iscsiadm-mnode-Tiqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.Linux-test22-0-p 192.168.188.128:3260 -l
Logginginto[iface:default,target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.Linux-test22-0,portal:192.168.188.128,3260](multiple)iscsiadm:Couldnotloginto[iface:default,target:iqn.2000-03.com.falconstor-ipstor.FalconStor-CDPVA.Linux-test22-0,portal:192.168.188.128,326].
iscsiadm: initiator reported error (24 -iSCSI login failed due to authorization failure)
iscsiadm: Could not log into all portals
[root@ZZSRV1 iscsi]#
添加两块磁盘,重新启动
Fdisk �Cl 显示磁盘信息,就会看到新加的两块磁盘
[root@ZZSRV1 ~]# fdisk -l
Disk /dev/sda: 42.9 GB, 42949672960 bytes,83886080 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk label type: dos
Disk identifier: 0x000616f9
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 83886079 41430016 8e Linux LVM
Disk /dev/sdb: 21.5 GB, 21474836480 bytes,41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk /dev/sdc: 32.2 GB, 32212254720 bytes,62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk /dev/mapper/centos_zzsrv1-swap: 2181MB, 2181038080 bytes, 4259840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk /dev/mapper/centos_zzsrv1-root: 40.2GB, 40240152576 bytes, 78594048 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
将磁盘分区
[root@ZZSRV1 ~]# fdisk /dev/sdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, untilyou decide to write them.
Be careful before using the write command.
Device does not contain a recognizedpartition table
Building a new DOS disklabel with diskidentifier 0x2223d23d.
Command (m for help): n
Partition type:
p primary (0 primary, 0extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-41943039, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G}(2048-41943039, default 41943039):
Using default value 41943039
Partition 1 of type Linux and of size 20GiB is set
Command (m for help): p
Disk /dev/sdb: 21.5 GB, 21474836480 bytes,41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk label type: dos
Disk identifier: 0x2223d23d
Device Boot Start End Blocks Id System
/dev/sdb1 2048 41943039 20970496 83 Linux
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks
同样再将另一块磁盘分区
[root@ZZSRV1 ~]# fdisk /dev/sdc
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, untilyou decide to write them.
Be careful before using the write command.
Device does not contain a recognizedpartition table
Building a new DOS disklabel with diskidentifier 0xee00a7c2.
Command (m for help): n
Partition type:
p primary (0 primary, 0extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
First sector (2048-62914559, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G}(2048-62914559, default 62914559):
Using default value 62914559
Partition 1 of type Linux and of size 30GiB is set
Command (m for help): p
Disk /dev/sdc: 32.2 GB, 32212254720 bytes,62914560 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes /512 bytes
I/O size (minimum/optimal): 512 bytes / 512bytes
Disk label type: dos
Disk identifier: 0xee00a7c2
Device Boot Start End Blocks Id System
/dev/sdc1 2048 62914559 31456256 83 Linux
显示所有磁盘分区创建新磁盘物理卷
[root@ZZSRV1 ~]# ll /dev/sd*
brw-rw---- 1 root disk 8, 0 Aug 19 19:04 /dev/sda
brw-rw---- 1 root disk 8, 1 Aug 19 19:04 /dev/sda1
brw-rw---- 1 root disk 8, 2 Aug 19 19:04 /dev/sda2
brw-rw---- 1 root disk 8, 16 Aug 19 19:09/dev/sdb
brw-rw---- 1 root disk 8, 17 Aug 19 19:09/dev/sdb1
brw-rw---- 1 root disk 8, 32 Aug 19 19:11/dev/sdc
brw-rw---- 1 root disk 8, 33 Aug 19 19:11/dev/sdc1
[root@ZZSRV1 ~]# pvcreate /dev/sd[bc][1]
Physical volume "/dev/sdb1" successfully created
Physical volume "/dev/sdc1" successfully created
[root@ZZSRV1 ~]# vgcreate vgdata/dev/sd[bc]1
Volume group "vgdata" successfully created
[root@ZZSRV1 ~]# lvcreate -m1 -L 19.51G vgdata -n backupdlv /dev/sd[bc]1
Rounding up size to full physical extent 19.51 GiB
Logical volume "backupdlv" created
[root@ZZSRV1 ~]# lvs -a -o +devices
LV VG Attr LSize Pool Origin Data% Move LogCpy%Sync Convert Devices
root centos_zzsrv1-wi-ao---- 37.48g /dev/sda2(520)
swap centos_zzsrv1-wi-ao---- 2.03g /dev/sda2(0)
backupdlv vgdata rwi-a-r--- 19.51g 87.71 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)
格式化LV
[root@ZZSRV1 ~]# 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 thesuper user
First data block=0
Maximum filesystem blocks=2153775104
157 block groups
32768 blocks per group, 32768 fragments pergroup
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 filesystemaccounting information: done
挂载成功就明没问题了
[root@ZZSRV1 dev]# mkdir /ftp
[root@ZZSRV1 dev]# mount /dev/vg
vga_arbiter vgdata/
[root@ZZSRV1 dev]# mount/dev/vgdata/backupdlv /ftp