LINUX 如何架设ISCSI服务器
发布网友
发布时间:2022-04-29 08:29
我来回答
共1个回答
热心网友
时间:2023-10-13 13:58
三种存储网络:
DAS:本地存储网络。【本地磁盘】
SAN:存储域网络。
【光纤信道|以太网通道】
NAS:网络系统文件。【普通协议】
Iscsi:scsi
over
tcp/ip上的,物理层:GB以太网卡
数据链路层:MAC
网络层:IP
传输层:3260
共享方式:采用DD的方式新建一个镜像盘,单一设备,完整磁盘,单一分区,LVM,可以是SAN网络。
查看安装:
[root@wmm
~]#
rpm
-aq|grep
scsi-target-utils【服务器端】
scsi-target-utils-1.0.24-2.el6.x86_64
[root@wmm
~]#
rpm
-aq|grep
scsi-initial-utils
[root@wmm
~]#
yum
-y
install
scsi-initial-utils
采用文件镜像作为iscsi-target
[root@wmm
~]#
dd
if=/dev/zero
of=/srv/iscsi/disk1.img
bs=1M
count=500
记录了500+0
的读入
记录了500+0
的写出
524288000字节(524
MB)已复制,13.4097
秒,39.1
MB/秒
[root@wmm
~]#
fdisk
/dev/sdb
WARNING:
DOS-compatible
mode
is
deprecated.
It's
strongly
recommended
to
switch
off
the
mode
(command
'c')
and
change
display
units
to
sectors
(command
'u').
Command
(m
for
help):
n
Command
action
e
extended
p
primary
partition
(1-4)
p
Partition
number
(1-4):
1
First
cylinder
(1-2610,
default
1):
Using
default
value
1
Last
cylinder,
+cylinders
or
+size{K,M,G}
(1-2610,
default
2610):
+1000M
Command
(m
for
help):
wq
The
partition
table
has
been
altered!
Calling
ioctl()
to
re-read
partition
table.
Syncing
disks.
[root@wmm
~]#
partprobe【更新到内核中】
Warning:
WARNING:
the
kernel
failed
to
re-read
the
partition
table
on
/dev/sda
(设备或资源忙).
As
a
result,
it
may
not
reflect
all
of
your
changes
until
after
reboot.
创建LV
[root@wmm
~]#
partprobe
Warning:
WARNING:
the
kernel
failed
to
re-read
the
partition
table
on
/dev/sda
(设备或资源忙).
As
a
result,
it
may
not
reflect
all
of
your
changes
until
after
reboot.
[root@wmm
~]#
pvcreate
/dev/sdb1
Writing
physical
volume
data
to
disk
"/dev/sdb1"
Physical
volume
"/dev/sdb1"
successfully
created
创建VG
[root@wmm
~]#
vgcreate
server
/dev/sdb1
Volume
group
"server"
successfully
created
创建LV
[root@wmm
~]#
lvcreate
-L
1G
-n
iscsi01
server【可以采用500PE】
[root@wmm
~]#
service
iptables
stop
iptables:清除防火墙规则:
[确定]
iptables:将链设置为*
ACCEPT:nat
mangle
filter
[确定]
iptables:正在卸载模块:
编辑配置文件:
[root@wmm
~]#
vim
/etc/tgt/targets.conf
热心网友
时间:2023-10-13 13:58
三种存储网络:
DAS:本地存储网络。【本地磁盘】
SAN:存储域网络。
【光纤信道|以太网通道】
NAS:网络系统文件。【普通协议】
Iscsi:scsi
over
tcp/ip上的,物理层:GB以太网卡
数据链路层:MAC
网络层:IP
传输层:3260
共享方式:采用DD的方式新建一个镜像盘,单一设备,完整磁盘,单一分区,LVM,可以是SAN网络。
查看安装:
[root@wmm
~]#
rpm
-aq|grep
scsi-target-utils【服务器端】
scsi-target-utils-1.0.24-2.el6.x86_64
[root@wmm
~]#
rpm
-aq|grep
scsi-initial-utils
[root@wmm
~]#
yum
-y
install
scsi-initial-utils
采用文件镜像作为iscsi-target
[root@wmm
~]#
dd
if=/dev/zero
of=/srv/iscsi/disk1.img
bs=1M
count=500
记录了500+0
的读入
记录了500+0
的写出
524288000字节(524
MB)已复制,13.4097
秒,39.1
MB/秒
[root@wmm
~]#
fdisk
/dev/sdb
WARNING:
DOS-compatible
mode
is
deprecated.
It's
strongly
recommended
to
switch
off
the
mode
(command
'c')
and
change
display
units
to
sectors
(command
'u').
Command
(m
for
help):
n
Command
action
e
extended
p
primary
partition
(1-4)
p
Partition
number
(1-4):
1
First
cylinder
(1-2610,
default
1):
Using
default
value
1
Last
cylinder,
+cylinders
or
+size{K,M,G}
(1-2610,
default
2610):
+1000M
Command
(m
for
help):
wq
The
partition
table
has
been
altered!
Calling
ioctl()
to
re-read
partition
table.
Syncing
disks.
[root@wmm
~]#
partprobe【更新到内核中】
Warning:
WARNING:
the
kernel
failed
to
re-read
the
partition
table
on
/dev/sda
(设备或资源忙).
As
a
result,
it
may
not
reflect
all
of
your
changes
until
after
reboot.
创建LV
[root@wmm
~]#
partprobe
Warning:
WARNING:
the
kernel
failed
to
re-read
the
partition
table
on
/dev/sda
(设备或资源忙).
As
a
result,
it
may
not
reflect
all
of
your
changes
until
after
reboot.
[root@wmm
~]#
pvcreate
/dev/sdb1
Writing
physical
volume
data
to
disk
"/dev/sdb1"
Physical
volume
"/dev/sdb1"
successfully
created
创建VG
[root@wmm
~]#
vgcreate
server
/dev/sdb1
Volume
group
"server"
successfully
created
创建LV
[root@wmm
~]#
lvcreate
-L
1G
-n
iscsi01
server【可以采用500PE】
[root@wmm
~]#
service
iptables
stop
iptables:清除防火墙规则:
[确定]
iptables:将链设置为*
ACCEPT:nat
mangle
filter
[确定]
iptables:正在卸载模块:
编辑配置文件:
[root@wmm
~]#
vim
/etc/tgt/targets.conf
热心网友
时间:2023-10-13 13:58
三种存储网络:
DAS:本地存储网络。【本地磁盘】
SAN:存储域网络。
【光纤信道|以太网通道】
NAS:网络系统文件。【普通协议】
Iscsi:scsi
over
tcp/ip上的,物理层:GB以太网卡
数据链路层:MAC
网络层:IP
传输层:3260
共享方式:采用DD的方式新建一个镜像盘,单一设备,完整磁盘,单一分区,LVM,可以是SAN网络。
查看安装:
[root@wmm
~]#
rpm
-aq|grep
scsi-target-utils【服务器端】
scsi-target-utils-1.0.24-2.el6.x86_64
[root@wmm
~]#
rpm
-aq|grep
scsi-initial-utils
[root@wmm
~]#
yum
-y
install
scsi-initial-utils
采用文件镜像作为iscsi-target
[root@wmm
~]#
dd
if=/dev/zero
of=/srv/iscsi/disk1.img
bs=1M
count=500
记录了500+0
的读入
记录了500+0
的写出
524288000字节(524
MB)已复制,13.4097
秒,39.1
MB/秒
[root@wmm
~]#
fdisk
/dev/sdb
WARNING:
DOS-compatible
mode
is
deprecated.
It's
strongly
recommended
to
switch
off
the
mode
(command
'c')
and
change
display
units
to
sectors
(command
'u').
Command
(m
for
help):
n
Command
action
e
extended
p
primary
partition
(1-4)
p
Partition
number
(1-4):
1
First
cylinder
(1-2610,
default
1):
Using
default
value
1
Last
cylinder,
+cylinders
or
+size{K,M,G}
(1-2610,
default
2610):
+1000M
Command
(m
for
help):
wq
The
partition
table
has
been
altered!
Calling
ioctl()
to
re-read
partition
table.
Syncing
disks.
[root@wmm
~]#
partprobe【更新到内核中】
Warning:
WARNING:
the
kernel
failed
to
re-read
the
partition
table
on
/dev/sda
(设备或资源忙).
As
a
result,
it
may
not
reflect
all
of
your
changes
until
after
reboot.
创建LV
[root@wmm
~]#
partprobe
Warning:
WARNING:
the
kernel
failed
to
re-read
the
partition
table
on
/dev/sda
(设备或资源忙).
As
a
result,
it
may
not
reflect
all
of
your
changes
until
after
reboot.
[root@wmm
~]#
pvcreate
/dev/sdb1
Writing
physical
volume
data
to
disk
"/dev/sdb1"
Physical
volume
"/dev/sdb1"
successfully
created
创建VG
[root@wmm
~]#
vgcreate
server
/dev/sdb1
Volume
group
"server"
successfully
created
创建LV
[root@wmm
~]#
lvcreate
-L
1G
-n
iscsi01
server【可以采用500PE】
[root@wmm
~]#
service
iptables
stop
iptables:清除防火墙规则:
[确定]
iptables:将链设置为*
ACCEPT:nat
mangle
filter
[确定]
iptables:正在卸载模块:
编辑配置文件:
[root@wmm
~]#
vim
/etc/tgt/targets.conf