11月個人指標

配置提供 iSCSI 服務,磁盤名爲 iqn.2018-04.com.example.groupX:system1, 並符合下列要求:  服務端口爲 3260 使用 iscsi_store 作其後端卷,其大小爲 3GiB  此服務只能被 system2.groupX.example.com 訪問
1)準備磁盤空間
[root@localhost ~]# parted /dev/sdb
(parted) mktable gpt //建立分區表
(parted) mkpart primary ext4 0 3GiB //添加指定大小的分區
(parted) quit
[root@localhost ~]# partprobe /dev/sdb
2)安裝、配置 iSCSI 磁盤
[root@localhost ~]# yum -y install targetcli
[root@localhost ~]# targetcli
/> ls
/> backstores/block create iscsi_store /dev/sdb1 //定義後端存儲
/> /iscsi create iqn.2018-04.com.example:serverX //創建 iqn 對象
/> /iscsi/iqn.2018-04.com.example:serverX/tpg1/acls create iqn.2018-04.com.example:desktopX //授權客戶機(的 IQN)
/> /iscsi/iqn.2018-04.com.example:serverX/tpg1/luns create /backstores/block/iscsi_store //綁定存儲
/> /iscsi/iqn.2018-04.com.example:serverX/tpg1/portals create 0.0.0.0 3260 //指定監聽地址(本機 IP 及端口)
/> saveconfig //保存配置結果
/> exit
[root@localhost ~]# systemctl restart target
[root@localhost ~]# systemctl enable target

11月個人指標
11月個人指標
11月個人指標
11月個人指標
11月個人指標
11月個人指標

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章