€•|!Œ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”Œ4/translations/zh_CN/admin-guide/device-mapper/linear”Œmodname”NŒ classname”NŒ refexplicit”ˆuŒtagname”hhh ubh)”}”(hhh]”hŒChinese (Traditional)”…””}”hh2sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/zh_TW/admin-guide/device-mapper/linear”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒItalian”…””}”hhFsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/it_IT/admin-guide/device-mapper/linear”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒJapanese”…””}”hhZsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ja_JP/admin-guide/device-mapper/linear”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒKorean”…””}”hhnsbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/ko_KR/admin-guide/device-mapper/linear”Œmodname”NŒ classname”NŒ refexplicit”ˆuh1hhh ubh)”}”(hhh]”hŒSpanish”…””}”hh‚sbah}”(h]”h ]”h"]”h$]”h&]”Œ refdomain”h)Œreftype”h+Œ reftarget”Œ4/translations/sp_SP/admin-guide/device-mapper/linear”Œ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Œ dm-linear”h]”hŒ dm-linear”…””}”(hh¨hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hh£hžhhŸŒN/var/lib/git/docbuild/linux/Documentation/admin-guide/device-mapper/linear.rst”h KubhŒ paragraph”“”)”}”(hŒ´Device-Mapper's "linear" target maps a linear range of the Device-Mapper device onto a linear range of another device. This is the basic building block of logical volume managers.”h]”hŒºDevice-Mapper’s “linear†target maps a linear range of the Device-Mapper device onto a linear range of another device. This is the basic building block of logical volume managers.”…””}”(hh¹hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khh£hžhubhŒdefinition_list”“”)”}”(hhh]”hŒdefinition_list_item”“”)”}”(hŒ¶Parameters: : Full pathname to the underlying block-device, or a "major:minor" device-number. : Starting sector within the device. ”h]”(hŒterm”“”)”}”(hŒParameters: ”h]”hŒParameters: ”…””}”(hhÔhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÒhŸh¶h KhhÎubhŒ definition”“”)”}”(hhh]”hÈ)”}”(hhh]”(hÍ)”}”(hŒ[: Full pathname to the underlying block-device, or a "major:minor" device-number.”h]”(hÓ)”}”(hŒ :”h]”hŒ :”…””}”(hhîhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÒhŸh¶h K hhêubhã)”}”(hhh]”h¸)”}”(hŒOFull pathname to the underlying block-device, or a "major:minor" device-number.”h]”hŒSFull pathname to the underlying block-device, or a “major:minor†device-number.”…””}”(hhÿhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h K hhüubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhêubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÌhŸh¶h K hhçubhÍ)”}”(hŒ.: Starting sector within the device. ”h]”(hÓ)”}”(hŒ :”h]”hŒ :”…””}”(hjhžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1hÒhŸh¶h Khjubhã)”}”(hhh]”h¸)”}”(hŒ"Starting sector within the device.”h]”hŒ"Starting sector within the device.”…””}”(hj.hžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h·hŸh¶h Khj+ubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhjubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÌhŸh¶h Khhçubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÇhhäubah}”(h]”h ]”h"]”h$]”h&]”uh1hâhhÎubeh}”(h]”h ]”h"]”h$]”h&]”uh1hÌhŸh¶h KhhÉubah}”(h]”h ]”h"]”h$]”h&]”uh1hÇhh£hžhhŸNh Nubh¢)”}”(hhh]”(h§)”}”(hŒExample scripts”h]”hŒExample scripts”…””}”(hjchžhhŸNh Nubah}”(h]”h ]”h"]”h$]”h&]”uh1h¦hj`hžhhŸh¶h KubhŒ literal_block”“”)”}”(hŒx#!/bin/sh # Create an identity mapping for a device echo "0 `blockdev --getsz $1` linear $1 0" | dmsetup create identity”h]”hŒx#!/bin/sh # Create an identity mapping for a device echo "0 `blockdev --getsz $1` linear $1 0" | dmsetup create identity”…””}”hjssbah}”(h]”h ]”h"]”h$]”h&]”Œ xml:space”Œpreserve”uh1jqhŸh¶h Khj`hžhubjr)”}”(hŒ©#!/bin/sh # Join 2 devices together size1=`blockdev --getsz $1` size2=`blockdev --getsz $2` echo "0 $size1 linear $1 0 $size1 $size2 linear $2 0" | dmsetup create joined”h]”hŒ©#!/bin/sh # Join 2 devices together size1=`blockdev --getsz $1` size2=`blockdev --getsz $2` echo "0 $size1 linear $1 0 $size1 $size2 linear $2 0" | dmsetup create joined”…””}”hjƒsbah}”(h]”h ]”h"]”h$]”h&]”jj‚uh1jqhŸh¶h Khj`hžhubjr)”}”(hX±#!/usr/bin/perl -w # Split a device into 4M chunks and then join them together in reverse order. my $name = "reverse"; my $extent_size = 4 * 1024 * 2; my $dev = $ARGV[0]; my $table = ""; my $count = 0; if (!defined($dev)) { die("Please specify a device.\n"); } my $dev_size = `blockdev --getsz $dev`; my $extents = int($dev_size / $extent_size) - (($dev_size % $extent_size) ? 1 : 0); while ($extents > 0) { my $this_start = $count * $extent_size; $extents--; $count++; my $this_offset = $extents * $extent_size; $table .= "$this_start $extent_size linear $dev $this_offset\n"; } `echo \"$table\" | dmsetup create $name`;”h]”hX±#!/usr/bin/perl -w # Split a device into 4M chunks and then join them together in reverse order. my $name = "reverse"; my $extent_size = 4 * 1024 * 2; my $dev = $ARGV[0]; my $table = ""; my $count = 0; if (!defined($dev)) { die("Please specify a device.\n"); } my $dev_size = `blockdev --getsz $dev`; my $extents = int($dev_size / $extent_size) - (($dev_size % $extent_size) ? 1 : 0); while ($extents > 0) { my $this_start = $count * $extent_size; $extents--; $count++; my $this_offset = $extents * $extent_size; $table .= "$this_start $extent_size linear $dev $this_offset\n"; } `echo \"$table\" | dmsetup create $name`;”…””}”hj‘sbah}”(h]”h ]”h"]”h$]”h&]”jj‚uh1jqhŸh¶h K%hj`hžhubeh}”(h]”Œexample-scripts”ah ]”h"]”Œexample scripts”ah$]”h&]”uh1h¡hh£hžhhŸh¶h Kubeh}”(h]”Œ dm-linear”ah ]”h"]”Œ dm-linear”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”jÒŒ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”}”(j¬j©j¤j¡uŒ nametypes”}”(j¬‰j¤‰uh}”(j©h£j¡j`uŒ 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.