Skip to content

Instantly share code, notes, and snippets.

@reterVision
Created March 24, 2013 09:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reterVision/5231199 to your computer and use it in GitHub Desktop.
Save reterVision/5231199 to your computer and use it in GitHub Desktop.
Add new hard disk you Linux.
# Extracted information from below
# http://rbgeek.wordpress.com/2012/05/11/how-to-add-2nd-hard-drive-to-ubuntu/
# http://ubuntuforums.org/showthread.php?t=1659376
# 1. List out all the disk you have in hand now.
sudo fdisk -l
# 2. Create partition on the secondary hard drive.
# Remember to create logical partition.
sudo fdisk /dev/sdb
# 3. Update the kernel with the change.
sudo partprobe /dev/sdb
# 4. Format the new hard disk.
sudo mkfs /dev/sdb1 -t ext4
# 5. Mount the disk to your path.
sudo mount /dev/sdb1 /path-to-new-disk -t ext4
# 6. Permanently Add Hard Disk
# add this line to the bottom
# /dev/sdb1 /path-to-new-disk ext4 defaults 0 0
sudo vi /etc/fstab
# 7. Mount it or reboot.
sudo mount -a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment