{"id":3519,"date":"2020-08-20T11:36:17","date_gmt":"2020-08-20T16:36:17","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=3519"},"modified":"2020-08-20T11:36:18","modified_gmt":"2020-08-20T16:36:18","slug":"mount-disk-by-uuid-in-linux","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/mount-disk-by-uuid-in-linux\/","title":{"rendered":"Mount disk by UUID in Linux"},"content":{"rendered":"\n<p>Find UUID<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">blkid<\/pre>\n\n\n\n<p>Example output<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/dev\/xvdb1: UUID=\"42fbe9a1-eea1-34bc-439d-19a0b48e7df1\" TYPE=\"xfs\"<\/pre>\n\n\n\n<p>Mount drive using the UUID<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@host ~]# mount -U 42fbe9a1-eea1-34bc-439d-19a0b48e7df1 \/mnt<\/pre>\n\n\n\n<p>Add to fstab to automatically mount on system boot up<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">vi \/etc\/fstab<\/pre>\n\n\n\n<p>Add the following, swap out the UUID for your devices UUID<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">UUID=\"42fbe9a1-eea1-34bc-439d-19a0b48e7df1\" \/backup xfs defaults 0 0<\/pre>\n\n\n\n<figure class=\"wp-block-embed-wordpress wp-block-embed is-type-wp-embed is-provider-linux-hint\"><div class=\"wp-block-embed__wrapper\">\n<blockquote class=\"wp-embedded-content\" data-secret=\"Ay0iSNECvf\"><a href=\"https:\/\/linuxhint.com\/mount_partition_uuid_label_linux\/\">Mounting Partitions Using UUID and LABEL on Linux<\/a><\/blockquote><iframe loading=\"lazy\" class=\"wp-embedded-content\" sandbox=\"allow-scripts\" security=\"restricted\" style=\"position: absolute; clip: rect(1px, 1px, 1px, 1px);\" title=\"&#8220;Mounting Partitions Using UUID and LABEL on Linux&#8221; &#8212; \" src=\"https:\/\/linuxhint.com\/mount_partition_uuid_label_linux\/embed\/#?secret=sQrTlfoPSv#?secret=Ay0iSNECvf\" data-secret=\"Ay0iSNECvf\" width=\"584\" height=\"329\" frameborder=\"0\" marginwidth=\"0\" marginheight=\"0\" scrolling=\"no\"><\/iframe>\n<\/div><\/figure>\n\n\n\n<p>Save and exit.  Now when the system reboots it should automatically mount the drive.  You should also be able to call &#8220;mount -a&#8221; to automatically mount everything in fstab.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Find UUID blkid Example output \/dev\/xvdb1: UUID=&#8221;42fbe9a1-eea1-34bc-439d-19a0b48e7df1&#8243; TYPE=&#8221;xfs&#8221; Mount drive using the UUID [root@host ~]# mount -U 42fbe9a1-eea1-34bc-439d-19a0b48e7df1 \/mnt Add to fstab to automatically mount on system boot up vi \/etc\/fstab Add the following, swap out the UUID for your &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/mount-disk-by-uuid-in-linux\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[1068,1069,1070,7,380,365],"class_list":["post-3519","post","type-post","status-publish","format-standard","hentry","category-linux","tag-blkid","tag-hard-drive","tag-hdd","tag-linux-2","tag-mount","tag-uuid"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3519","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=3519"}],"version-history":[{"count":1,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3519\/revisions"}],"predecessor-version":[{"id":3521,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/3519\/revisions\/3521"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=3519"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=3519"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=3519"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}