Adding Extra Hard Disk Space to existing Linux System

[root@vmlinux ~]# fdisk /dev/sdb

The number of cylinders for this disk is set to 2219.
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): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-2219, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-2219, default 2219):
Using default value 2219

Command (m for help): p

Disk /dev/sdb: 18.2 GB, 18253611008 bytes
255 heads, 63 sectors/track, 2219 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2219    17824086   83  Linux

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@vmlinux ~]#
[root@vmlinux ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 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        1958    15623212+  8e  Linux LVM

Disk /dev/sdb: 18.2 GB, 18253611008 bytes
255 heads, 63 sectors/track, 2219 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2219    17824086   83  Linux
[root@vmlinux ~]# mkfs.ext3 -b 4096 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2228224 inodes, 4456021 blocks
222801 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
136 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 24 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
[root@vmlinux ~]# mkdir /u01
[root@vmlinux ~]#
[root@vmlinux ~]#
[root@vmlinux ~]# echo "/dev/sdb1   /u01   ext3   defaults   1 1" >> /etc/fstab
[root@vmlinux ~]#
[root@vmlinux ~]#
[root@vmlinux ~]# mount /u01
[root@vmlinux ~]#
[root@vmlinux ~]#
[root@vmlinux ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
                       12G  3.4G  7.5G  32% /
/dev/sda1              99M   13M   82M  14% /boot
tmpfs                 785M     0  785M   0% /dev/shm
/dev/sdb1              17G  173M   16G   2% /u01
[root@vmlinux ~]#
[root@vmlinux ~]# fdisk -l

Disk /dev/sda: 16.1 GB, 16106127360 bytes
255 heads, 63 sectors/track, 1958 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        1958    15623212+  8e  Linux LVM

Disk /dev/sdb: 18.2 GB, 18253611008 bytes
255 heads, 63 sectors/track, 2219 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1        2219    17824086   83  Linux
[root@vmlinux ~]#

Comments

Popular posts from this blog

Xmanager RHEL 6 xclock :command not found -- Resolved

Racktable on ubuntu installation

RPM Tit-Bits ;-)