This result lists all the connected storage devices, the name of their filesystem and where they are currently mounted onģ. From this command, you should see a result as we have below Filesystem Size Used Avail Use% Mounted on df -hĭf stands for “disk-free”, and is typically used to show the available disk space for file systems, but it also displays the name of the filesystem.Ģ. To do this, we will be making use of the df command. We need first to find out the filesystem name for the drive we want to mount to our Raspberry Pi. Identifying the Disks You Want to Mountġ. In this section, you will learn how to identify and mount any attached disk drives. If you want to mount the drive to your Raspberry Pi permanently, then we will need to set up the drive in the fstab file. Mount a USB Drive to the Raspberry Pi Manually In our next step, we will mount the drive using the fstab file and force permissions of a given user and group. You might come across problems if you wish to allow access to the drive to a specific user that isn’t the default user. You can also find out the UUID by using the following command: ls -l /dev/disk/by-uuid. It will retain its mount location whenever you remove and re-insert the drive since it uses the UUID of the drive for the mount folder name. The automatic mounting done by Raspbian will be fine for most projects and just regular use. If you do like the video, then be sure to subscribe or follow us on social media to stay up to date on all my projects, guides and much more.Īs you can see my drive located at /dev/sda1 has been automatically mounted to /media/pi/CA1C-06BC. It will take you through all the necessary steps to getting your USB drive mounted correctly. If you want to see how to do this project visually, then be sure to check out my video below. This recommendation is because the Raspberry Pi is unable to output enough power via the USB ports to power the drive. Note: If you plan on using an external hard drive, then it is highly likely you will need a powered USB hub. You will need some basic equipment for setting up a Raspberry Pi mounted USB drive. If you don’t, then you should still be able to complete this tutorial without issue. Having a good understanding of Linux file permissions will make this tutorial a lot easier. Once you have a general understanding, it becomes a pretty easy task. Mounting drives is an important skill to have when it comes to working hard drives and file structures in Linux. So you will need to either set it up manually or install the software package to have it automatically mount. It’s important to know that Raspbian lite currently does not automatically mount your drives. If you’re looking to have this drive accessible over your network, then the Raspberry Pi samba server is better suited for your needs.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |