LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Blogs > beachboy2
User Name
Password

Notices


Rate this Entry

Adding a Second (Backup) Drive (drive2)

Posted 07-06-2023 at 02:15 PM by beachboy2
Updated 07-07-2023 at 08:29 AM by beachboy2
Tags backup, drive, uuid

Note: If you do not have gedit installed, then install it using:

Code:
sudo apt install gedit
Alternatively, use nano or vim or vi or other text editor instead of gedit.

Then modify your particular UUID settings and username etc using the following procedure:

1. Find the UUID of HDD (drive2) using:

Code:
sudo blkid
NB The blkid results will show /dev/sda* as the main drive partitions and usually /dev/sdb1 refers to the second (backup) drive partition.

Copy the UUID for HDD (drive2) {/dev/sdb1} without the quotes.

a0fa1bba-ab5e-460a-8d22-0c8beaa48a86

2. Create new directory (drive2), followed by modifications to the /etc/fstab file.

Code:
sudo mkdir /media/drive2
3. Modify /etc/fstab file:

Code:
sudo gedit /etc/fstab
4. Example:

# /etc/fstab: static file system information.

# <file system> <mount point> <type> <options> <dump> <pass>

# /media/drive2 was on /dev/sdb1

UUID=a0fa1bba-ab5e-460a-8d22-0c8beaa48a86 /media/drive2 ext4 defaults 0 0

# / (root) was on /dev/sda1 during installation

UUID=4a8455b4-7b5a-4365-9267-85bcaf551133 / ext4 errors=remount-ro 0 1

# /home was on /dev/sda6 during installation

UUID=2df03568-787c-418d-b6b5-21c262813c7c /home ext4 defaults 0 0

# swap was on /dev/sda3 during installation

UUID=46a25788-6957-418b-b9c8-f3b276adf335 none swap sw 0 0

5. NB Make sure all pass numbers are correct.

1 for root, 0 for swap, 0 for /home and drive2.

6. File > Save and Close.

7. NEXT, mount drive2:

Code:
sudo mount /dev/sdb1 /media/drive2
8. Reboot:
Code:
 sudo reboot
9. Then:
Code:
sudo chown -R username:username /media/drive2
Posted in Uncategorized
Views 267 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 03:25 AM.

Main Menu
Advertisement
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration