Format the new hard drive in linux

by: acul Tuesday, November 29th, 2011

The first step that should be done is when you install a new hard drive in linux is to check whether the new hard disk that you attach your linux detected by what is not, for that execute the following command:

[root@dodi data]# fdisk -l | grep "Disk"
Disk /dev/hdb: 41.1 GB, 41110142976 bytes

The data above shows that your hard disk space is detected by the hard drivefrom the computer you who read by the system that is equal to 40 Gb more.

After that, format your hard drive:

mkfs.ext3 /dev/hdb

After the successful format then create a new path to the new hard drive

mkdir /baru

Then mount your hard drive

mount /dev/hdb /baru

Check whether your disk unreadable in the system

df -h

And who execute the following command to insert a new partition function for the insert into the file

/etc/fstab
echo "/dev/hdb /baru ext3 defaults 0 0" >> /etc/fstab

After that, please reboot your server to test the new fstab settings on your server.

 

source : http://blog.abdullahbaadilla.com

Home | »

 

Leave a Comment