Mounting Multiple USB Storage Drives

Posted by rcavdh 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Mounting Multiple USB Storage Drives
January 06, 2018 06:39PM
How does one Mount Multiple USB Storage Drives?
It seems to me that if I use sudo /opt/piratebox/rpi/bin/usb_share.sh it just moves everything piratebox related from the SD card to the new USB location.
What I would like to do is expand capacity and share more stuff by adding more usb storage devices while at the same time keeping the Piratebox stuff on the SD card.
I was hoping it to be possible to "safely remove" drives in case of a temporary share.
I'm quite new at this so apologies if this is a stupid question.

Running RPi 3.

Thanks for your time
Re: Mounting Multiple USB Storage Drives
January 07, 2018 06:49AM
Hi,
your observation is correct. The usb_share script does move all needed files over to one specific USB stick and the /opt/piratebox/share folder is then located physically on the USB stick.

You can achieve the auto-mount using thie Archlinux wiki/howto udisks.

Theoretical it is possible to do something like you want, but you have to solve the following issues, which I can't provide an out-of-stock solution for, but maybe we hack something together ?!

Following problems to be solved:
- correct setup of the package udisk2
- no nice directory listing on mounted usb sticks during runtime. The current directory listing needs two files inside the Shared folder to be displayed correctly. But it should be possible to place these two files during the udev event inside the mount point
- Mountpoints which aren't used anymore needs to be cleaned up during reboot/a while/or better during umount. (or you will have a bunch of folders laying around)
- link /media to /opt/piratebox/share/Shared/media (trivial)
- Possibly permission issues for accessing the USB drive.

In addition I recommend in your case to enable the sdcard share for the normal use case.

best regards Matthias



Edited 1 time(s). Last edit at 01/07/2018 06:54AM by Matthias.