Add Hard Drive to Ubuntu Server

Install the internal hard drive or plug in the USB external hard drive. Use lsusb to show your external hard drive. Use fdisk to identify the new hard drives:

$ sudo fdisk -l | sd*

Start fdisk:

$ sudo fdisk /dev/sde

List partitions and delete existing partition and create new partition:

p (to list partitions)
d (to delete existing partition)
1 (which partition to delete)
n (new partition)
1 (new partition number)
default (start of partition)
default (end of partition)
y (to remove signature)
w (to write changes)

Next, make the file system:

$ sudo mkfs -t ext4 /dev/sde1

Hard Drive Larger than 2TBpar

parted /dev/sde
mklabel gpt
mkpart primary 0TB 12TB

$sudo mkfs.ext4 /dev/sde1

Copy Files from Old Hard Drive with Rsync

rsync -a /media/storage/ /media/hdd3


Leave a comment