{"id":1920,"date":"2020-05-06T11:36:53","date_gmt":"2020-05-06T08:36:53","guid":{"rendered":"https:\/\/artem.services\/?p=1916"},"modified":"2020-05-07T14:28:33","modified_gmt":"2020-05-07T11:28:33","slug":"1920","status":"publish","type":"post","link":"https:\/\/artem.services\/?p=1920&lang=en","title":{"rendered":"Linux &#8212; Mount partition by label"},"content":{"rendered":"<p><img loading=\"lazy\" class=\"aligncenter wp-image-1917 size-medium\" src=\"https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-272x300.png\" alt=\"\" width=\"272\" height=\"300\" srcset=\"https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-272x300.png 272w, https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-927x1024.png 927w, https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-768x848.png 768w, https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-1391x1536.png 1391w, https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-1854x2048.png 1854w, https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-954x1054.png 954w, https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo-1354x1496.png 1354w, https:\/\/artem.services\/wp-content\/uploads\/2020\/05\/linux-logo.png 1979w\" sizes=\"(max-width: 272px) 100vw, 272px\" \/><\/p>\n<h3>List of labels<\/h3>\n<p>You can view the list of existing labels in the following path:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\n\/dev\/disk\/by-label\/\r\n<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>If this directory does not exist, then there are no labels in the system<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<h3>Adding a label<\/h3>\n<p>For different file systems, the label is added differently.<\/p>\n<h4>ext2\/ext3\/ext4:<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\ne2label \/dev\/sda1 LABEL\r\n<\/pre>\n<h4>reiserfs:<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nreiserfstune -l LABEL \/dev\/sda1\r\n<\/pre>\n<h4>jfs:<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\njfs_tune -L LABEL \/dev\/sda1\r\n<\/pre>\n<h4>xfs:<\/h4>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nxfs_admin -L LABEL \/dev\/sda1\r\n<\/pre>\n<p>&nbsp;<\/p>\n<blockquote><p>Where, &quot;<strong>LABEL<\/strong>&quot; &#8212; a unique label, &quot;<strong>\/dev\/sda1<\/strong>&quot; &#8212; necessary partition<\/p><\/blockquote>\n<p>&nbsp;<\/p>\n<h3><\/h3>\n<h3>fstab<\/h3>\n<p>An example of recording in <strong>fstab<\/strong> to mount an <strong>xfs<\/strong> section on the &quot;<strong>SITE<\/strong>&quot; label<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\r\nLABEL=SITE\t\/var\/www\/html\/site\txfs\tdefaults\t0 0\r\n<\/pre>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>List of labels You can view the list of existing labels in the following path: &nbsp; If this directory does not exist, then there are no labels in the system &nbsp; Adding a label For different file systems, the label is added differently. ext2\/ext3\/ext4: reiserfs: jfs: xfs: &nbsp; Where, &quot;LABEL&quot; &#8212; a unique label, &quot;\/dev\/sda1&quot; &hellip; <a href=\"https:\/\/artem.services\/?p=1920&#038;lang=en\" class=\"more-link\">\u041f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u0442\u044c \u0447\u0438\u0442\u0430\u0442\u044c<span class=\"screen-reader-text\"> &quot;Linux &#8212; Mount partition by label&quot;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[341],"tags":[1589,1591,371,681],"_links":{"self":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1920"}],"collection":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1920"}],"version-history":[{"count":2,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1920\/revisions"}],"predecessor-version":[{"id":1922,"href":"https:\/\/artem.services\/index.php?rest_route=\/wp\/v2\/posts\/1920\/revisions\/1922"}],"wp:attachment":[{"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1920"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1920"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/artem.services\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1920"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}