[Note] Ubuntu machine to add a new hard drive installation process

Although the fast SSD, but the capacity is not enough, buy a piece of machinery Seagate 4TB hard drive, ready to desktop PC expansion.

Installation Environment

  • OS: Ubuntu 18.04

Install a new hard disk

Asked the customer service, this case has brought the original hard disk chute, does not require a set screw.
SATA3 bought a data line, a straight one bend, get.

Hard disk format

There are graphical tools under Ubuntu Disks, you can save typing along at the command line.
4T found inside the hard disk, then double click on the gear button, the first is to format the disk.
Setting label, Ext4 format selected, the next step is like.

Mount hard disk

First with a fdiskview larger hard disk location

$ sudo fdisk -l

According to the disk size 3.7 TiB, find the location of a large hard drive, I am here /dev/sda.
Then create a directory at the root /data, and then mount it

$ sudo mkdir /data
$ sudo mount /dev/sda /data

Now you can enter the /datadirectory enjoy the 4T space.

Mount the hard drive when you restart

In order to restart the machine can automatically mount, you need to configure /etc/fstabthe file, and then add the last line

/dev/sda  /data   ext4    defaults    0   0

Restart the machine to verify OK, call it a day.

Guess you like

Origin www.cnblogs.com/journeyonmyway/p/11089056.html