Reply 1# bitmill |
I'm not sure about usbmount, but it's fairly straightforward without it. I have a banana pi & two usb external drives attached shared on samba and nfs.
Firstly you have to find out the unique identities of the drives by runningIt'll give you some results like this:
what you want are the two sda1 & sdb1 drive id's, and just edit your fstab file:and then add the following two lines to it, obviously changing the guids to your results. Copy the Code
- /dev/mmcblk0p1: SEC_TYPE="msdos" UUID="D006-BFCA" TYPE="vfat"
- /dev/mmcblk0p2: UUID="ca07cb7e-26b6-4d91-b980-6f966c57b45b" TYPE="ext4"
- /dev/sda1: UUID="a1577b0e-e1d0-4fc6-af5b-794a7b6c20c0" TYPE="ext4"
- /dev/sdb1: UUID="dc0f3682-a961-40ba-b67d-71de22cc720e" TYPE="ext4"
That's if they're formatted to Ext4 as in my case. If they're not, fat32 or ntfs maybe, then you just have to change the mount options. I used to have that, but ntfs isn't really supported as well as the native linux formats, and as such, the driver(s) are not as efficient, and can consume plenty of cpu. Copy the Code
- UUID=a1577b0e-e1d0-4fc6-af5b-794a7b6c20c0 /media/mydisklocation1 ext4 defaults 0 0
- UUID=dc0f3682-a961-40ba-b67d-71de22cc720e /media/mydisklocation2 ext4 defaults 0 0
You'll need to create the two directories that you would like them to be mounted to:
Copy the Code
- sudo mkdir /media/mydisklocation1
Then you can either reboot, orwhich should mount the items Copy the Code
- sudo mkdir /media/mydisklocation2
If they're ext2/3/4 format, you may want to think about permissions once they're mounted if they're to be read or written to by anyone or specific user(s), that's the chmod command.
Personally I tend to chmod them 777 (anyone can do anything), but it's bad practise really especially in a multi-user scenario!
Copy the Code
- sudo chmod 777 /media/mydisklocation1