2. Check New Disk Hardware
$fdisk -l
Disk /dev/sda: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0007b6b3
Device Boot Start End Blocks Id System
/dev/sda1 * 1 1244 9992398+ 83 Linux
/dev/sda2 1245 1305 489982+ 5 Extended
/dev/sda5 1245 1305 489951 82 Linux swap / Solaris
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
255 heads, 63 sectors/track, 1305 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6115b0a0
Device Boot Start End Blocks Id System
/dev/sdb1 1 1305 10482381 83 Linux
Disk /dev/sdc: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x00000000
Disk /dev/sdc doesn't contain a valid partition table
3. Initiate fdisk with the following command:
$sudo fdisk /dev/sdc
=>Fdisk will display the following menu
Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)
Command (m for help):
=> We want to add a new partition. Type "n" and press enter.
Command action
e extended
p primary partition (1-4)
=>We want a primary partition. Enter "p" and enter.
Partition number (1-4):
=>Since this will be the only partition on the drive, number 1. Enter "1" and enter.
Command (m for help):
=> Now that the partition is entered, choose option "w" to write the partition table to the disk. Type "w" and enter.
The partition table has been altered!
=>If all went well, you now have a properly partitioned hard drive that's ready to be formatted.
4. Format New Disk
Format the Partition via Command Line To format the disk as ext3 filesystem (best for use under Ubuntu):
Substitute "/dev/sdc1" with your own drive's path.
$sudo mke2fs -j /dev/sdc1
mke2fs 1.40.8 (13-Mar-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1966080 inodes, 7863809 blocks
393190 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
240 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, 4096000
Writing inode tables: done
Creating journal (32768 blocks):
done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 26 mounts or180 days, whichever comes first. Use tune2fs -c or -i to override.
$sudo fdisk -l
5. Create New mount path
$sudo mkdir /d02/oracle
$chmod 777 /d02/oracle
$mount /dev/sda2 /d02/oracle
5. Set Auto mount
vi /etc/fstab
The text editor window will appear with the fstab file loaded up. You will see something that looks kind of like this:
# /etc/fstab: static file system information.
#
# proc /proc proc defaults 0 0
/dev/hda1 / ext3 defaults,errors=remount-ro 0 1
/dev/hda5 none swap sw 0 0
/dev/hdb1 /media/hdb1 ext3 defaults 0 0
/dev/hdc /media/cdrom0 udf,iso9660 user,noauto 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto 0 0
All you have to do is add a new line for the new drive…
I will add the following line to my fstab for my new drive:
/dev/sdc1 /media/linuxstore ext3 defaults 0 0
$ sudo mount -a
No comments:
Post a Comment