Installing a hard drive with 4 TB on ubuntu server 14.04

Ubuntu 14.04 16.04 LTS Server (no GUI)
installing a harddisk with 4 TB
(in my case a Seagate ST4000VN000 NAS-Drive 4TB 3.5″)

Partitioning the disk with fdisk does not lead to the required result:
$ fdisk – l /dev/sda
shows the 4000 GB but partionning and formatting brings a result of 2,0TB only.
To be seen with
$ df -h

To format the disk with the whole 4000 GB using parted out of the packet gparted is a good choice.
If not yet installed:
$ sudo apt-get install gparted
installs the required program

Veryfy always to work on the desired drive, otherwise your backup will be neccessary to restore data!

With the packet comes also the command line version: parted
unmount the desired drive first, if it is mounted.
$ umount /dev/sda1
in my case.
$ sudo parted /dev/sda1
the parted prompt appears
shows the commands available.
use following two commands for the use of the whole disk:
# mklabel gpt
# mkpart primary 1mib 100%
parted displays the success.
now the disk can be formatted:
$ sudo mkfs.ext4 /dev/sda1

To edit the /etc/fstab file the UUID of the drive is neccessary. You can get it with
$ blkid
$ blkid | grep sda >> /etc/fstab
appends the UUID to the /etc/fstab file. This makes it easier to edit the strange number.
Be careful to use >> otherwise the contents of your
/etc/fstab will be lost!
(making a backuo before doing changes is always a good idea)
The line for this drive should look like this:
UUID=c51e5d77-2c8e-404c-879d-7d9dc758e9ea /drive4T ext4 defaults 0 2

$sudo mkdir /drive4T
$sudo mount -a

If there are no error messages:

$df -h
/dev/sda1  3.6TB
this is the size of a 4TB drive.

Thanks to information of:
These two pages helped me a lot to configure my system

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)
VN:F [1.9.22_1171]
Rating: 0 (from 0 votes)
Kommentar schreiben

0 Kommentare.

Kommentar schreiben

Hinweis - Du kannst dies benutzenHTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>