Ssphinx.addnodesdocument)}( rawsourcechildren]( translations LanguagesNode)}(hhh](h pending_xref)}(hhh]docutils.nodesTextChinese (Simplified)}parenthsba attributes}(ids]classes]names]dupnames]backrefs] refdomainstdreftypedoc reftarget,/translations/zh_CN/filesystems/nfs/reexportmodnameN classnameN refexplicitutagnamehhh ubh)}(hhh]hChinese (Traditional)}hh2sbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/zh_TW/filesystems/nfs/reexportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hItalian}hhFsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/it_IT/filesystems/nfs/reexportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hJapanese}hhZsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ja_JP/filesystems/nfs/reexportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hKorean}hhnsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/ko_KR/filesystems/nfs/reexportmodnameN classnameN refexplicituh1hhh ubh)}(hhh]hSpanish}hhsbah}(h]h ]h"]h$]h&] refdomainh)reftypeh+ reftarget,/translations/sp_SP/filesystems/nfs/reexportmodnameN classnameN refexplicituh1hhh ubeh}(h]h ]h"]h$]h&]current_languageEnglishuh1h hh _documenthsourceNlineNubhsection)}(hhh](htitle)}(hReexporting NFS filesystemsh]hReexporting NFS filesystems}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhF/var/lib/git/docbuild/linux/Documentation/filesystems/nfs/reexport.rsthKubh)}(hhh](h)}(hOverviewh]hOverview}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh paragraph)}(hIt is possible to reexport an NFS filesystem over NFS. However, this feature comes with a number of limitations. Before trying it, we recommend some careful research to determine whether it will work for your purposes.h]hIt is possible to reexport an NFS filesystem over NFS. However, this feature comes with a number of limitations. Before trying it, we recommend some careful research to determine whether it will work for your purposes.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(h2A discussion of current known limitations follows.h]h2A discussion of current known limitations follows.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK hhhhubeh}(h]overviewah ]h"]overviewah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(h!"fsid=" required, crossmnt brokenh]h%“fsid=” required, crossmnt broken}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhhhhhKubh)}(hWe require the "fsid=" export option on any reexport of an NFS filesystem. You can use "uuidgen -r" to generate a unique argument.h]hWe require the “fsid=” export option on any reexport of an NFS filesystem. You can use “uuidgen -r” to generate a unique argument.}(hhhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubh)}(hXThe "crossmnt" export does not propagate "fsid=", so it will not allow traversing into further nfs filesystems; if you wish to export nfs filesystems mounted under the exported filesystem, you'll need to export them explicitly, assigning each its own unique "fsid= option.h]hXThe “crossmnt” export does not propagate “fsid=”, so it will not allow traversing into further nfs filesystems; if you wish to export nfs filesystems mounted under the exported filesystem, you’ll need to export them explicitly, assigning each its own unique “fsid= option.}(hj hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhhhubeh}(h]fsid-required-crossmnt-brokenah ]h"]!"fsid=" required, crossmnt brokenah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hReboot recoveryh]hReboot recovery}(hj&hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj#hhhhhKubh)}(hX$The NFS protocol's normal reboot recovery mechanisms don't work for the case when the reexport server reboots because the source server has not rebooted, and so it is not in grace. Since the source server is not in grace, it cannot offer any guarantees that the file won't have been changed between the locks getting lost and any attempt to recover them. The same applies to delegations and any associated locks. Clients are not allowed to get file locks or delegations from a reexport server, any attempts will fail with operation not supported.h]hX*The NFS protocol’s normal reboot recovery mechanisms don’t work for the case when the reexport server reboots because the source server has not rebooted, and so it is not in grace. Since the source server is not in grace, it cannot offer any guarantees that the file won’t have been changed between the locks getting lost and any attempt to recover them. The same applies to delegations and any associated locks. Clients are not allowed to get file locks or delegations from a reexport server, any attempts will fail with operation not supported.}(hj4hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhj#hhubeh}(h]reboot-recoveryah ]h"]reboot recoveryah$]h&]uh1hhhhhhhhKubh)}(hhh](h)}(hFilehandle limitsh]hFilehandle limits}(hjMhhhNhNubah}(h]h ]h"]h$]h&]uh1hhjJhhhhhK&ubh)}(hIf the original server uses an X byte filehandle for a given object, the reexport server's filehandle for the reexported object will be X+22 bytes, rounded up to the nearest multiple of four bytes.h]hIf the original server uses an X byte filehandle for a given object, the reexport server’s filehandle for the reexported object will be X+22 bytes, rounded up to the nearest multiple of four bytes.}(hj[hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK(hjJhhubh)}(hAThe result must fit into the RFC-mandated filehandle size limits:h]hAThe result must fit into the RFC-mandated filehandle size limits:}(hjihhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK,hjJhhubhtable)}(hhh]htgroup)}(hhh](hcolspec)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhj~ubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthK uh1jhj~ubhtbody)}(hhh](hrow)}(hhh](hentry)}(hhh]h)}(hNFSv2h]hNFSv2}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h32 bytesh]h32 bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK/hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hNFSv3h]hNFSv3}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h64 bytesh]h64 bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK1hjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hNFSv4h]hNFSv4}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h 128 bytesh]h 128 bytes}(hj+hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK3hj(ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhj~ubeh}(h]h ]h"]h$]h&]colsKuh1j|hjyubah}(h]h ]h"]h$]h&]uh1jwhjJhhhhhNubh)}(hSo, for example, you will only be able to reexport a filesystem over NFSv2 if the original server gives you filehandles that fit in 10 bytes--which is unlikely.h]hSo, for example, you will only be able to reexport a filesystem over NFSv2 if the original server gives you filehandles that fit in 10 bytes--which is unlikely.}(hjXhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK6hjJhhubh)}(hzIn general there's no way to know the maximum filehandle size given out by an NFS server without asking the server vendor.h]h|In general there’s no way to know the maximum filehandle size given out by an NFS server without asking the server vendor.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK:hjJhhubh)}(hBut the following table gives a few examples. The first column is the typical length of the filehandle from a Linux server exporting the given filesystem, the second is the length after that nfs export is reexported by another Linux host:h]hBut the following table gives a few examples. The first column is the typical length of the filehandle from a Linux server exporting the given filesystem, the second is the length after that nfs export is reexported by another Linux host:}(hjthhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhK=hjJhhubjx)}(hhh]j})}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubj)}(hhh]h}(h]h ]h"]h$]h&]colwidthKuh1jhjubhthead)}(hhh]j)}(hhh](j)}(hhh]h}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hfilehandle lengthh]hfilehandle length}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(hafter reexporth]hafter reexport}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKChjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh](j)}(hhh]h)}(hext4:h]hext4:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h28 bytesh]h28 bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h52 bytesh]h52 bytes}(hj(hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKEhj%ubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hxfs:h]hxfs:}(hjHhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjEubah}(h]h ]h"]h$]h&]uh1jhjBubj)}(hhh]h)}(h32 bytesh]h32 bytes}(hj_hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhj\ubah}(h]h ]h"]h$]h&]uh1jhjBubj)}(hhh]h)}(h56 bytesh]h56 bytes}(hjvhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKGhjsubah}(h]h ]h"]h$]h&]uh1jhjBubeh}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh](j)}(hhh]h)}(hbtrfs:h]hbtrfs:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h40 bytesh]h40 bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hhh]h)}(h64 bytesh]h64 bytes}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKIhjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]colsKuh1j|hjubah}(h]h ]h"]h$]h&]uh1jwhjJhhhhhNubh)}(hlAll will therefore fit in an NFSv3 or NFSv4 filehandle after reexport, but none are reexportable over NFSv2.h]hlAll will therefore fit in an NFSv3 or NFSv4 filehandle after reexport, but none are reexportable over NFSv2.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKLhjJhhubh)}(hSLinux server filehandles are a bit more complicated than this, though; for example:h]hSLinux server filehandles are a bit more complicated than this, though; for example:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKOhjJhhubh block_quote)}(hX- The (non-default) "subtreecheck" export option generally requires another 4 to 8 bytes in the filehandle. - If you export a subdirectory of a filesystem (instead of exporting the filesystem root), that also usually adds 4 to 8 bytes. - If you export over NFSv2, knfsd usually uses a shorter filesystem identifier that saves 8 bytes. - The root directory of an export uses a filehandle that is shorter. h]h bullet_list)}(hhh](h list_item)}(hiThe (non-default) "subtreecheck" export option generally requires another 4 to 8 bytes in the filehandle.h]h)}(hiThe (non-default) "subtreecheck" export option generally requires another 4 to 8 bytes in the filehandle.h]hmThe (non-default) “subtreecheck” export option generally requires another 4 to 8 bytes in the filehandle.}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKRhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h}If you export a subdirectory of a filesystem (instead of exporting the filesystem root), that also usually adds 4 to 8 bytes.h]h)}(h}If you export a subdirectory of a filesystem (instead of exporting the filesystem root), that also usually adds 4 to 8 bytes.h]h}If you export a subdirectory of a filesystem (instead of exporting the filesystem root), that also usually adds 4 to 8 bytes.}(hj6hhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKThj2ubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h`If you export over NFSv2, knfsd usually uses a shorter filesystem identifier that saves 8 bytes.h]h)}(h`If you export over NFSv2, knfsd usually uses a shorter filesystem identifier that saves 8 bytes.h]h`If you export over NFSv2, knfsd usually uses a shorter filesystem identifier that saves 8 bytes.}(hjNhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKWhjJubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hCThe root directory of an export uses a filehandle that is shorter. h]h)}(hBThe root directory of an export uses a filehandle that is shorter.h]hBThe root directory of an export uses a filehandle that is shorter.}(hjfhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKYhjbubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]bullet-uh1jhhhKRhjubah}(h]h ]h"]h$]h&]uh1j hhhKRhjJhhubh)}(hXeAs you can see, the 128-byte NFSv4 filehandle is large enough that you're unlikely to have trouble using NFSv4 to reexport any filesystem exported from a Linux server. In general, if the original server is something that also supports NFSv3, you're *probably* OK. Re-exporting over NFSv3 may be dicier, and reexporting over NFSv2 will probably never work.h](hAs you can see, the 128-byte NFSv4 filehandle is large enough that you’re unlikely to have trouble using NFSv4 to reexport any filesystem exported from a Linux server. In general, if the original server is something that also supports NFSv3, you’re }(hjhhhNhNubhemphasis)}(h *probably*h]hprobably}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1jhjubha OK. Re-exporting over NFSv3 may be dicier, and reexporting over NFSv2 will probably never work.}(hjhhhNhNubeh}(h]h ]h"]h$]h&]uh1hhhhK\hjJhhubh)}(hvFor more details of Linux filehandle structure, the best reference is the source code and comments; see in particular:h]hvFor more details of Linux filehandle structure, the best reference is the source code and comments; see in particular:}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKchjJhhubj)}(h- include/linux/exportfs.h:enum fid_type - include/uapi/linux/nfsd/nfsfh.h:struct nfs_fhbase_new - fs/nfsd/nfsfh.c:set_version_and_fsid_type - fs/nfs/export.c:nfs_encode_fh h]j)}(hhh](j)}(h&include/linux/exportfs.h:enum fid_typeh]h)}(hjh]h&include/linux/exportfs.h:enum fid_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKfhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h5include/uapi/linux/nfsd/nfsfh.h:struct nfs_fhbase_newh]h)}(hjh]h5include/uapi/linux/nfsd/nfsfh.h:struct nfs_fhbase_new}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKghjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(h)fs/nfsd/nfsfh.c:set_version_and_fsid_typeh]h)}(hjh]h)fs/nfsd/nfsfh.c:set_version_and_fsid_type}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKhhjubah}(h]h ]h"]h$]h&]uh1jhjubj)}(hfs/nfs/export.c:nfs_encode_fh h]h)}(hfs/nfs/export.c:nfs_encode_fhh]hfs/nfs/export.c:nfs_encode_fh}(hjhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKihjubah}(h]h ]h"]h$]h&]uh1jhjubeh}(h]h ]h"]h$]h&]jjuh1jhhhKfhjubah}(h]h ]h"]h$]h&]uh1j hhhKfhjJhhubeh}(h]filehandle-limitsah ]h"]filehandle limitsah$]h&]uh1hhhhhhhhK&ubh)}(hhh](h)}(hOpen DENY bits ignoredh]hOpen DENY bits ignored}(hj3hhhNhNubah}(h]h ]h"]h$]h&]uh1hhj0hhhhhKlubh)}(hXNFS since NFSv4 supports ALLOW and DENY bits taken from Windows, which allow you, for example, to open a file in a mode which forbids other read opens or write opens. The Linux client doesn't use them, and the server's support has always been incomplete: they are enforced only against other NFS users, not against processes accessing the exported filesystem locally. A reexport server will also not pass them along to the original server, so they will not be enforced between clients of different reexport servers.h]hXNFS since NFSv4 supports ALLOW and DENY bits taken from Windows, which allow you, for example, to open a file in a mode which forbids other read opens or write opens. The Linux client doesn’t use them, and the server’s support has always been incomplete: they are enforced only against other NFS users, not against processes accessing the exported filesystem locally. A reexport server will also not pass them along to the original server, so they will not be enforced between clients of different reexport servers.}(hjAhhhNhNubah}(h]h ]h"]h$]h&]uh1hhhhKnhj0hhubeh}(h]open-deny-bits-ignoredah ]h"]open deny bits ignoredah$]h&]uh1hhhhhhhhKlubeh}(h]reexporting-nfs-filesystemsah ]h"]reexporting nfs filesystemsah$]h&]uh1hhhhhhhhKubeh}(h]h ]h"]h$]h&]sourcehuh1hcurrent_sourceN current_lineNsettingsdocutils.frontendValues)}(hN generatorN datestampN source_linkN source_urlN toc_backlinksjfootnote_backlinksK sectnum_xformKstrip_commentsNstrip_elements_with_classesN strip_classesN report_levelK halt_levelKexit_status_levelKdebugNwarning_streamN tracebackinput_encoding utf-8-siginput_encoding_error_handlerstrictoutput_encodingutf-8output_encoding_error_handlerjerror_encodingutf-8error_encoding_error_handlerbackslashreplace language_codeenrecord_dependenciesNconfigN id_prefixhauto_id_prefixid dump_settingsNdump_internalsNdump_transformsNdump_pseudo_xmlNexpose_internalsNstrict_visitorN_disable_configN_sourceh _destinationN _config_files]7/var/lib/git/docbuild/linux/Documentation/docutils.confafile_insertion_enabled raw_enabledKline_length_limitM'pep_referencesN pep_base_urlhttps://peps.python.org/pep_file_url_templatepep-%04drfc_referencesN rfc_base_url&https://datatracker.ietf.org/doc/html/ tab_widthKtrim_footnote_reference_spacesyntax_highlightlong smart_quotessmartquotes_locales]character_level_inline_markupdoctitle_xform docinfo_xformKsectsubtitle_xform image_loadinglinkembed_stylesheetcloak_email_addressessection_self_linkenvNubreporterNindirect_targets]substitution_defs}substitution_names}refnames}refids}nameids}(j\jYhhj jjGjDj-j*jTjQu nametypes}(j\hj jGj-jTuh}(jYhhhjhjDj#j*jJjQj0u footnote_refs} citation_refs} autofootnotes]autofootnote_refs]symbol_footnotes]symbol_footnote_refs] footnotes] citations]autofootnote_startKsymbol_footnote_startK id_counter collectionsCounter}Rparse_messages]transform_messages] transformerN include_log] decorationNhhub.