๐Ÿงท Mounting an External USB Hard Drive on Debian

๐Ÿงท Mounting an External USB Hard Drive on Debian

๐Ÿ“‹ Overview

This guide outlines how to properly identify, mount, and persistently configure an external USB hard drive on a Debian-based system. It is particularly useful for setups involving backup containers like urbackup or media/file storage solutions.


๐Ÿ” Step 1: Identify the USB Drive

lsblk

Look for a device (e.g., /dev/sdb1) with the expected size and no mount point.

sudo blkid /dev/sdb1

This confirms the filesystem type and gets the UUID (used for persistent mounting).


๐Ÿ’พ Step 2: Install Required NTFS Support

If the drive is formatted as NTFS (common for Windows drives), install the NTFS driver:

sudo apt update
sudo apt install ntfs-3g

Note: Do not install fuse on Debian 12 (Bookworm); it conflicts with fuse3.


๐Ÿ“ Step 3: Create a Mount Point

sudo mkdir -p /mnt/usbbackup

๐Ÿ“ Step 4: Configure /etc/fstab

Edit the fstab file to auto-mount the drive at boot:

sudo nano /etc/fstab

Add this line (replace UUID with yours from blkid):

UUID=5E74F4D874F4B43D  /mnt/usbbackup  ntfs-3g  defaults,noatime,nofail,uid=1001,gid=1001,umask=0022,allow_other  0  2

Option

Description

ntfs-3g

NTFS filesystem driver with write support

noatime

Improves performance by disabling access-time updates

nofail

Allows boot to continue if the drive is missing

uid/gid

Sets ownership for consistent Docker access

umask=0022

Applies

rwxr-xr-x

permissions

allow_other

Permits non-root users to access the mount


๐Ÿงช Step 5: Mount and Verify

sudo systemctl daemon-reexec
sudo mount -a

Check if it mounted successfully:

df -h | grep usbbackup

Confirm correct permissions:

ls -ld /mnt/usbbackup

โœ… Example Output

/dev/sdb1 on /mnt/usbbackup type fuseblk (rw,nosuid,nodev,noatime,allow_other,blksize=4096)

๐Ÿ› ๏ธ Troubleshooting



Revision #1
Created 2025-07-20 02:35:53 UTC by Slitzer
Updated 2025-07-20 02:37:59 UTC by Slitzer