Bo's Oracle Station

查看: 1761|回复: 1

课程第19次:2020-03-16星期一

[复制链接]

1005

主题

1469

帖子

1万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
12012
发表于 2020-3-16 19:54:57 | 显示全部楼层 |阅读模式
1. iSCSI:

1.1 target:
  1. [root@classroom ~]# yum list "target*"
  2. Updating Subscription Management repositories.
  3. Unable to read consumer identity
  4. This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
  5. Last metadata expiration check: 1:24:39 ago on Mon 16 Mar 2020 07:23:38 PM CST.
  6. Available Packages
  7. target-restore.noarch                  2.1.fb69-3.el8                  BaseOS   
  8. targetcli.noarch                       2.1.fb49-1.el8                  AppStream
  9. [root@classroom ~]# yum -y install targetcli.noarch
  10. Updating Subscription Management repositories.
  11. Unable to read consumer identity
  12. This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
  13. Last metadata expiration check: 1:24:51 ago on Mon 16 Mar 2020 07:23:38 PM CST.
  14. Dependencies resolved.
  15. ================================================================================
  16. Package                 Arch       Version                 Repository     Size
  17. ================================================================================
  18. Installing:
  19. targetcli               noarch     2.1.fb49-1.el8          AppStream      73 k
  20. Installing dependencies:
  21. python3-configshell     noarch     1:1.1.fb25-1.el8        BaseOS         74 k
  22. python3-kmod            x86_64     0.9-20.el8              BaseOS         90 k
  23. python3-pyparsing       noarch     2.1.10-7.el8            BaseOS        142 k
  24. python3-rtslib          noarch     2.1.fb69-3.el8          BaseOS        100 k
  25. python3-urwid           x86_64     1.3.1-4.el8             BaseOS        783 k
  26. target-restore          noarch     2.1.fb69-3.el8          BaseOS         23 k

  27. Transaction Summary
  28. ================================================================================
  29. Install  7 Packages

  30. Total size: 1.3 M
  31. Installed size: 4.7 M
  32. Downloading Packages:
  33. Running transaction check
  34. Transaction check succeeded.
  35. Running transaction test
  36. Transaction test succeeded.
  37. Running transaction
  38.   Preparing        :                                                        1/1
  39.   Installing       : python3-urwid-1.3.1-4.el8.x86_64                       1/7
  40.   Installing       : python3-pyparsing-2.1.10-7.el8.noarch                  2/7
  41.   Installing       : python3-configshell-1:1.1.fb25-1.el8.noarch            3/7
  42.   Installing       : python3-kmod-0.9-20.el8.x86_64                         4/7
  43.   Installing       : python3-rtslib-2.1.fb69-3.el8.noarch                   5/7
  44.   Installing       : target-restore-2.1.fb69-3.el8.noarch                   6/7
  45.   Running scriptlet: target-restore-2.1.fb69-3.el8.noarch                   6/7
  46.   Installing       : targetcli-2.1.fb49-1.el8.noarch                        7/7
  47.   Running scriptlet: targetcli-2.1.fb49-1.el8.noarch                        7/7
  48.   Verifying        : targetcli-2.1.fb49-1.el8.noarch                        1/7
  49.   Verifying        : python3-configshell-1:1.1.fb25-1.el8.noarch            2/7
  50.   Verifying        : python3-kmod-0.9-20.el8.x86_64                         3/7
  51.   Verifying        : python3-pyparsing-2.1.10-7.el8.noarch                  4/7
  52.   Verifying        : python3-rtslib-2.1.fb69-3.el8.noarch                   5/7
  53.   Verifying        : python3-urwid-1.3.1-4.el8.x86_64                       6/7
  54.   Verifying        : target-restore-2.1.fb69-3.el8.noarch                   7/7
  55. Installed products updated.

  56. Installed:
  57.   targetcli-2.1.fb49-1.el8.noarch                                               
  58.   python3-configshell-1:1.1.fb25-1.el8.noarch                                   
  59.   python3-kmod-0.9-20.el8.x86_64                                                
  60.   python3-pyparsing-2.1.10-7.el8.noarch                                         
  61.   python3-rtslib-2.1.fb69-3.el8.noarch                                          
  62.   python3-urwid-1.3.1-4.el8.x86_64                                             
  63.   target-restore-2.1.fb69-3.el8.noarch                                          

  64. Complete!
  65. [root@classroom ~]# systemctl enable target
  66. Created symlink /etc/systemd/system/multi-user.target.wants/target.service → /usr/lib/systemd/system/target.service.
  67. [root@classroom ~]# firewall-cmd --permanet --add-port 3260/tcp
  68. usage: see firewall-cmd man page
  69. firewall-cmd: error: unrecognized arguments: --permanet
  70. [root@classroom ~]# firewall-cmd --permanent --add-port 3260/tcp
  71. FirewallD is not running
  72. [root@classroom ~]# targetcli  
  73. Warning: Could not load preferences file /root/.targetcli/prefs.bin.
  74. targetcli shell version 2.1.fb49
  75. Copyright 2011-2013 by Datera, Inc and others.
  76. For help on commands, type 'help'.

  77. /> ls
  78. o- / ..................................................................... [...]
  79.   o- backstores .......................................................... [...]
  80.   | o- block .............................................. [Storage Objects: 0]
  81.   | o- fileio ............................................. [Storage Objects: 0]
  82.   | o- pscsi .............................................. [Storage Objects: 0]
  83.   | o- ramdisk ............................................ [Storage Objects: 0]
  84.   o- iscsi ........................................................ [Targets: 0]
  85.   o- loopback ..................................................... [Targets: 0]
  86. /> cd backstores
  87. /backstores> ls
  88. o- backstores ............................................................ [...]
  89.   o- block ................................................ [Storage Objects: 0]
  90.   o- fileio ............................................... [Storage Objects: 0]
  91.   o- pscsi ................................................ [Storage Objects: 0]
  92.   o- ramdisk .............................................. [Storage Objects: 0]
  93. /backstores> cd block
  94. /backstores/block> help

  95. GENERALITIES
  96. ============
  97. This is a shell in which you can create, delete and configure
  98. configuration objects.

  99. The available commands depend on the current path or target
  100. path you want to run a command in: different path have
  101. different sets of available commands, i.e. a path pointing at
  102. an iscsi target will not have the same availaible commands as,
  103. say, a path pointing at a storage object.

  104. The prompt that starts each command line indicates your
  105. current path. Alternatively (useful if the prompt displays
  106. an abbreviated path to save space), you can run the
  107. pwd command to display the complete current path.

  108. Navigating the tree is done using the cd command. Without
  109. any argument, cd will present you with the full objects
  110. tree. Just use arrows to select the destination path, and
  111. enter will get you there. Please try help cd for navigation
  112. tips.

  113. COMMAND SYNTAX
  114. ==============
  115. Commands are built using the following syntax:

  116. [TARGET_PATH] COMMAND_NAME [OPTIONS]

  117. The TARGET_PATH indicates the path to run the command from.
  118. If ommited, the command will be run from your current path.

  119. The OPTIONS depend on the command. Please use help
  120. COMMAND to get more information.


  121. AVAILABLE COMMANDS
  122. ==================
  123. The following commands are available in the
  124. current path:

  125.   - bookmarks action [bookmark]
  126.   - cd [path]
  127.   - create name dev [readonly] [wwn]
  128.   - delete name [save]
  129.   - exit
  130.   - get [group] [parameter...]
  131.   - help [topic]
  132.   - ls [path] [depth]
  133.   - pwd
  134.   - refresh
  135.   - set [group] [parameter=value...]
  136.   - status
  137. /backstores/block>  create  shareddisk1 /dev/vol0/lv0
  138. Created block storage object shareddisk1 using /dev/vol0/lv0.
  139. /backstores/block> ls
  140. o- block .............................................................................. [Storage Objects: 1]
  141.   o- shareddisk1 .......................................... [/dev/vol0/lv0 (50.0GiB) write-thru deactivated]
  142.     o- alua ............................................................................... [ALUA Groups: 1]
  143.       o- default_tg_pt_gp ................................................... [ALUA state: Active/optimized]
  144. /backstores/block> cd ..
  145. /backstores> ls
  146. o- backstores ........................................................................................ [...]
  147.   o- block ............................................................................ [Storage Objects: 1]
  148.   | o- shareddisk1 ........................................ [/dev/vol0/lv0 (50.0GiB) write-thru deactivated]
  149.   |   o- alua ............................................................................. [ALUA Groups: 1]
  150.   |     o- default_tg_pt_gp ................................................. [ALUA state: Active/optimized]
  151.   o- fileio ........................................................................... [Storage Objects: 0]
  152.   o- pscsi ............................................................................ [Storage Objects: 0]
  153.   o- ramdisk .......................................................................... [Storage Objects: 0]
  154. /backstores> cd ..
  155. /> ls
  156. o- / ................................................................................................. [...]
  157.   o- backstores ...................................................................................... [...]
  158.   | o- block .......................................................................... [Storage Objects: 1]
  159.   | | o- shareddisk1 ...................................... [/dev/vol0/lv0 (50.0GiB) write-thru deactivated]
  160.   | |   o- alua ........................................................................... [ALUA Groups: 1]
  161.   | |     o- default_tg_pt_gp ............................................... [ALUA state: Active/optimized]
  162.   | o- fileio ......................................................................... [Storage Objects: 0]
  163.   | o- pscsi .......................................................................... [Storage Objects: 0]
  164.   | o- ramdisk ........................................................................ [Storage Objects: 0]
  165.   o- iscsi .................................................................................... [Targets: 0]
  166.   o- loopback ................................................................................. [Targets: 0]
  167. /> cd iscsi
  168. /iscsi> ls
  169. o- iscsi ...................................................................................... [Targets: 0]
  170. /iscsi> help

  171. GENERALITIES
  172. ============
  173. This is a shell in which you can create, delete and configure
  174. configuration objects.

  175. The available commands depend on the current path or target
  176. path you want to run a command in: different path have
  177. different sets of available commands, i.e. a path pointing at
  178. an iscsi target will not have the same availaible commands as,
  179. say, a path pointing at a storage object.

  180. The prompt that starts each command line indicates your
  181. current path. Alternatively (useful if the prompt displays
  182. an abbreviated path to save space), you can run the
  183. pwd command to display the complete current path.

  184. Navigating the tree is done using the cd command. Without
  185. any argument, cd will present you with the full objects
  186. tree. Just use arrows to select the destination path, and
  187. enter will get you there. Please try help cd for navigation
  188. tips.

  189. COMMAND SYNTAX
  190. ==============
  191. Commands are built using the following syntax:

  192. [TARGET_PATH] COMMAND_NAME [OPTIONS]

  193. The TARGET_PATH indicates the path to run the command from.
  194. If ommited, the command will be run from your current path.

  195. The OPTIONS depend on the command. Please use help
  196. COMMAND to get more information.


  197. AVAILABLE COMMANDS
  198. ==================
  199. The following commands are available in the
  200. current path:

  201.   - bookmarks action [bookmark]
  202.   - cd [path]
  203.   - create [wwn]
  204.   - delete wwn
  205.   - exit
  206.   - get [group] [parameter...]
  207.   - help [topic]
  208.   - info
  209.   - ls [path] [depth]
  210.   - pwd
  211.   - refresh
  212.   - set [group] [parameter=value...]
  213.   - status
  214.   - version
  215. /iscsi> create  iqn.2020-03.com.example.classroom:shareddisk1
  216. Created target iqn.2020-03.com.example.classroom:shareddisk1.
  217. Created TPG 1.
  218. Global pref auto_add_default_portal=true
  219. Created default portal listening on all IPs (0.0.0.0), port 3260.
  220. /iscsi> ls
  221. o- iscsi ...................................................................................... [Targets: 1]
  222.   o- iqn.2020-03.com.example.classroom:shareddisk1 ............................................... [TPGs: 1]
  223.     o- tpg1 ......................................................................... [no-gen-acls, no-auth]
  224.       o- acls .................................................................................... [ACLs: 0]
  225.       o- luns .................................................................................... [LUNs: 0]
  226.       o- portals .............................................................................. [Portals: 1]
  227.         o- 0.0.0.0:3260 ............................................................................... [OK]
  228. /iscsi> cd
  229. <                                               >                                               
  230. @last                                           iqn.2020-03.com.example.classroom:shareddisk1/  
  231. path=                                          
  232. /iscsi> cd iqn.2020-03.com.example.classroom:shareddisk1/tpg1/
  233. iqn.2020-03.com.example.classroom:shareddisk1/tpg1/acls/     
  234. iqn.2020-03.com.example.classroom:shareddisk1/tpg1/luns/     
  235. iqn.2020-03.com.example.classroom:shareddisk1/tpg1/portals/  
  236. /iscsi> cd iqn.2020-03.com.example.classroom:shareddisk1/tpg1/
  237. /iscsi/iqn.20...reddisk1/tpg1> ls
  238. o- tpg1 ............................................................................. [no-gen-acls, no-auth]
  239.   o- acls ........................................................................................ [ACLs: 0]
  240.   o- luns ........................................................................................ [LUNs: 0]
  241.   o- portals .................................................................................. [Portals: 1]
  242.     o- 0.0.0.0:3260 ................................................................................... [OK]
  243. /iscsi/iqn.20...reddisk1/tpg1> cd acls
  244. /iscsi/iqn.20...sk1/tpg1/acls> ls
  245. o- acls .......................................................................................... [ACLs: 0]
  246. /iscsi/iqn.20...sk1/tpg1/acls> help

  247. GENERALITIES
  248. ============
  249. This is a shell in which you can create, delete and configure
  250. configuration objects.

  251. The available commands depend on the current path or target
  252. path you want to run a command in: different path have
  253. different sets of available commands, i.e. a path pointing at
  254. an iscsi target will not have the same availaible commands as,
  255. say, a path pointing at a storage object.

  256. The prompt that starts each command line indicates your
  257. current path. Alternatively (useful if the prompt displays
  258. an abbreviated path to save space), you can run the
  259. pwd command to display the complete current path.

  260. Navigating the tree is done using the cd command. Without
  261. any argument, cd will present you with the full objects
  262. tree. Just use arrows to select the destination path, and
  263. enter will get you there. Please try help cd for navigation
  264. tips.

  265. COMMAND SYNTAX
  266. ==============
  267. Commands are built using the following syntax:

  268. [TARGET_PATH] COMMAND_NAME [OPTIONS]

  269. The TARGET_PATH indicates the path to run the command from.
  270. If ommited, the command will be run from your current path.

  271. The OPTIONS depend on the command. Please use help
  272. COMMAND to get more information.


  273. AVAILABLE COMMANDS
  274. ==================
  275. The following commands are available in the
  276. current path:

  277.   - bookmarks action [bookmark]
  278.   - cd [path]
  279.   - create wwn [add_mapped_luns]
  280.   - delete wwn
  281.   - exit
  282.   - get [group] [parameter...]
  283.   - help [topic]
  284.   - ls [path] [depth]
  285.   - pwd
  286.   - refresh
  287.   - set [group] [parameter=value...]
  288.   - status
  289.   - tag wwn_or_tag new_tag
  290.   - untag wwn_or_tag
  291. /iscsi/iqn.20...sk1/tpg1/acls> create iqn.2020-03.com.example.server5:shareddisk1
  292. Created Node ACL for iqn.2020-03.com.example.server5:shareddisk1
  293. /iscsi/iqn.20...sk1/tpg1/acls> create iqn.2020-03.com.example.server4:shareddisk1
  294. Created Node ACL for iqn.2020-03.com.example.server4:shareddisk1
  295. /iscsi/iqn.20...sk1/tpg1/acls> ls
  296. o- acls .......................................................................................... [ACLs: 2]
  297.   o- iqn.2020-03.com.example.server4:shareddisk1 .......................................... [Mapped LUNs: 0]
  298.   o- iqn.2020-03.com.example.server5:shareddisk1 .......................................... [Mapped LUNs: 0]
  299. /iscsi/iqn.20...sk1/tpg1/acls> cd ..
  300. /iscsi/iqn.20...reddisk1/tpg1> ls
  301. o- tpg1 ............................................................................. [no-gen-acls, no-auth]
  302.   o- acls ........................................................................................ [ACLs: 2]
  303.   | o- iqn.2020-03.com.example.server4:shareddisk1 ........................................ [Mapped LUNs: 0]
  304.   | o- iqn.2020-03.com.example.server5:shareddisk1 ........................................ [Mapped LUNs: 0]
  305.   o- luns ........................................................................................ [LUNs: 0]
  306.   o- portals .................................................................................. [Portals: 1]
  307.     o- 0.0.0.0:3260 ................................................................................... [OK]
  308. /iscsi/iqn.20...reddisk1/tpg1> cd  luns
  309. /iscsi/iqn.20...sk1/tpg1/luns> ls
  310. o- luns .......................................................................................... [LUNs: 0]
  311. /iscsi/iqn.20...sk1/tpg1/luns> ls
  312. o- luns .......................................................................................... [LUNs: 0]
  313. /iscsi/iqn.20...sk1/tpg1/luns> help

  314. GENERALITIES
  315. ============
  316. This is a shell in which you can create, delete and configure
  317. configuration objects.

  318. The available commands depend on the current path or target
  319. path you want to run a command in: different path have
  320. different sets of available commands, i.e. a path pointing at
  321. an iscsi target will not have the same availaible commands as,
  322. say, a path pointing at a storage object.

  323. The prompt that starts each command line indicates your
  324. current path. Alternatively (useful if the prompt displays
  325. an abbreviated path to save space), you can run the
  326. pwd command to display the complete current path.

  327. Navigating the tree is done using the cd command. Without
  328. any argument, cd will present you with the full objects
  329. tree. Just use arrows to select the destination path, and
  330. enter will get you there. Please try help cd for navigation
  331. tips.

  332. COMMAND SYNTAX
  333. ==============
  334. Commands are built using the following syntax:

  335. [TARGET_PATH] COMMAND_NAME [OPTIONS]

  336. The TARGET_PATH indicates the path to run the command from.
  337. If ommited, the command will be run from your current path.

  338. The OPTIONS depend on the command. Please use help
  339. COMMAND to get more information.


  340. AVAILABLE COMMANDS
  341. ==================
  342. The following commands are available in the
  343. current path:

  344.   - bookmarks action [bookmark]
  345.   - cd [path]
  346.   - create storage_object [lun] [add_mapped_luns]
  347.   - delete lun
  348.   - exit
  349.   - get [group] [parameter...]
  350.   - help [topic]
  351.   - ls [path] [depth]
  352.   - pwd
  353.   - refresh
  354.   - set [group] [parameter=value...]
  355.   - status
  356. /iscsi/iqn.20...sk1/tpg1/luns> create  /dev/vol0/lv0
  357. storage object or path not valid
  358. /iscsi/iqn.20...sk1/tpg1/luns> create shareddisk1
  359. storage object or path not valid
  360. /iscsi/iqn.20...sk1/tpg1/luns> create  /backstores/block/shareddisk1
  361. Created LUN 0.
  362. Created LUN 0->0 mapping in node ACL iqn.2020-03.com.example.server4:shareddisk1
  363. Created LUN 0->0 mapping in node ACL iqn.2020-03.com.example.server5:shareddisk1
  364. /iscsi/iqn.20...sk1/tpg1/luns> ls
  365. o- luns .......................................................................................... [LUNs: 1]
  366.   o- lun0 ........................................... [block/shareddisk1 (/dev/vol0/lv0) (default_tg_pt_gp)]
  367. /iscsi/iqn.20...sk1/tpg1/luns> cd ..
  368. /iscsi/iqn.20...reddisk1/tpg1> ls
  369. o- tpg1 ............................................................................. [no-gen-acls, no-auth]
  370.   o- acls ........................................................................................ [ACLs: 2]
  371.   | o- iqn.2020-03.com.example.server4:shareddisk1 ........................................ [Mapped LUNs: 1]
  372.   | | o- mapped_lun0 ......................................................... [lun0 block/shareddisk1 (rw)]
  373.   | o- iqn.2020-03.com.example.server5:shareddisk1 ........................................ [Mapped LUNs: 1]
  374.   |   o- mapped_lun0 ......................................................... [lun0 block/shareddisk1 (rw)]
  375.   o- luns ........................................................................................ [LUNs: 1]
  376.   | o- lun0 ......................................... [block/shareddisk1 (/dev/vol0/lv0) (default_tg_pt_gp)]
  377.   o- portals .................................................................................. [Portals: 1]
  378.     o- 0.0.0.0:3260 ................................................................................... [OK]
  379. /iscsi/iqn.20...reddisk1/tpg1> cd portals
  380. /iscsi/iqn.20.../tpg1/portals> ls
  381. o- portals .................................................................................... [Portals: 1]
  382.   o- 0.0.0.0:3260 ..................................................................................... [OK]
  383. /iscsi/iqn.20.../tpg1/portals> help

  384. GENERALITIES
  385. ============
  386. This is a shell in which you can create, delete and configure
  387. configuration objects.

  388. The available commands depend on the current path or target
  389. path you want to run a command in: different path have
  390. different sets of available commands, i.e. a path pointing at
  391. an iscsi target will not have the same availaible commands as,
  392. say, a path pointing at a storage object.

  393. The prompt that starts each command line indicates your
  394. current path. Alternatively (useful if the prompt displays
  395. an abbreviated path to save space), you can run the
  396. pwd command to display the complete current path.

  397. Navigating the tree is done using the cd command. Without
  398. any argument, cd will present you with the full objects
  399. tree. Just use arrows to select the destination path, and
  400. enter will get you there. Please try help cd for navigation
  401. tips.

  402. COMMAND SYNTAX
  403. ==============
  404. Commands are built using the following syntax:

  405. [TARGET_PATH] COMMAND_NAME [OPTIONS]

  406. The TARGET_PATH indicates the path to run the command from.
  407. If ommited, the command will be run from your current path.

  408. The OPTIONS depend on the command. Please use help
  409. COMMAND to get more information.


  410. AVAILABLE COMMANDS
  411. ==================
  412. The following commands are available in the
  413. current path:

  414.   - bookmarks action [bookmark]
  415.   - cd [path]
  416.   - create [ip_address] [ip_port]
  417.   - delete ip_address ip_port
  418.   - exit
  419.   - get [group] [parameter...]
  420.   - help [topic]
  421.   - ls [path] [depth]
  422.   - pwd
  423.   - refresh
  424.   - set [group] [parameter=value...]
  425.   - status
  426. /iscsi/iqn.20.../tpg1/portals> delete 0.0.0.0 3260
  427. Deleted network portal 0.0.0.0:3260
  428. /iscsi/iqn.20.../tpg1/portals> create 192.168.0.254 3260
  429. Using default IP port 3260
  430. Created network portal 192.168.0.254:3260.
  431. /iscsi/iqn.20.../tpg1/portals> ls
  432. o- portals .................................................................................... [Portals: 1]
  433.   o- 192.168.0.254:3260 ............................................................................... [OK]
  434. /iscsi/iqn.20.../tpg1/portals> cd /
  435. /> ls
  436. o- / ................................................................................................. [...]
  437.   o- backstores ...................................................................................... [...]
  438.   | o- block .......................................................................... [Storage Objects: 1]
  439.   | | o- shareddisk1 ........................................ [/dev/vol0/lv0 (50.0GiB) write-thru activated]
  440.   | |   o- alua ........................................................................... [ALUA Groups: 1]
  441.   | |     o- default_tg_pt_gp ............................................... [ALUA state: Active/optimized]
  442.   | o- fileio ......................................................................... [Storage Objects: 0]
  443.   | o- pscsi .......................................................................... [Storage Objects: 0]
  444.   | o- ramdisk ........................................................................ [Storage Objects: 0]
  445.   o- iscsi .................................................................................... [Targets: 1]
  446.   | o- iqn.2020-03.com.example.classroom:shareddisk1 ............................................. [TPGs: 1]
  447.   |   o- tpg1 ....................................................................... [no-gen-acls, no-auth]
  448.   |     o- acls .................................................................................. [ACLs: 2]
  449.   |     | o- iqn.2020-03.com.example.server4:shareddisk1 .................................. [Mapped LUNs: 1]
  450.   |     | | o- mapped_lun0 ................................................... [lun0 block/shareddisk1 (rw)]
  451.   |     | o- iqn.2020-03.com.example.server5:shareddisk1 .................................. [Mapped LUNs: 1]
  452.   |     |   o- mapped_lun0 ................................................... [lun0 block/shareddisk1 (rw)]
  453.   |     o- luns .................................................................................. [LUNs: 1]
  454.   |     | o- lun0 ................................... [block/shareddisk1 (/dev/vol0/lv0) (default_tg_pt_gp)]
  455.   |     o- portals ............................................................................ [Portals: 1]
  456.   |       o- 192.168.0.254:3260 ....................................................................... [OK]
  457.   o- loopback ................................................................................. [Targets: 0]
  458. /> quit
  459. Command not found quit
  460. /> exit
  461. Global pref auto_save_on_exit=true
  462. Configuration saved to /etc/target/saveconfig.json
  463. [root@classroom ~]# systemctl restart target
  464. [root@classroom ~]#
复制代码


1.2 initiator:
  1. [root@server5 iscsi]# systemctl enable iscsi
  2. [root@server5 iscsi]# systemctl enable iscsd
  3. Failed to enable unit: Unit file iscsd.service does not exist.
  4. [root@server5 iscsi]# systemctl enable iscsid
  5. Created symlink /etc/systemd/system/multi-user.target.wants/iscsid.service → /usr/lib/systemd/system/iscsid.service.
  6. [root@server5 iscsi]# systemctl restart iscsid
  7. [root@server5 iscsi]# systemctl restart iscsi
  8. [root@server5 iscsi]# cat /proc/partitions
  9. major minor  #blocks  name

  10.    8        0   52428800 sda
  11.    8        1     307200 sda1
  12.    8        2   18944000 sda2
  13.    8        3    1048576 sda3
  14.    8        4   32128000 sda4
  15.   11        0    1048575 sr0
  16. 253        0   51064832 dm-0
  17. [root@server5 iscsi]# iscsiadm -m discovery -t sendtargets -p classroom.example.com:3260
  18. 192.168.0.254:3260,1 iqn.2020-03.com.example.classroom:shareddisk1
  19. [root@server5 iscsi]# iscsiadm  -m node -T iqn.2020-03.com.example.classroom:shareddisk1  --login
  20. Logging in to [iface: default, target: iqn.2020-03.com.example.classroom:shareddisk1, portal: 192.168.0.254,3260] (multiple)
  21. Login to [iface: default, target: iqn.2020-03.com.example.classroom:shareddisk1, portal: 192.168.0.254,3260] successful.
  22. [root@server5 iscsi]# cat /proc/partitions
  23. major minor  #blocks  name

  24.    8        0   52428800 sda
  25.    8        1     307200 sda1
  26.    8        2   18944000 sda2
  27.    8        3    1048576 sda3
  28.    8        4   32128000 sda4
  29.   11        0    1048575 sr0
  30. 253        0   51064832 dm-0
  31.    8       16   52424704 sdb
  32.    8       17          1 sdb1
  33.    8       21    4764672 sdb5
  34.    8       22    4764672 sdb6
  35.    8       23    4764672 sdb7
  36.    8       24    4764672 sdb8
  37.    8       25    4764672 sdb9
  38.    8       26    4764672 sdb10
  39.    8       27    4764672 sdb11
  40.    8       28    4764672 sdb12
  41.    8       29    4764672 sdb13
  42.    8       30    4764672 sdb14
  43.    8       31    4764672 sdb15
  44. [root@server5 iscsi]# iscsiadm  -m node -T iqn.2020-03.com.example.classroom:shareddisk1  --logout
  45. Logging out of session [sid: 1, target: iqn.2020-03.com.example.classroom:shareddisk1, portal: 192.168.0.254,3260]
  46. Logout of [sid: 1, target: iqn.2020-03.com.example.classroom:shareddisk1, portal: 192.168.0.254,3260] successful.
  47. [root@server5 iscsi]# cat /proc/partitions
  48. major minor  #blocks  name

  49.    8        0   52428800 sda
  50.    8        1     307200 sda1
  51.    8        2   18944000 sda2
  52.    8        3    1048576 sda3
  53.    8        4   32128000 sda4
  54.   11        0    1048575 sr0
  55. 253        0   51064832 dm-0
  56. [root@server5 iscsi]# iscsiadm  -m node -T iqn.2020-03.com.example.classroom:shareddisk1  --login
  57. Logging in to [iface: default, target: iqn.2020-03.com.example.classroom:shareddisk1, portal: 192.168.0.254,3260] (multiple)
  58. Login to [iface: default, target: iqn.2020-03.com.example.classroom:shareddisk1, portal: 192.168.0.254,3260] successful.
  59. [root@server5 iscsi]# isc
  60. isc-hmac-fixup  iscsiadm        iscsid          iscsi-iname     iscsistart      iscsiuio        
  61. [root@server5 iscsi]# iscsiadm  -m session -P 7
  62. iscsiadm: Invalid info level 7. Try 0 - 3.
  63. [root@server5 iscsi]# iscsiadm  -m session -P 3
  64. iSCSI Transport Class version 2.0-870
  65. version 6.2.0.876-5
  66. Target: iqn.2020-03.com.example.classroom:shareddisk1 (non-flash)
  67.         Current Portal: 192.168.0.254:3260,1
  68.         Persistent Portal: 192.168.0.254:3260,1
  69.                 **********
  70.                 Interface:
  71.                 **********
  72.                 Iface Name: default
  73.                 Iface Transport: tcp
  74.                 Iface Initiatorname: iqn.2020-03.com.example.server5:shareddisk1
  75.                 Iface IPaddress: 192.168.0.105
  76.                 Iface HWaddress: default
  77.                 Iface Netdev: default
  78.                 SID: 2
  79.                 iSCSI Connection State: LOGGED IN
  80.                 iSCSI Session State: LOGGED_IN
  81.                 Internal iscsid Session State: NO CHANGE
  82.                 *********
  83.                 Timeouts:
  84.                 *********
  85.                 Recovery Timeout: 120
  86.                 Target Reset Timeout: 30
  87.                 LUN Reset Timeout: 30
  88.                 Abort Timeout: 15
  89.                 *****
  90.                 CHAP:
  91.                 *****
  92.                 username: <empty>
  93.                 password: ********
  94.                 username_in: <empty>
  95.                 password_in: ********
  96.                 ************************
  97.                 Negotiated iSCSI params:
  98.                 ************************
  99.                 HeaderDigest: None
  100.                 DataDigest: None
  101.                 MaxRecvDataSegmentLength: 262144
  102.                 MaxXmitDataSegmentLength: 262144
  103.                 FirstBurstLength: 65536
  104.                 MaxBurstLength: 262144
  105.                 ImmediateData: Yes
  106.                 InitialR2T: Yes
  107.                 MaxOutstandingR2T: 1
  108.                 ************************
  109.                 Attached SCSI devices:
  110.                 ************************
  111.                 Host Number: 33 State: running
  112.                 scsi33 Channel 00 Id 0 Lun: 0
  113.                         Attached scsi disk sdb          State: running
  114. [root@server5 iscsi]#
复制代码

oracle-rhel8.zip (1.57 KB, 下载次数: 62)
回复

使用道具 举报

7

主题

29

帖子

117

积分

注册会员

Rank: 2

积分
117
发表于 2020-3-16 22:14:49 | 显示全部楼层
md5:a2231d62e00a52bcfd7c70be8318fc62
已经转码

oracle-rhel8.zip

1.58 KB, 下载次数: 53

回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|Bo's Oracle Station   

GMT+8, 2024-12-4 01:39 , Processed in 0.042231 second(s), 27 queries .

快速回复 返回顶部 返回列表