Website Domain Registration and Website Hosting - Host a Website Tonight

Frequently Asked Questions

Help Center Search

Partitioning a Linux Dedicated Server with Two Hard Drives

Print this Article
Comment on this Article

If your Linux server is configured with two hard disks, you will need to prepare the secondary hard disk before you can use it. Before you can use a secondary hard disk, you need to:

  • Partition the secondary hard disk.
  • Create a file system for the new partition.
  • Mount the partition to make it accessible.

These instructions are specific to servers setup after July 15, 2005, for servers prior to this, the path in the following steps will need to be modified slightly. The 'df' command will show you how the current filesystem is mounted, normally /dev/hdc was used for the new partition. For more advanced partitioning and mounting options, please see the vendor provided documentation for your Operating System.

NOTE: This article assumes you are working with a new, un-formatted disk. If this procedure is followed on a disk that contains data, the data will be destroyed.

To Create a Hard Disk Partition

  1. Log in to your dedicated server as "root."
  2. Type fdisk /dev/sdb, and then press Enter.

    NOTE: If your server still has the IDE drive and no SATA support and you reprovision your server, SATA support will be enabled.

  3. Type n to create a new partition.
  4. For extended or Primary (1-4), type p.
  5. Accept the defaults for the partition size.
  6. Accept the default for the first cylinder.
  7. Accept the default for last cylinder.
  8. Type w and press Enter to write partition information.

To Create a File System

  1. Type mkfs -t ext3 /dev/sdb1 and press Enter. It will take a few minutes to create the new file system on your secondary hard drive.

To Mount the File System

  1. Type cd /sbin.
  2. Type mkdir /mnt/disk2.
  3. Type chmod 777 /mnt/disk2.
  4. Type mount /dev/sdb1 /mnt/disk2, and then press Enter.
  5. To ensure that your dedicated server mounts the new file system after each reboot, you need to add the command to mount the new file system to /etc/fstab.
  6. Type /dev/sdb1 /mnt/disk2 ext3 defaults 0 0. Press Enter.
Domain Registration Domain Registration
Pay less for website domain names. Register your own .com, .net or .org for as low as $8.67/yr. A free Email Account is included.
Website Hosting Website Tonight
For as little as $3.89 per month you can build your Website online with Website Tonight using our easy to use professionally designed templates.
Play Video
Shopping Cart Software Quick Shopping Cart
Build and run your own successful online store in minutes! You're just five easy steps away!
Play Video
Website Hosting Website Hosting
Everything you need to give your Website the reliable, high-performance home it deserves!