Debian: Add a new hard disk via cli


image
These are the steps to add a new hard drive using the cli:

  1. run fdisk –l.  in this how toI will add device: /dev/sdb
  2. use cfdisk /dev/sdb  to create a new partition:
         image 3. Then again,  run the fdisk –l  commando to see the new patition. It has been changed to /dev/sdb1.
    4. format the drive with EXT3:  mkfs.ext3 /dev/sdb1
         image

      5. next you create a mount folder: mkdir –p /media/newdisk
     
    6. mount the drive: mount /dev/sdb1 /media/newdisk/ 
     
    7. the final step, add the new mount point to the /etc/fstab. If you don’t do this step, the new disk will not mounted at boottime. Open the /etc/fstab in your favorite editor. Add the following line: /dev/sdb1 /media/newdisk ext3 defaults 0 2
      8. Reboot the debian machine to see if everything works as expected.
      as you can see, everything went smooth.
     image  

Source: http://rblondon.blogspot.com/2007/09/installing-new-hard-disk-on-debian.html