Create, Format and Mount Linux disk


The only way that I have managed to get a Linux box to recognis a disk id to reboot.

Once rebooted the disk will then be accessible. (OS CentOS 5.5)

fdisk – l

This will something like this

Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 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        1044     8281507+  8e  Linux LVM

Disk /dev/sdb: 107.3 GB, 107374182400 bytes
255 heads, 63 sectors/track, 13054 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

In this case Linux has mounted the disk as /dev/sdb

mkfs -t ext3 /dev/sdb

The is might ask a question x is entire device, not just one partition! Answer y

mkdir /u10 This is the folder that you wish to mount your drive to, this can be called anything ( I personally use the Oracle standard)

mount -t ext3 /dev/sdb /u10 This mount the drive

vi /etc/fstab

Add the following line

/dev/sdb                 /u10                  ext3                  defaults              0 0

Advertisements


Leave a Reply

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

WordPress.com Logo

You are commenting using your WordPress.com 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 )

Google+ photo

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

Connecting to %s