adding_a_second_hard_drive
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
adding_a_second_hard_drive [2012/08/29 20:05] – juckins | adding_a_second_hard_drive [2023/12/31 16:46] – 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 the /etc/fstab file | ||
+ | * systemctl daemon-reload | ||
+ | * mount -a | ||
+ | * df -hP | ||
+ | * 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 4: | Line 43: | ||
For newer hardware, see [[http:// | For newer hardware, see [[http:// | ||
+ | |||
+ | [[https:// | ||
+ | |||
+ | |||
+ | ---- | ||
+ | |||
+ | 4 July 2015 Notes | ||
+ | |||
+ | Backup any important files | ||
+ | |||
+ | vi /etc/fstab to remove old HDD entry first | ||
+ | Remove/ | ||
+ | Boot. | ||
+ | |||
+ | Use rescue mode if you forgot to undo /etc/fstab | ||
+ | RHEL6 rescue mode: | ||
+ | |||
+ | https:// | ||
+ | |||
+ | vi /etc/fstab to remove old HDD entry. | ||
+ | |||
+ | Reboot, get this prompt: | ||
+ | |||
+ | SELinux relabeling required. | ||
+ | |||
+ | Note, each * is 1000 files that have been relabeled | ||
+ | |||
+ | http:// | ||
+ | |||
+ | Relabeling took 18 minutes on a 250MB primary drive 87% full. Not sure how many files it had. | ||
+ | |||
+ | Partition the new drive: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | < | ||
+ | [root@localhost: | ||
+ | |||
+ | The device presents a logical sector size that is smaller than | ||
+ | the physical sector size. Aligning to a physical sector (or optimal | ||
+ | I/O) size boundary is recommended, | ||
+ | |||
+ | WARNING: DOS-compatible mode is deprecated. It's strongly recommended to | ||
+ | | ||
+ | | ||
+ | |||
+ | Command (m for help): c | ||
+ | DOS Compatibility flag is not set | ||
+ | |||
+ | Command (m for help): u | ||
+ | Changing display/ | ||
+ | |||
+ | Command (m for help): p | ||
+ | |||
+ | Disk /dev/sdf: 2000.4 GB, 2000398934016 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disk identifier: 0x0000f111 | ||
+ | |||
+ | | ||
+ | |||
+ | Command (m for help): n | ||
+ | Command action | ||
+ | | ||
+ | | ||
+ | p | ||
+ | Partition number (1-4): | ||
+ | Value out of range. | ||
+ | Partition number (1-4): 1 | ||
+ | First sector (2048-3907029167, | ||
+ | Using default value 2048 | ||
+ | Last sector, +sectors or +size{K, | ||
+ | Using default value 3907029167 | ||
+ | |||
+ | Command (m for help): p | ||
+ | |||
+ | Disk /dev/sdf: 2000.4 GB, 2000398934016 bytes | ||
+ | 255 heads, 63 sectors/ | ||
+ | Units = sectors of 1 * 512 = 512 bytes | ||
+ | Sector size (logical/ | ||
+ | I/O size (minimum/ | ||
+ | Disk identifier: 0x0000f111 | ||
+ | |||
+ | | ||
+ | / | ||
+ | |||
+ | Command (m for help): w | ||
+ | The partition table has been altered! | ||
+ | |||
+ | Calling ioctl() to re-read partition table. | ||
+ | Syncing disks. | ||
+ | [root@localhost: | ||
+ | </ | ||
+ | |||
+ | Format the new drive: | ||
+ | * Open up Applications > System Tools > Disk Utility | ||
+ | * Note for CENTOS7 you need to install gnome-disk-utility | ||
+ | * Then run: gnome-disks | ||
+ | * Upper right hand corner has the link to view SMART data | ||
+ | * See Storage Devices on left side of GUI | ||
+ | * Click on the new hard drive | ||
+ | * Should see new partition | ||
+ | * Click Format Volume | ||
+ | * Give it a label, use default (ext4) | ||
+ | |||
+ | Update /etc/fstab with drive UUID in / | ||
+ | |||
+ | mount -a | ||
+ | |||
+ | Reboot as final test. | ||
adding_a_second_hard_drive.txt · Last modified: 2023/12/31 16:46 by juckins