August 3, 2020


Debian – Add USB hard drive

drive-usb-iconUSB drives is a good way of extracting large amounts of data from your servers quickly. And of course a lot of other things. There are a few things to notice. The file system of your hard drive. If it is supported by Linux you don´t need to format it. You can go ahead and just mount it.

The scenario. You need to backup a lot of data from your linux server. And the drive is formatted as fat32.

After the disk is connected to a usb port you need to find the drive letter (ex: sdb)
Sudo or su
fdisk -l
This will give you information about all your connected drives. Not just USB drives.

Before mounting the drive, we need to create a folder for the USB drive. Since it´s a backup drive, we call it backup.
mkdir /backup

Once you found the drive letter you can mount the drive.
mount -t auto /dev/sdb /backup

If you reboot the drive will be unmounted.
To make it stick after reboot, check out my post here. You can also just run the mount command if you only need now and then.

Happy hard driving!