Guest User

Untitled

a guest
Dec 19th, 2011
102
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. $ cat /etc/tgt/targets.conf
  2. include /etc/tgt/temp/*.conf
  3. default-driver iscsi
  4. #<target priv.cross.mendrisio:crosrv04.notape>
  5. # allow-in-use yes
  6. # <backing-store /media/tgt/tapes/notape>
  7. # lun 1
  8. # device-type tape
  9. # removable 1
  10. # vendor_id "HP "
  11. # product_id "Ultrium 3-SCSI "
  12. # product_rev "D21W"
  13. # scsi_sn "HU012345AB"
  14. # scsi_id "HP LTO3 ULTRIUM"
  15. # </backing-store>
  16. #</target>
  17.  
  18.  
  19. # In this case, tapes are stored in the directory /media/tgt/vtl
  20. # size is in MB (1 GB in this case)
  21. # using the command
  22. # tgtimg --op=new --device-type=tape --barcode="A00000001" --size=400000 \
  23. # --type=data --file=/media/tgt/vtl/A00000001
  24. #
  25. # The tapes can be added after startup with
  26. # tgtadm --lld iscsi --mode logicalunit --op update --tid 1 --lun 4 \
  27. # --params element_type=2,address=1000,barcode=A00000001,sides=1
  28. # for slot 0 (is nr 1000)
  29. #
  30. # Please note that an MSL-2024 has no IMPORT/EXPORT elements (type 3)
  31.  
  32.  
  33. <target priv.galimberti:galtorage01.vtl>
  34. allow-in-use yes
  35. #
  36. # We need a backing store, although the tape drive will be empty,
  37. # so we create a dummy tape "cleaning" in directory /media/tgt/vtl
  38. # with the command
  39. # tgtimg --op=new --device-type=tape --barcode="" --size=1 --type=clean \
  40. # --file=/media/tgt/vtl/cleaning
  41. #
  42. <backing-store /media/tgt/vtl/cleaning>
  43. lun 1
  44. device-type tape
  45. removable 1
  46. vendor_id "HP "
  47. product_id "Ultrium 3-SCSI "
  48. product_rev "D21W"
  49. scsi_sn "HU012345AB"
  50. scsi_id "HP LTO3 ULTRIUM"
  51. </backing-store>
  52.  
  53. #
  54. # For the tape changer we need also a backing store, this can be a file
  55. # containing zeros, like this:
  56. # dd if=/dev/zero of=/media/tgt/smc bs=1k count=1
  57. #
  58. <backing-store /media/tgt/smc>
  59. lun 4
  60. device-type changer
  61. removable 1
  62. vendor_id "HP "
  63. product_id "MSL G3 Series "
  64. product_rev "3.00"
  65. scsi_sn "ABC01234G3"
  66. # Dummy 'page 0'
  67. mode_page "0:0:0"
  68. # Page 0x02: Disconnect/Reconnect SPC-3
  69. mode_page "0x02:0:14:0x80:0x80:0:0xa:0:0:0:0:0:0:0:0:0:0"
  70. # Page 0x1a: Power Condition SPC-3
  71. mode_page "0x1a:0:18:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
  72. # Page 0x1c: Informational Exceptions Control SPC-3
  73. mode_page "0x1c:0:10:8:0:0:0:0:0:0:0:0:0"
  74. # Page 0x1d: Element Address Assignment SMC-3 7.3.4
  75. mode_page "0x1d:0:0x12:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0:0"
  76. # Page 0x1e: Transport Geometry Parameters SMC-3 7.3.5
  77. mode_page "0x1e:0:2:0:0"
  78. # Page 0x1f: Device Capabilities SMC-3 7.3.2
  79. # Page 0x1f/Subpage 0x41: Extended Device Capabilities SMC-3 7.3.3
  80. mode_page "0x1f:0:0x12:0x0f:7:0x0f:0x0f:0x0f:0x0f:0:0:0:0:0x0f:0x0f:0x0f:0x0f:0:0:0:0"
  81. # Type 1: Medium Transport Elements (robot arm/picker)
  82. params element_type=1,start_address=1,quantity=1,media_home=/media/tgt/vtl
  83. # Type 2: Storage Elements (tape slots)
  84. params element_type=2,start_address=1000,quantity=24,media_home=/media/tgt/vtl
  85. # Type 4: Add Data Transfer devices (drives)
  86. params element_type=4,start_address=2,quantity=1,media_home=/media/tgt/vtl
  87. params element_type=4,address=2,tid=1,lun=1
  88. </backing-store>
  89. </target>
RAW Paste Data