GoWebsite.com provides Domain Registration
Website Hosting, On-Line Shopping Carts, SEO
Blog Hosting, Email Accounts, Security Certificates,
Merchant Accounts & other Website Products.
Free setup! Speak with us anytime: 480-624-2500

Partitioning a Linux Dedicated Server's Second Hard Drives

If your Linux server is configured with two hard disks, and you want to partition your second drive, you must:

  • 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. Via SSH, log in to your dedicated server as 'root.' See How can I log in as 'root' on my server? for information.
  2. Type the following, and then press Enter.
    /sbin/fdisk /dev/sdb
  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 the following, and then press Enter.
    /sbin/mkfs -t ext3 /dev/sdb1
    It takes a few minutes to create the new file system on your secondary hard drive.

To Mount the File System

  1. Type the following, and then press Enter.
    cd /sbin
  2. Type the following, and then press Enter.
    mkdir /mnt/disk2
  3. Type the following, and then press Enter.
    chmod 777 /mnt/disk2
  4. Type the following, and then press Enter.
    /bin/mount /dev/sdb1 /mnt/disk2
  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. We recommend a backup of /etc/fstab before the update:

    • Type the following where mm_dd_yyyy represents the date of the backup, and then press Enter.
    cp /etc/fstab /etc/fstab_mm_dd_yyyy
    • Type the following, and then press Enter.
    echo "/dev/sdb1 /mnt/disk2 ext3 defaults 0 0" >> /etc/fstab
  7. Type the following, and then press Enter.
    /dev/sdb1 /mnt/disk2 ext3 defaults 0 0
Domain Registration
Pay less for website domain names. Register your own .com, .net or .org for as low as $10.18 per year. Everything you need to get online - FREE with your domain.
Website Builder
For as little as $3.89 per month you can build your Website online with Website Builder using our easy to use professional templates.
Play Video - Demo
Quick Shopping Cart
Build and run your own successful online store in minutes. You're just five easy steps away!
Shopping Cart works with Google® and eBay®
Play Video
Website Hosting
Everything needed to give your website the high-performance home it deserves.  Protect transactions and secure your customer's data with
a SSL Certificate