|
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. |