Forum

Please or Register to create posts and topics.

Installing A Second Hard Drive in a Linux Desktop

I wanted to install a 1TB SSD in my Ubuntu Linux computer in addition to the 512GB SSD I already had. I wondered when the 512 was full, would it just automatically add files to the new 1TB SSD? Here's what I found out...

When you install a new 1TB SSD in addition to your existing 512GB SSD on your Ubuntu system, the system won't automatically start adding files to the new drive when the 512GB SSD is full. By default, Ubuntu (and other Linux distributions) mounts each drive separately, meaning each drive functions as an independent storage device.

To set up automatic storage expansion across both drives, you have a few options:

1. Mount the new SSD and use it as a separate drive:

  • You can mount the 1TB SSD as a separate storage location. In this case, you'd manually store specific files on the new SSD. For example, you might use it to store media, backups, or other large files.
  • You'd need to create a mount point (e.g., /mnt/1tb_ssd) and manually move files or directories there.
  • When one drive is full, you'll need to manually start storing files on the other.

2. Extend storage with Logical Volume Management (LVM):

  • Using LVM, you can combine the two SSDs into a single logical volume, so the system treats them as a single storage pool. When the 512GB SSD is full, files will automatically start being stored on the 1TB SSD.
  • However, this setup may require repartitioning and backing up data, as LVM operates on entire partitions.

3. Mount the new SSD to a specific directory:

  • Another approach is to mount the 1TB SSD to a specific directory (e.g., /home/user/Documents or /var/lib). This allows you to seamlessly expand the storage of a specific folder without combining the drives completely like LVM.

Example Setup for Manual Mounting:

  1. Install the new 1TB SSD and ensure it's recognized by the system.
  2. Format the SSD (e.g., using ext4).
  3. Create a mount point (e.g., /mnt/1tb_ssd).
    sudo mkdir /mnt/1tb_ssd
    
  4. Mount the new SSD:
    sudo mount /dev/sdX1 /mnt/1tb_ssd
    

    (Replace /dev/sdX1 with the actual device path for your new SSD).

  5. Add it to /etc/fstab to automatically mount on boot:
    sudo nano /etc/fstab
    

    Add the line:

    /dev/sdX1   /mnt/1tb_ssd  ext4  defaults  0  2
    

This method requires you to consciously choose which drive to save files on, but it's simple and doesn't involve complex configurations like LVM.

I used Rescuezilla to clone the 512GB SSD and then re-install the OS on the new 1TB drive. Then it was mounted, and a new entry was added to the fstab file using Nano as described above.