LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   USB Drive mounting and label (https://www.linuxquestions.org/questions/linux-newbie-8/usb-drive-mounting-and-label-4175600202/)

rz1a 02-20-2017 09:34 AM

USB Drive mounting and label
 
If I configure /etc/fstab to mount /dev/sda1/ in /media/usbstick, and setup samba to share the /media/usbstick folder, will this allow anything that mounts as sda1 to be shared?

What if I want specifically the one USB drive I have to be shared using samba? Like if I umount it, take it with me, come back and mount it. I don't want to connect a different USB drive and have it shared. Does the USB drive I want shared have a label or name I can put in /etc/fstab?

jsbjsb001 02-20-2017 09:47 AM

Quote:

Originally Posted by rz1a (Post 5673517)
If I configure /etc/fstab to mount /dev/sda1/ in /media/usbstick, and setup samba to share the /media/usbstick folder, will this allow anything that mounts as sda1 to be shared?

What if I want specifically the one USB drive I have to be shared using samba? Like if I umount it, take it with me, come back and mount it. I don't want to connect a different USB drive and have it shared. Does the USB drive I want shared have a label or name I can put in /etc/fstab?

/dev/sda1 usually refers (if not ALWAYS) to the first partition on the first hard drive. USB storage devices and similar (depending on your distro) are usually mounted to the /media/ folder.

As the sda1 is a device node in the /dev/ folder, with the "1" referring to the the first partition of that device..

What exactly are you trying to achieve?

rz1a 02-20-2017 09:52 AM

Quote:

Originally Posted by jsbjsb001 (Post 5673523)
/dev/sda1 usually refers (if not ALWAYS) to the first partition on the first hard drive. USB storage devices and similar (depending on your distro) are usually mounted to the /media/ folder.

As the sda1 is a device node in the /dev/ folder, with the "1" referring to the the first partition of that device..

What exactly are you trying to achieve?

mounting by UUID. Think I found it from this link:

https://www.cyberciti.biz/faq/linux-...-update-fstab/

Habitual 02-20-2017 10:39 AM

https://help.ubuntu.com/community/UsingUUID will surely verify the steps.

rz1a 02-20-2017 11:50 AM

Quote:

Originally Posted by Habitual (Post 5673559)
https://help.ubuntu.com/community/UsingUUID will surely verify the steps.

thank you for the link!

273 02-20-2017 12:00 PM

Quote:

Originally Posted by jsbjsb001 (Post 5673523)
/dev/sda1 usually refers (if not ALWAYS) to the first partition on the first hard drive.

The times I have had issues with both fstab and my own stupid self have been when the drives are listed in the order they spun up -- so with a few spinny drives installed it was almost random. That and leaving a USB stick in resulting in / moving from sda to sdb. Not sure whether there are still issues because I use UUID almost exclusively nowadays.


All times are GMT -5. The time now is 11:43 AM.