Add New Mount On Linux ( Redhat 6)

Sometime you need to add new mount to Linux after creation the following article will describe how to do this , all the steps tested on Redhat 6.1 , after add disk

[root@localhost Desktop]# fdisk -l
Disk /dev/sda: 85.9 GB, 85899345920 bytes
255 heads, 63 sectors/track, 10443 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000be2c2
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1         262     2097152   83  Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2             262        2220    15728640   83  Linux
/dev/sda3            2220        3525    10485760   83  Linux
/dev/sda4            3525        7833    34601984    5  Extended
/dev/sda5            3525        4831    10485760   83  Linux
/dev/sda6            4831        5484     5242880   82  Linux swap / Solaris
/dev/sda7            5484        5745     2097152   8e  Linux LVM
/dev/sda8            5745        7833    16772096   83  Linux
Disk /dev/sdb: 26.8 GB, 26843545600 bytes
255 heads, 63 sectors/track, 3263 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

as you see in the red line , I added disk with size 26G.
I need to prepare this disk :

[root@localhost Desktop]# fdisk /dev/sdb

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xe88f8de7.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won’t be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
WARNING: DOS-compatible mode is deprecated. It’s strongly recommended to
         switch off the mode (command ‘c’) and change display units to
         sectors (command ‘u’).
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
Partition number (1-4): 1
First cylinder (1-3263, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-3263, default 3263):
Using default value 3263
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.

After create disk i need to format the disk i choose ext3 :

[root@localhost Desktop]# mkfs -t ext3 /dev/sdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1638400 inodes, 6552504 blocks
327625 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
200 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
Writing inode tables: done                          
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 28 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Link the disk with new folder 

[root@localhost Desktop]#mkdir /u03
[root@localhost Desktop]# mount -t ext3 /dev/sdb1 /u03
[root@localhost Desktop]#
[root@localhost Desktop]#
[root@localhost Desktop]#
[root@localhost Desktop]# df -h
/dev/sdb1              25G  173M   24G   1% /u03

Don’t forget to add to /etc/fstab 
Thank you 
Osama mustafa

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.