Page 1 of 1

disk addition and partitioning.

Posted: Mon Oct 08, 2007 11:37 pm
by azfar
I have to add another disk in my linux box and then create a 20gb partition on 80gn hard disk and then mount it
i dont have any experience of it command line\
any body tell me the steps.
its rhel4

Posted: Tue Oct 09, 2007 12:50 am
by lambda
add the drive. boot up the system. typing "dmesg | grep hd" or "dmesg | grep sd" will show you the drive device (something like /dev/hdb or /dev/sdc, depending on the drive type and controller you plugged it into). type "fdisk /dev/hdb" or whatever, and create your partition(s). type "mkfs.ext3 /dev/hdb1" or whatever the partition is to create a filesystem. add /dev/hdb1 to /etc/fstab (use the other lines as examples) to mount it on boot.

you can probably use gparted or something in place of the fdisk and mkfs commands, but you should learn to use the commandline tools. otherwise, i'll taunt you in public. after all, you have over four hundred posts here.

Posted: Tue Oct 09, 2007 1:26 am
by azfar
thanks lambada bus yaar kabhi new hard disk add kernay ka exp hi nah hua mainay socha ahtiyatun poochloon before staring the work
btw way whats the best ways to quickly check harddisk performance and bad sectors.

Yaseen

Posted: Tue Oct 07, 2008 4:52 am
by ghulam yaseen
Hello :),

A longer, more extended check of one partition
--> badblocks -n -v /dev/hda1

A quick check of only one partition
--> badblocks -v /dev/hda1

To find additional info about your hard disk, use this command:

--> hdparm -i /dev/hda

8)