Google Plus

Add new hard disk to your Linux machine

Written by Mel Kham on . Posted in Linux tutorials

If you want to add more storage to your machine by adding a new hard drive,and you have already a linux system installed in the first hard drive,  then just follow this tutorial.

Please  these  steps.

1-shutdown your computer and   turn off  the  power  switch

2-Check  the jumper pins on the  back of  your hdd

3-insert  your  disk  in the  metal  drive  and  attach it

4-connect  the  power  cable  to  your  new  disk

5-plug  the  IDE  cable  into back of  your  disk

6  reboot  your  machine

en check  if  new  disk  is  add  with

#fdisk  -l

you  will  see  some  thing  like  /dev/hdb  disk  non partioned .

please  foloow  how  you can creat partion on this  new  disk

[root]# fdisk /dev/hdb

Command (m for help): m (Enter the letter “m” to get list of commands)
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): n
Command action
e extended
p primary partition (1-4)
e
Partition number (1-4): 1
First cylinder (1-2654, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-2654, default 2654):
Using default value 2654

Command (m for help): p

Disk /dev/hdb: 240 heads, 63 sectors, 2654 cylinders
Units = cylinders of 15120 * 512 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 1 2654 20064208+ 5 Extended

Command (m for help): w (Write and save partition table)

[root]# mkfs -t ext3 /dev/hdb1

mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
2508352 inodes, 5016052 blocks
250802 blocks (5.00%) reserved for the super user
First data block=0
154 block groups
32768 blocks per group, 32768 fragments per group
16288 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000

Writing inode tables: done
Creating journal (8192 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.

[root]# mkdir /unixbackup

 

[root]# mount -t ext3 /dev/hdb1 /unixbackup

The  new  disk  partition should  be  detected  every  boot . from there is  need  to add  this  line  to /etc/fstab

/dev/hdb1 /unixbackup  ext3 defaults 1 2
For questions please refer to our Q/A forum at : http://ask.unixmen.com

Mel Kham

Founder of Unixmen, Living in Amsterdam. Am working in my free time to help people to understand the Opensource and to explain them in easy way how to make the fist steps to the the light. Working day and night with my Co-founder Zinovsky to keep this website live even with less resources.
  • Adonis

    Or you can use Gparted, which is relatively easier point and click!

  • Dan Liew

    @Adonis – But the command line is much more fun!

    @Pirat9 – Although nothing much changes command line wise between using IDE and SATA drives (except SATA drives get called /dev/sd[DRIVE_LETTER][PARTION_NO]) it might be nice for other users to give it a small mention as SATA drives are very popular too.

    Also the whole /dev/hd[..] is dependent on the system setup and BIOS settings, it is probably better to use a UUID in /etc/fstab instead of the device name. More info [url]http://www.linux.com/archive/feature/146951[/url]

    Nice article.

  • http://www.amarillolinux.com/ The Doctor

    IDE? Does anyone still use IDE drives? :confused:

  • http://www.yazilimyukle.com ahmsengul

    administrator@ubuntu:/unixbackup$ mkdir -p tools
    mkdir: cannot create directory `tools’: Permission denied

  • pirat9

    enter your message here…[quote=ahmsengul]administrator@ubuntu:/unixbackup$ mkdir -p tools
    mkdir: cannot create directory `tools’: Permission denied[/quote]
    do it under root access

Like us on Facebook

This week Top Posts

Write for us

Recent Comments

DragonFartOutLoud

|

it went to china.

DragonFartOutLoud

|

great review! i’ve been using it as my main OS since Beta 1 release. its been a awesome ride so far :)

jet li

|

i try the method, and i unzip the image contain zip secret, i dont find the file that i was hide, where it go? and how to open it? :s

zinovsky

|

Yes, it is possible using Steganography, we will post another quick howto do that in the next few days

SK

|

Hey Abhishek

Yes there are many open source tools available to meet your requirements. They are easy to manage and has a decent web gui to configure. We will publish all of them one by one shortly. Stay tuned with us.

 
IDG Tech Network
Copyright © 2008-2013 Unixmen.com .
Maintained by Anblik .