Setting up new hard drives

Ensure the new drive is seen by the operating system by using any of the following:

tail -f /var/log/messages
ls /dev/sd*
lsscsi (need to install)
lshw (need to install)

Confirm that it is the correct drive:

fdisk -l /dev/sdf      -> You should see a drive w/o any partitions and the correct size

Make a partition on the drive

parted -a optimal /dev/sdf     --> aligns the partition to the nearest boundary. Optimizes drive.
gpt          --> Needed to use large disks over 2TB
no name
Type: xfs
Start: 0%
End: 100%

Format the drive

mkfs.xfs -L volname /dev/sdf1    -> The volname is useful to mount partitions by label ie: LABEL=volname


Posted in Knowledge and tagged , , , .

Leave a Reply

Your email address will not be published. Required fields are marked *

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