{"id":1403,"date":"2017-08-25T15:09:09","date_gmt":"2017-08-25T15:09:09","guid":{"rendered":"https:\/\/www.xsofthost.com\/help\/?p=1403"},"modified":"2021-03-15T14:37:03","modified_gmt":"2021-03-15T14:37:03","slug":"mount-new-disk-drive-to-centos-vps-server","status":"publish","type":"post","link":"https:\/\/www.xsofthost.com\/help\/mount-new-disk-drive-to-centos-vps-server\/","title":{"rendered":"how to mount new disk drive to Centos VPS Server"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-post\" data-elementor-id=\"1403\" class=\"elementor elementor-1403\">\n\t\t\t\t\t\t\t\t\t<section class=\"elementor-section elementor-top-section elementor-element elementor-element-004eae7 elementor-section-boxed elementor-section-height-default elementor-section-height-default\" data-id=\"004eae7\" data-element_type=\"section\">\n\t\t\t\t\t\t<div class=\"elementor-container elementor-column-gap-default\">\n\t\t\t\t\t<div class=\"elementor-column elementor-col-100 elementor-top-column elementor-element elementor-element-f688a51\" data-id=\"f688a51\" data-element_type=\"column\">\n\t\t\t<div class=\"elementor-widget-wrap elementor-element-populated\">\n\t\t\t\t\t\t\t\t<div class=\"elementor-element elementor-element-0d77524 elementor-widget elementor-widget-text-editor\" data-id=\"0d77524\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>In this tutorial we are using <b>fdisk<\/b>\u00a0 to mount disk drive to your server , this tutorial can be applied for VPS and Dedicated servers too. you can create only up to 2TB partitions with fdisk. Nowadays you may use parted instead.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-d8d44a5 elementor-widget elementor-widget-heading\" data-id=\"d8d44a5\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">What is fdisk<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-cb5656b elementor-widget elementor-widget-text-editor\" data-id=\"cb5656b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>fdisk command-line utility provides disk-partitioning functions &#8211; for example: preparatory to defining file systems.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-bbede16 elementor-widget elementor-widget-heading\" data-id=\"bbede16\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Mount Your new Disk Drive to VPS Server<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-2a010f8 elementor-widget elementor-widget-text-editor\" data-id=\"2a010f8\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Note that Your OS also should support GPT support in kernel in order to use partitions more than 2TB.<\/p>\n<p>So in this case we use parted and partitions less than 2 TBs. Also please note that in case you are using HW RAID you most likely should rather differ way to manage your partitions. In current case we suppose that there is no hardware RAID controller present in a system . Also this way should be applied to the fully <b>virtualized<\/b> servers using <a href=\"https:\/\/www.xsofthost.com\/vps-ssd\/\" target=\"_blank\" rel=\"noopener\"><b>VPS KVM<\/b><\/a> or XEN-fullHV virtualization technology.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-c08e6da elementor-widget elementor-widget-heading\" data-id=\"c08e6da\" data-element_type=\"widget\" data-widget_type=\"heading.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t<h2 class=\"elementor-heading-title elementor-size-default\">Steps to attach and mount your Disk drive:<\/h2>\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-58da5b0 elementor-widget elementor-widget-text-editor\" data-id=\"58da5b0\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>First Login to your server using SSH as root privileges.And run the following command :<\/p>\n<p>Lets see the devices in the system<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-7fceaff elementor-widget elementor-widget-code-highlight\" data-id=\"7fceaff\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>df -h\nFilesystem Size Used Avail Use% Mounted on\n\/dev\/sda1 239G 879M 226G 1% \/\nnone 3.9G 0 3.9G 0% \/dev\/shm\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-595f464 elementor-widget elementor-widget-text-editor\" data-id=\"595f464\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tIn this scenario we are going to add the Disk \/dev\/sdb\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-816f693 elementor-widget elementor-widget-code-highlight\" data-id=\"816f693\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>fdisk -l\nDisk \/dev\/sdb: 107.4 GB, 107374182400 bytes\n255 heads, 63 sectors\/track, 13054 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 \nDisk \/dev\/sda: 268.4 GB, 268435456000 bytes\n255 heads, 63 sectors\/track, 32635 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: 0x00083ede\n \nDevice Boot Start End Blocks Id System \/dev\/sda1 1 31592 253755392 83 Linux \/dev\/sda2 31592 32636 8387584 82 Linux swap \/ Solaris<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-51fe58b elementor-widget elementor-widget-text-editor\" data-id=\"51fe58b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tNow You will need to run the following command\u00a0<b>fdisk \/dev\/sdb<\/b>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-a53cdbd elementor-widget elementor-widget-code-highlight\" data-id=\"a53cdbd\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>fdisk \/dev\/sdb<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-5445556 elementor-widget elementor-widget-text-editor\" data-id=\"5445556\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disk label Building a new DOS disk label with disk identifier 0x5bac3a50. Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won\u2019t be recoverable. Command (m for help):<br \/>Now we need to enter <b>n<\/b> to add a new partition<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-038a38b elementor-widget elementor-widget-code-highlight\" data-id=\"038a38b\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>n\nCommand action e extended p primary partition (1-4)\n#type p for primary partition , \n#then form Partition number (1-4): \n#type 1 and press Enter; \n#and for First cylinder (1-13054, default 1): \n#just press Enter;\n#and for the Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054): \n#Press Enter again for default value;\n\np\nPartition number (1-4):1\nFirst cylinder (1-13054, default 1):#Enter\nUsing default value 1 Last cylinder, +cylinders or +size{K,M,G} (1-13054, default 13054):\nCommand (m for help):\n#Now  type w to write and sync the disk\n\nw\nThe partition table has been altered!\nCalling ioctl() to re-read partition table.\nSyncing disks.<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-8643915 elementor-widget elementor-widget-text-editor\" data-id=\"8643915\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>The next step is to run <b>mkfs -t ext3 \/dev\/sdb <\/b>and confirm the message<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-6c522e4 elementor-widget elementor-widget-code-highlight\" data-id=\"6c522e4\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>mkfs -t ext3 \/dev\/sdb\nWriting inode tables: done\nCreating journal (32768 blocks): done\nWriting superblocks and filesystem accounting information:<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-212a0be elementor-widget elementor-widget-text-editor\" data-id=\"212a0be\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\tThe next step is creating directory with name and map the name to the device in the example \u201cDIRECTORY\u201d is the name what we need , start run the following commands:\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-1932865 elementor-widget elementor-widget-code-highlight\" data-id=\"1932865\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>mkdir \/DIRECTORY\ne2label \/dev\/sdb \/DIRECTORY\necho \u201cLABEL=\/DIRECTORY \/DIRECTORY ext3 defaults 1 2\u201d >> \/etc\/fstab\nmount LABEL=\/DIRECTORY \/DIRECTORY<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-20c261b elementor-widget elementor-widget-text-editor\" data-id=\"20c261b\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>To confirm that your drive listed and usable, simply run the following command<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-ca6166c elementor-widget elementor-widget-code-highlight\" data-id=\"ca6166c\" data-element_type=\"widget\" data-widget_type=\"code-highlight.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t<div class=\"prismjs-okaidia copy-to-clipboard \">\n\t\t\t<pre data-line=\"\" class=\"highlight-height language-bash \">\n\t\t\t\t<code readonly=\"true\" class=\"language-bash\">\n\t\t\t\t\t<xmp>df -h\nFilesystem Size Used Avail Use% Mounted on\n\/dev\/sda1 239G 879M 226G 1% \/\nnone 3.9G 0 3.9G 0% \/dev\/shm\n\/dev\/sdb 99G 188M 94G 1% \/DIRECTORY\n<\/xmp>\n\t\t\t\t<\/code>\n\t\t\t<\/pre>\n\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<div class=\"elementor-element elementor-element-fe1f9b3 elementor-widget elementor-widget-text-editor\" data-id=\"fe1f9b3\" data-element_type=\"widget\" data-widget_type=\"text-editor.default\">\n\t\t\t\t<div class=\"elementor-widget-container\">\n\t\t\t\t\t\t\t<p>after all of those commands you can simply access your new drive by run <b>cd \/DIRECTORY <\/b>and use your new drive.<\/p>\t\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t<\/div>\n\t\t\t\t\t\t\t<\/div>\n\t\t<\/section>\n\t\t\t\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>In this tutorial we are using fdisk\u00a0 to mount disk drive to your server , this tutorial can be applied for VPS and Dedicated servers too. you can create only up to 2TB partitions with fdisk. Nowadays you may use parted instead. What is fdisk fdisk command-line utility provides disk-partitioning functions &#8211; for example: preparatory [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":1400,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[187],"tags":[181,42,50,149,74],"_links":{"self":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/1403"}],"collection":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/comments?post=1403"}],"version-history":[{"count":67,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/1403\/revisions"}],"predecessor-version":[{"id":2121,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/posts\/1403\/revisions\/2121"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media\/1400"}],"wp:attachment":[{"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/media?parent=1403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/categories?post=1403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xsofthost.com\/help\/wp-json\/wp\/v2\/tags?post=1403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}