Robohub.org
 

How to mount an external removable hard drive on a robot


by
23 January 2017



share this:
Credit: CC0 Public Domain

Credit: CC0 Public Domain

We often want to add an external hard drive to our robots in order to have a dedicated drive for data collection. Having the dedicated drive lets the primary drive remain uncluttered, have less wear-and-tear, split logging between drives for performance, and potentially be a larger spinning disk (as opposed to an expensive SSD). It is also useful when the main hard drive is read only.

(For mechanical mounting skip to the end of this post)

So, how should you mount an external hard drive to your robot? There are many tutorials online and resources, however, this is how I do it and why (assuming Linux).

In the /etc/fstab file I add the following line:

mount-hard-drive-robot

The /dev/sdb1 needs to be changed based on your hard disk configuration, however typically if you have one primary drive and one external drive, the external will be sdb1. While you can name a drive based on its unique ID, I usually just do it based how the drive appears in /dev. This lets us plug any (one) drive into the computer and let it be used for data collection.

You need to create a location that the hard disk should be mounted to (for you to access it from). So before the above change you should create that mount directory. To make the directory above you can type sudo mkdir /media/data. I generally use Ubuntu, however in other distributions you might want to use sudo mkdir /mnt/data if /media does not exist.

Next is the file system. Generally in a Linux only environment ext4 is used. If you are in a mixed mode where you need to connect to Windows or Mac machines you might want to use vfat.

Now for the options. The options I often use are:

async,auto,user,exec,suid,rw,nobootwait,noatime
async – Lets data be written to a drive asynchronously. If many cases you might want this to be set to synchronous sync
auto – Mounts drive on boot and/or with mount -a
user – Allows any user to mount this drive
exec – Lets you execute binaries from the drive (might not be needed if you are only writing data)
suid – Allows the user ID to be set when executing a binary (might not be needed if you are only writing data)
rw – Read & Write access to the drive when mounted
nobootwait – Does not interrupt the boot sequence if drive not connected.
noatime – Disables writing file access times to the drive every time you read a file

Depending on the distro I also sometimes add nofail to work with nobootwait.

With the method of mounting the drive above the secondary drive can be auto mounted to the same mount point at boot. If the drive is not present at boot, the boot sequence will not fail. After the computer is up the drive will automatically mount or you might need to type sudo mount -a to mount the drive.

You can see https://wiki.archlinux.org/index.php/Fstab for more information on /etc/fstab.


I spent the top part of this post talking about mounting from the operating system perspective, however some people might get to this page for physical mounting.

There are many ways to mount a hard drive, these range from velcro, to external enclosures, to removable bays.

Here is one way to mount a hard disk for removable data drives that I like:

hard_drive_dock

ICY DOCK ToughArmor MB991SK-B Full Metal 2.5″ SATA 6Gb/s SSD/HDD Hot Swap Mobile Rack for 3.5″ Device Bay (Fits 7, 9.5, 12.5, 15mm height drive) From Newegg.com

hard_drive_sled

Sled that slides and locks into the hard drive bay. The hard drive goes inside of this sled. From newegg.com

This provides a secure mount that will not let the drive fall out while also protecting the drive. It also allows for swapping drives as disks get full and we want to log more data. We often fill up a drive and take it offsite to transfer to a server while filling up another drive. This allows us to easily rotate drives.

The post How to Mount an External Removable Hard Drive on a Robot appeared first on Robots For Roboticists.



tags:


Robots for Roboticists David Kohanbash is a Robotics Engineer in Pittsburgh, PA in the United States. He loves building, playing and working with Robots.
Robots for Roboticists David Kohanbash is a Robotics Engineer in Pittsburgh, PA in the United States. He loves building, playing and working with Robots.





Related posts :



Robot Talk Episode 106 – The future of intelligent systems, with Didem Gurdur Broo

  24 Jan 2025
In the latest episode of the Robot Talk podcast, Claire chatted to Didem Gurdur Broo from Uppsala University about how to shape the future of robotics, autonomous vehicles, and industrial automation.

Robot Talk Episode 105 – Working with robots in industry, with Gianmarco Pisanelli 

  17 Jan 2025
In the latest episode of the Robot Talk podcast, Claire chatted to Gianmarco Pisanelli from the Advanced Manufacturing Research Centre about how to promote the safe and intuitive use of robots in manufacturing.

Robot Talk Episode 104 – Robot swarms inspired by nature, with Kirstin Petersen

  10 Jan 2025
In the latest episode of the Robot Talk podcast, Claire chatted to Kirstin Petersen from Cornell University about how robots can work together to achieve complex behaviours.

Robot Talk Episode 103 – Delivering medicine by drone, with Keenan Wyrobek

  20 Dec 2024
In the latest episode of the Robot Talk podcast, Claire chatted to Keenan Wyrobek from Zipline about drones for delivering life-saving medicine to remote locations.

Robot Talk Episode 102 – Soft robots inspired by plants, with Isabella Fiorello

  13 Dec 2024
In the latest episode of the Robot Talk podcast, Claire chatted to Isabella Fiorello from the University of Freiburg about bioinspired living materials for soft robotics.

Robot Talk Episode 101 – Microscopic surgical robots, with Christos Bergeles

  06 Dec 2024
In the latest episode of the Robot Talk podcast, Claire chatted to Christos Bergeles from King's College London about micro-surgical robots to deliver therapies deep inside the body.

Robot Talk Episode 100 – Robots in space, with Mini Rai

  29 Nov 2024
In the latest episode of the Robot Talk podcast, Claire chatted to Mini Rai from Orbit Rise about orbital and planetary robots.

Robot Talk Episode 99 – Robots mapping the deep ocean, with Joe Wolfel

  22 Nov 2024
In the latest episode of the Robot Talk podcast, Claire chatted to Joe Wolfel from Terradepth about autonomous submersible robots for collecting ocean data.





Robohub is supported by:




Would you like to learn how to tell impactful stories about your robot or AI system?


scicomm
training the next generation of science communicators in robotics & AI


©2024 - Association for the Understanding of Artificial Intelligence


 












©2021 - ROBOTS Association