Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

// Lets Run df -h
// To see the size of disks

#df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
47G 19G 26G 43% /
/dev/sda1 99M 20M 75M 21% /boot
tmpfs 3.0G 0 3.0G 0% /dev/shm
/dev/sdb1 197G 182G 4.9G 98% /var

// OOPS, seems like we are running out of disk on /dev/sdb1 i.e. /var
// And this is critical disk for me.

# fdisk -l

Disk /dev/sda: 53.6 GB, 53687091200 bytes
255 heads, 63 sectors/track, 6527 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 6527 52323705 8e Linux LVM

Disk /dev/sdb: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 26108 209712478+ 83 Linux

Okie, so as i expanded disk from clound cPanel, i have got 268.4 GB of disk,
however df -h still doesnot show the equal amount.
Now that means i will have to delete and re partition it.
Yes, Delete, And yes, it wont delete files. So do need to worry.

# fdisk /dev/sdb

The number of cylinders for this disk is set to 32635.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 268.4 GB, 268435456000 bytes
255 heads, 63 sectors/track, 32635 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 26108 209712478+ 83 Linux

Your ads will be inserted here by

Easy Plugin for AdSense.

Please go to the plugin admin page to
Paste your ad code OR
Suppress this ad slot.

Command (m for help): d
Selected partition 1

// I have deleted partition 1 on /dev/sdb
// It could be sdb2 in your case which will be partition 2 and sdb3 might be 3 and so on.

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

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

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.

# resize2fs /dev/sdb1
resize2fs 1.39 (29-May-2006)
The filesystem is already 52428119 blocks long. Nothing to do!

Yes here we will need to reboot.
# reboot

Broadcast message from root (pts/0) (Sat Apr 6 22:18:38 2013):

The system is going down for reboot NOW!

OOPSY not yet, ok lets not worry
# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
47G 19G 26G 43% /
/dev/sda1 99M 20M 75M 21% /boot
tmpfs 3.0G 0 3.0G 0% /dev/shm
/dev/sdb1 197G 182G 4.9G 98% /var

# resize2fs /dev/sdb1
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/sdb1 is mounted on /var; on-line resizing required

Performing an on-line resize of /dev/sdb1 to 65535151 (4k) blocks.
The filesystem on /dev/sdb1 is now 65535151 blocks long.

# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
47G 19G 26G 43% /
/dev/sda1 99M 20M 75M 21% /boot
tmpfs 3.0G 0 3.0G 0% /dev/shm
/dev/sdb1 247G 182G 52G 78% /var

Bingo ))