Enter Your Email

Enter your email address:

Delivered by FeedBurner

Custom Search

Friday, August 01, 2008

Configure and mount a new disk in Enterprise Linux

In Previous section we saw how to add storage (Disk) to an existing OS. This section we go ahead with configuring and mounting the file system, in Enterprise Linux.
1) Use putty to connect to the Guest Operating system from your Host operating system. ## You can refer How to connect host and Guest OS in VMWare.
2)
Login as root
login as: root
root@192.168.2.135's password:
Last login: Fri Aug 1 13:12:56 2008 from 192.168.2.130
[root@oracledb2 ~]#
3)
Browse for the newly added disk in Linux using, you can see the newly added disk with /dev/sdb does’t contain a valid partition table.
[root@oracledb2 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 637 5116671 83 Linux
/dev/sda2 638 1718 8683132+ 83 Linux
/dev/sda3 1719 2355 5116702+ 83 Linux
/dev/sda4 2356 2610 2048287+ 5 Extended
/dev/sda5 2356 2610 2048256 82 Linux swap
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[root@oracledb2 ~]#

4) Create a partition using fdisk /dev/sdb
[root@oracledb2 ~]# fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.
The number of cylinders for this disk is set to 1305.
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)
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
Command (m for help): n ### Select n here
Command action
e extended
p primary partition (1-4) ### Select P for a primary partition
p
Partition number (1-4): 1
First cylinder (1-1305, default 1): 1
Last cylinder or +size or +sizeM or +sizeK (1-1305, default 1305): 1305
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@oracledb2 ~]#

5) You can check the new partition
[root@oracledb2 ~]# fdisk -l
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 637 5116671 83 Linux
/dev/sda2 638 1718 8683132+ 83 Linux
/dev/sda3 1719 2355 5116702+ 83 Linux
/dev/sda4 2356 2610 2048287+ 5 Extended
/dev/sda5 2356 2610 2048256 82 Linux swap
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux
[root@oracledb2 ~]#
6) Format the Newly added partition and add a label to it.

7) Mount the new file system

8) Make sure that you add this new mount point to /etc/fstab to auto mount next time when you restart the server.

Your disk is ready, restart the VMWare Guest OS and check if you can see the mount point auto mounted.

1 comment:

  1. Nice Thanks Ravi. btw my name is also ravi....

    ReplyDelete

 
Copyright © 2005 - 2008 DBA-ONWeb Technical blog. All rights reserved