{"id":3385,"date":"2017-03-16T15:44:48","date_gmt":"2017-03-16T15:44:48","guid":{"rendered":"https:\/\/qbytes.cloud\/?p=3385"},"modified":"2017-03-16T15:44:48","modified_gmt":"2017-03-16T15:44:48","slug":"mount-slaved-drive","status":"publish","type":"post","link":"https:\/\/www.qbytes.cloud\/index.php\/2017\/03\/16\/mount-slaved-drive\/","title":{"rendered":"Mount Slaved Drive"},"content":{"rendered":"<p>Sometimes your OS needs to be reinstalled by your datacenter. This means that you need to mount the slaved drive in order to copy the data to the new OS drive. Here is a typical example:<\/p>\n<p>Login to the server and run the following to see whats mounted:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;root@68-168-105-44 ~]# df -h\nFilesystem      Size  Used Avail Use% Mounted on\n\/dev\/sdb3       913G  2.8G  864G   1% \/\ntmpfs           7.8G     0  7.8G   0% \/dev\/shm\n\/dev\/sdb1       485M   80M  380M  18% \/boot\n\n<\/pre>\n<p>As we can see above, there is the primary new OS drive mounted on \/dev\/sdb. To see all the drives, run the following:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n&#x5B;root@68-168-105-44 ~]# fdisk -l\n\nDisk \/dev\/sda: 1000.2 GB, 1000204886016 bytes\n255 heads, 63 sectors\/track, 121601 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x00000000\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/sda1   *           1          62      497983+  83  Linux\n\/dev\/sda2              64         584     4184932+  82  Linux swap \/ Solaris\n\/dev\/sda3             585      121598   972044955   82  Linux swap \/ Solaris\n\nDisk \/dev\/sdb: 1000.2 GB, 1000204886016 bytes\n255 heads, 63 sectors\/track, 121601 cylinders\nUnits = cylinders of 16065 * 512 = 8225280 bytes\nSector size (logical\/physical): 512 bytes \/ 512 bytes\nI\/O size (minimum\/optimal): 512 bytes \/ 512 bytes\nDisk identifier: 0x0009b45b\n\n   Device Boot      Start         End      Blocks   Id  System\n\/dev\/sdb1   *           1          64      512000   83  Linux\nPartition 1 does not end on cylinder boundary.\n\/dev\/sdb2              64         587     4194304   82  Linux swap \/ Solaris\nPartition 2 does not end on cylinder boundary.\n\/dev\/sdb3             587      121602   972054528   83  Linux\n\n<\/pre>\n<p>Since out drive from the first command showed the \/dev\/sdb disk as the primary OS disk, we can tell that the \/dev\/sda disk is the slaved disk. No we can mount it.<\/p>\n<p>First, you&#8217;ll need to create a mount point. We&#8217;ll use \/mnt\/slave. This is where we&#8217;ll mount \/mnt\/slave. Enter the following commands:<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n\n# mkdir \/mnt\/slave\n# mount \/dev\/sda3 \/mnt\/slave\n# df -h\nFilesystem      Size  Used Avail Use% Mounted on\n\/dev\/sdb3       913G  2.7G  864G   1% \/\ntmpfs           7.8G     0  7.8G   0% \/dev\/shm\n\/dev\/sdb1       485M   80M  380M  18% \/boot\n\/dev\/sda3       913G  113G  754G  13% \/mnt\/slave\n\n<\/pre>\n<p>Edit \/etc\/fstab so the new drive will automatically mount to \/disk1 on reboot<\/p>\n<pre class=\"brush: bash; title: ; notranslate\" title=\"\">\n# \/dev\/sda3       \/mnt\/slave  ext3  defaults     0       0\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes your OS needs to be reinstalled by your datacenter. This means that you need to mount the slaved drive in order to copy the data to the new OS drive. Here is a typical example: Login to the server and run the following to see whats mounted: &#x5B;root@68-168-105-44 ~]# df -h Filesystem Size Used &#8230; <a title=\"Mount Slaved Drive\" class=\"read-more\" href=\"https:\/\/www.qbytes.cloud\/index.php\/2017\/03\/16\/mount-slaved-drive\/\" aria-label=\"Read more about Mount Slaved Drive\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[],"class_list":["post-3385","post","type-post","status-publish","format-standard","hentry","category-administration"],"_links":{"self":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3385","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/comments?post=3385"}],"version-history":[{"count":0,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/posts\/3385\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/media?parent=3385"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/categories?post=3385"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.qbytes.cloud\/index.php\/wp-json\/wp\/v2\/tags?post=3385"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}