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

3 thoughts on “Debian: Add a new hard disk via cli

  1. Hi Arne,

    Het viel me op dat je in jouw documentje geen gebruik maakt van LVM. Zelf ben ik een groot voorstander van dynamisch volume management zoals dat ook in Windows mogelijk is (expand). Zeker in een virtuele omgeving waar je on-the-fly capaciteit kunt toevoegen. Laatst las ik via distrowatch.com twee artikelen (DistroWatch Weekly issues 293 en 294) die het gebruik van LVM op een laagdrempelige manier uitlegt. Een en ander kun je terug lezen op het volgende URL: http://distrowatch.com/weekly.php

    Groeten,

    Rudolf

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.