€•ê!Œsphinx.addnodes”Œdocument”“”)”}”(Œ rawsource”Œ”Œchildren”]”(Œ translations”Œ LanguagesNode”“”)”}”(hhh]”(hŒ pending_xref”“”)”}”(hhh]”Œdocutils.nodes”ŒText”“”ŒChinese (Simplified)”…””}”Œparent”hsbaŒ attributes”}”(Œids”]”Œclasses”]”Œnames”]”Œdupnames”]”Œbackrefs”]”Œ refdomain”Œstd”Œreftype”Œdoc”Œ reftarget”Œ"/translations/zh_CN/target/scripts”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/zh_TW/target/scripts”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/it_IT/target/scripts”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ja_JP/target/scripts”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/ko_KR/target/scripts”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ"/translations/sp_SP/target/scripts”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubeh}”(h]”h ]”h"]”h$]”h&]”Œcurrent_language”ŒEnglish”uh1h hhŒ _document”hŒsource”NŒline”NubhŒsection”“”)”}”(hhh]”(hŒtitle”“”)”}”(hŒTarget export device script”h]”hŒTarget export device script”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒ # print_usage() { cat < $BACKSTORE_DIR/control else BACKSTORE_DIR=$CORE_DIR/fileio_0/data mkdir -p $BACKSTORE_DIR DEVICE_SIZE=$(du -b $DEVICE | cut -f1) echo "fd_dev_name=${DEVICE}" > $BACKSTORE_DIR/control echo "fd_dev_size=${DEVICE_SIZE}" > $BACKSTORE_DIR/control echo 1 > $BACKSTORE_DIR/attrib/emulate_write_cache fi echo 1 > $BACKSTORE_DIR/enable # Create an iSCSI target and a target portal group (TPG) mkdir $ISCSI_DIR/$IQN mkdir $ISCSI_DIR/$IQN/tpgt_1/ # Create a LUN mkdir $ISCSI_DIR/$IQN/tpgt_1/lun/lun_0 ln -s $BACKSTORE_DIR $ISCSI_DIR/$IQN/tpgt_1/lun/lun_0/data echo 1 > $ISCSI_DIR/$IQN/tpgt_1/enable # Create a network portal mkdir $ISCSI_DIR/$IQN/tpgt_1/np/$PORTAL # Disable authentication echo 0 > $ISCSI_DIR/$IQN/tpgt_1/attrib/authentication echo 1 > $ISCSI_DIR/$IQN/tpgt_1/attrib/generate_node_acls # Allow write access for non authenticated initiators echo 0 > $ISCSI_DIR/$IQN/tpgt_1/attrib/demo_mode_write_protect echo "Target ${IQN}, portal ${PORTAL} has been created" ”h]”hXú#!/bin/sh # # This script illustrates the sequence of operations in configfs to # create a very simple LIO iSCSI target with a file or block device # backstore. # # (C) Copyright 2014 Christophe Vu-Brugier # print_usage() { cat < $BACKSTORE_DIR/control else BACKSTORE_DIR=$CORE_DIR/fileio_0/data mkdir -p $BACKSTORE_DIR DEVICE_SIZE=$(du -b $DEVICE | cut -f1) echo "fd_dev_name=${DEVICE}" > $BACKSTORE_DIR/control echo "fd_dev_size=${DEVICE_SIZE}" > $BACKSTORE_DIR/control echo 1 > $BACKSTORE_DIR/attrib/emulate_write_cache fi echo 1 > $BACKSTORE_DIR/enable # Create an iSCSI target and a target portal group (TPG) mkdir $ISCSI_DIR/$IQN mkdir $ISCSI_DIR/$IQN/tpgt_1/ # Create a LUN mkdir $ISCSI_DIR/$IQN/tpgt_1/lun/lun_0 ln -s $BACKSTORE_DIR $ISCSI_DIR/$IQN/tpgt_1/lun/lun_0/data echo 1 > $ISCSI_DIR/$IQN/tpgt_1/enable # Create a network portal mkdir $ISCSI_DIR/$IQN/tpgt_1/np/$PORTAL # Disable authentication echo 0 > $ISCSI_DIR/$IQN/tpgt_1/attrib/authentication echo 1 > $ISCSI_DIR/$IQN/tpgt_1/attrib/generate_node_acls # Allow write access for non authenticated initiators echo 0 > $ISCSI_DIR/$IQN/tpgt_1/attrib/demo_mode_write_protect echo "Target ${IQN}, portal ${PORTAL} has been created" ”…””}”hh¹sbah}”(h]”h ]”h"]”h$]”h&]”Œsource”ŒE/var/lib/git/docbuild/linux/Documentation/target/target-export-device”Œ xml:space”Œpreserve”Œforce”‰Œlanguage”Œshell”Œhighlight_args”}”Œ linenostart”Ksuh1h·hŸh¶h Khh£hžhubeh}”(h]”Œtarget-export-device-script”ah ]”h"]”Œtarget export device script”ah$]”h&]”uh1h¡hhhžhhŸh¶h Kubeh}”(h]”h ]”h"]”h$]”h&]”Œsource”h¶uh1hŒcurrent_source”NŒ current_line”NŒsettings”Œdocutils.frontend”ŒValues”“”)”}”(h¦NŒ generator”NŒ datestamp”NŒ source_link”NŒ source_url”NŒ toc_backlinks”Œentry”Œfootnote_backlinks”KŒ sectnum_xform”KŒstrip_comments”NŒstrip_elements_with_classes”NŒ strip_classes”NŒ report_level”KŒ halt_level”KŒexit_status_level”KŒdebug”NŒwarning_stream”NŒ traceback”ˆŒinput_encoding”Œ utf-8-sig”Œinput_encoding_error_handler”Œstrict”Œoutput_encoding”Œutf-8”Œoutput_encoding_error_handler”hüŒerror_encoding”Œutf-8”Œerror_encoding_error_handler”Œbackslashreplace”Œ language_code”Œen”Œrecord_dependencies”NŒconfig”NŒ id_prefix”hŒauto_id_prefix”Œid”Œ dump_settings”NŒdump_internals”NŒdump_transforms”NŒdump_pseudo_xml”NŒexpose_internals”NŒstrict_visitor”NŒ_disable_config”NŒ_source”h¶Œ _destination”NŒ _config_files”]”Œ7/var/lib/git/docbuild/linux/Documentation/docutils.conf”aŒfile_insertion_enabled”ˆŒ raw_enabled”KŒline_length_limit”M'Œpep_references”NŒ pep_base_url”Œhttps://peps.python.org/”Œpep_file_url_template”Œpep-%04d”Œrfc_references”NŒ rfc_base_url”Œ&https://datatracker.ietf.org/doc/html/”Œ tab_width”KŒtrim_footnote_reference_space”‰Œsyntax_highlight”Œlong”Œ smart_quotes”ˆŒsmartquotes_locales”]”Œcharacter_level_inline_markup”‰Œdoctitle_xform”‰Œ docinfo_xform”KŒsectsubtitle_xform”‰Œ image_loading”Œlink”Œembed_stylesheet”‰Œcloak_email_addresses”ˆŒsection_self_link”‰Œenv”NubŒreporter”NŒindirect_targets”]”Œsubstitution_defs”}”Œsubstitution_names”}”Œrefnames”}”Œrefids”}”Œnameids”}”hÖhÓsŒ nametypes”}”hÖ‰sh}”hÓh£sŒ footnote_refs”}”Œ citation_refs”}”Œ autofootnotes”]”Œautofootnote_refs”]”Œsymbol_footnotes”]”Œsymbol_footnote_refs”]”Œ footnotes”]”Œ citations”]”Œautofootnote_start”KŒsymbol_footnote_start”KŒ id_counter”Œ collections”ŒCounter”“”}”…”R”Œparse_messages”]”Œtransform_messages”]”Œ transformer”NŒ include_log”]”Œ decoration”Nhžhub.