adding_a_second_hard_drive
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
adding_a_second_hard_drive [2015/07/04 14:30] – juckins | adding_a_second_hard_drive [2023/12/31 16:46] (current) – juckins | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ==== Adding a Second Hard Drive to Linux Machine ==== | ||
+ | |||
+ | __31 December 2023 - 4TB SSD Hard Drive on NUC 13 Pro Kit running Rocky Linux 9.3__ | ||
+ | * Install gparted RPM | ||
+ | * Start up gparted as root | ||
+ | * Select the /dev/sda disk using the pull-down menu in the upper right corner | ||
+ | * Note that the primary disk is / | ||
+ | * Device > Create Partition Table... | ||
+ | * Choose the default ' | ||
+ | * Partition > New | ||
+ | * Select defaults except for the following: | ||
+ | * Partition name: disk2 | ||
+ | * Label: disk2 | ||
+ | * File system: ext4 | ||
+ | * Click Add | ||
+ | * Click green check mark to Apply All Operations | ||
+ | * Open an xterm as root | ||
+ | * mkdir /disk2 | ||
+ | * You need to modify the /etc/fstab entry to something like the following | ||
+ | * '' | ||
+ | * You find the UUID for the new hard disk by going to ''/ | ||
+ | * There you will see the UUID pointing to the drive (ex. ../../sda) | ||
+ | * Use that information to update ''/ | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * Ensure you see /disk2 mount and you can cd in and touch/ | ||
+ | * Reboot to ensure disk mounts correctly | ||
+ | |||
+ | |||
+ | __19 April 2016 - 3TB Hard Drive on CentOS 6__ | ||
+ | |||
+ | See [[http:// | ||
+ | |||
+ | * Couldn' | ||
+ | * Had to make a new partition using the GUI application GParted in format ' | ||
+ | |||
+ | ---- | ||
+ | |||
Follow the instructions on this page. But if you are using SATA drives, replace " | Follow the instructions on this page. But if you are using SATA drives, replace " | ||
Line 19: | Line 58: | ||
Use rescue mode if you forgot to undo /etc/fstab | Use rescue mode if you forgot to undo /etc/fstab | ||
- | RHEL6 rescue mode: | + | RHEL6 rescue mode: |
https:// | https:// | ||
+ | |||
vi /etc/fstab to remove old HDD entry. | vi /etc/fstab to remove old HDD entry. | ||
Reboot, get this prompt: | Reboot, get this prompt: | ||
- | SELinux relabeling required. | + | |
- | Each * is 1000 files that have been relabeled | + | SELinux relabeling required. |
+ | |||
+ | Note, each * is 1000 files that have been relabeled | ||
http:// | http:// | ||
- | Process | + | |
- | Not sure how many files it had. | + | Relabeling |
Partition the new drive: | Partition the new drive: | ||
- | Reference http:// | ||
- | [root@metroliner: /dev/disk]# fdisk /dev/sdf | + | http:// |
+ | |||
+ | < | ||
+ | [root@localhost: /dev/disk]# fdisk /dev/sdf | ||
The device presents a logical sector size that is smaller than | The device presents a logical sector size that is smaller than | ||
Line 90: | Line 136: | ||
Calling ioctl() to re-read partition table. | Calling ioctl() to re-read partition table. | ||
Syncing disks. | Syncing disks. | ||
- | [root@metroliner: / | + | [root@localhost: / |
+ | </ | ||
Format the new drive: | Format the new drive: | ||
- | + | * Open up Applications > System Tools > Disk Utility | |
- | Open up Applications > System Tools > Disk Utility | + | * Note for CENTOS7 you need to install gnome-disk-utility |
- | See Storage Devices on left side of GUI | + | * Then run: gnome-disks |
- | Click on the new hard drive | + | * Upper right hand corner has the link to view SMART data |
- | Should see new partition | + | * See Storage Devices on left side of GUI |
- | Click Format Volume | + | |
- | Give it a label, use default (ext4) | + | |
+ | | ||
+ | | ||
Update /etc/fstab with drive UUID in / | Update /etc/fstab with drive UUID in / | ||
+ | |||
mount -a | mount -a | ||
Reboot as final test. | Reboot as final test. | ||
adding_a_second_hard_drive.txt · Last modified: 2023/12/31 16:46 by juckins