I have 4 USB hard drives on my server in my basement. The power
went out the other night for about 30 seconds and when the server came
back online, most of my Samba shares where messed up. I figured out
what happened was that the drives were not initialized in the same order
as they were when I setup the shares. Now a drive that used to be
/media/usb0 was say /media/usb1.
So I have to go back and reconfigure my samba.conf file, not a huge
deal, but still a pia. Is there anyway to make it so that the drives
will always be named correctly upon rebooting of the server and
mounted? I think it needs to be done in fstab is that correct? The
other issue I have is that I always have to actually click on each drive
before it is able to be used by anyone else. Not sure why, but I don't
think the drives are getting mounted at bootup.
Thanks for the help.
-Eric
--
Bookmark/Search this post with:
Mounting USB HDs the same every time.
On Sat, Jun 30, 2007 at 02:45:59PM -0400, Eric A. Bonney wrote:
> I have 4 USB hard drives on my server in my basement. The power
> went out the other night for about 30 seconds and when the server came
> back online, most of my Samba shares where messed up. I figured out
> what happened was that the drives were not initialized in the same order
> as they were when I setup the shares. Now a drive that used to be
> /media/usb0 was say /media/usb1.
>
> So I have to go back and reconfigure my samba.conf file, not a huge
> deal, but still a pia. Is there anyway to make it so that the drives
> will always be named correctly upon rebooting of the server and
> mounted? I think it needs to be done in fstab is that correct? The
> other issue I have is that I always have to actually click on each drive
> before it is able to be used by anyone else. Not sure why, but I don't
> think the drives are getting mounted at bootup.
>
Use volume label names. Name the volume with the tools for the specific
filesystem (ext2, JFS, etc) then use LABEL= in fstab and with the mount
command. The the respective man pages.
Doug.
--
Mounting USB HDs the same every time.
On 06/30/07 14:04, Douglas Allan Tutty wrote:
> On Sat, Jun 30, 2007 at 02:45:59PM -0400, Eric A. Bonney wrote:
>> I have 4 USB hard drives on my server in my basement. The power
>> went out the other night for about 30 seconds and when the server came
>> back online, most of my Samba shares where messed up. I figured out
>> what happened was that the drives were not initialized in the same order
>> as they were when I setup the shares. Now a drive that used to be
>> /media/usb0 was say /media/usb1.
>>
>> So I have to go back and reconfigure my samba.conf file, not a huge
>> deal, but still a pia. Is there anyway to make it so that the drives
>> will always be named correctly upon rebooting of the server and
>> mounted? I think it needs to be done in fstab is that correct? The
>> other issue I have is that I always have to actually click on each drive
>> before it is able to be used by anyone else. Not sure why, but I don't
>> think the drives are getting mounted at bootup.
>>
>
> Use volume label names. Name the volume with the tools for the specific
> filesystem (ext2, JFS, etc) then use LABEL= in fstab and with the mount
> command. The the respective man pages.
Or UUIDs.
http://www.debian-administration.org/articles/522#comment_15
--
Ron Johnson, Jr.
Jefferson LA USA
Give a man a fish, and he eats for a day.
Hit him with a fish, and he goes away for good!
--
Mounting USB HDs the same every time.
"Eric A. Bonney" writes:
> I have 4 USB hard drives on my server in my basement. The power
> went out the other night for about 30 seconds and when the server came
> back online, most of my Samba shares where messed up. I figured out
> what happened was that the drives were not initialized in the same
> order as they were when I setup the shares. Now a drive that used to
> be /media/usb0 was say /media/usb1.
> So I have to go back and reconfigure my samba.conf file, not a huge
> deal, but still a pia. Is there anyway to make it so that the drives
> will always be named correctly upon rebooting of the server and
> mounted?
With udev, you have a permanent name under /dev/disk/by-id
> I think it needs to be done in fstab is that correct?
Use link provided by udev instead of /media/usb*
> The other issue I have is that I always have to actually click on
> each drive before it is able to be used by anyone else. Not sure
> why, but I don't think the drives are getting mounted at bootup.
The last field on your fstab line must be 2 instead of 0. But be sure
that your usb drive are powered on when you boot.
HTH
--
Dominique Dumont
"Delivering successful solutions requires giving people what they
need, not what they want." Kurt Bittner
--