In this post I’ll gather all useful commands that I used during my experiments with RPi
Commands:
Lists all attached bulk storage devices
lsblk
List all drives by uuid
ls -l /dev/disk/by-uuid/
Mount drive
sudo mount -o uid=pi,gid=pi /dev/sda1 /media/usb
you have to use uid and gid in order to delete add new devices.
Automount drive at start-up
sudo nano /etc/fstab
and add
UUID=18A9-9943 /media/usb vfat auto,nofail,noatime,users,rw 0 0
The “nofail” option allows the boot process to proceed if the drive is not plugged in. The “noatime” option stops the file access time being updated every time a file is read from the USB stick. This helps improve performance.
Check free SD card space (source)
df -Bm
Sources:
https://blog.alexellis.io/attach-usb-storage/
