VinaCIS Network
Friday, 30 July 2010
VinaCIS .NETWORK
Home

Articles
Webmaster
Security
Solved problems
Common problems
Linux problems
Windows problems
Plesk Control Panel
Advertise with us
Polls
Which Control Panel software would you prefer to use ?
 
Login Form





Lost Password?
No account yet? Register
Syndicate
Latest News
VinaCIS Network has been upgraded

With a new additional 50 Mbit line on 01/Dec/2006, VinaCIS has reached max speed of 300 Mbit/s with high quality and warranted bandwidth.

The bandwidth has been splitted to serve business and download server separately. All business server are free from package loss, high latency and unavailability.

 
Howto add and format your new HDD in Linux ? PDF Print E-mail
User Rating: / 3
PoorBest 

Problem:

Your HDD is full and you want to expand it ? Simply add a new HDD, format it and mount to your file system. You can follow this article step by step

FDISK

At first, you need to use fdisk in order to make different partition on the HDD. Your primary HDD would be named sda if it is S-ATA and hda if IDE. The second HDD will be sdb or hdb (in this case is your new HDD).

Example:

[rev0001:/ #  fdisk /dev/hdb

Changes will remain in memory only, until you decide to write them. After that, of course, the previous content won't be recoverable.

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-4865, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-4865, default 4865): 4865

Command (m for help): t
Partition number (1-4): 1
Hex code (type L to list codes): 83

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

Format the HDD

[rev0001:/# mkfs.ext3 -b 4096 /dev/hdb1

-b 4096 will make the block size = 4096 bytes

Mount the HDD

Now you should create a directory on your file system like mkdir /var/www/vhosts/yoursite.com/httpdocs/space

Edit the fstab file in /etc with vi /etc/fstab

Insert o line like this:

/dev/hdb1               /var/www/vhosts/yoursite.com/httpdocs/space                     ext3    defaults        1    1

Save this file with SHIFT + ZZ

Now mount the disk

[rev0001:/# mount /var/www/vhosts/yoursite.com/httpdocs/space

Use df -hT to check it. You are done.

 
< Prev

Top!