Sorry, Alan.
The comments before yours were bottom-posted.
I'm afraid under these circumstances I can't find your top-posted
comments pertinent.
I simply can't make any sense of them.
Your mailer also used HTML.
If you wish to make postings of this kind then I would be grateful if
you could place me on your ignore list, and not make such replies to
my messages.
Stroller.
On 5 Oct 2009, at 09:02, Alan E. Davis wrote:
With Flash drive partitions labeled, the mounting is consistent. I
have a git bare repo directory, on each of two flash drives to keep
certain directories in sync on three machines. The repos are found
consistently by git this method. I don't remember any specific
method I used to get this mounting behavior into place, but I have
had to specifically set GID for my user account on each machine to
keep permissions in line.
By the way, when I reformatted a drive, I just used the same label,
which seemed to work fine. I wonder though whether this system
might be defeated by convolutions of various kinds outside my
control at a future time.
Alan
On Sun, Oct 4, 2009 at 5:24 AM, Stroller <strol...@stellar.eclipse.co.uk
> wrote:
On 3 Oct 2009, at 20:11, daid kahl wrote:
...
Another useful notion is to use udev to automount flash drives (or
external usb harddrives) to a specified location based on serial
number. ... I can either give an overview or dig up the url if
anyone likes.
I'd have assumed you simple used any of the usual "automount drives
with udev" guides. Am I wrong?
This is the way I have always intended to approach this problem, so
I'd be grateful to be corrected in advance if there's a better way.
That's correct, except not all of these guides discuss the drive
serial number. If you want to ensure that different drives are
mounted at different points, you have to rely on the device serial
(since the /dev nodes are filled in order of the device connection,
regardless of which drive it is).
There are plenty of guides that mention how to find the serial
number and how to write the correct udev rules, but most the guides
are outdated and suggest use of the symlink udevinfo, which was
removed upstream recently. So, to get a device's serial number, for
example (replace /dev/sdb with the correct node) :
# udevadm info -a -p $(udevadm info -q path -n /dev/sdb) | grep
ATTRS{serial}
and use the (first) serial that doesn't have colons and periods.
Then for the udev rule you just need to include ATTRS{serial}=="
0000000000"
This is also useful when you have external harddrives that use ext3
formatting and flashdrives that don't.
Ooooops... I omitted a paste - I went to a terminal to check the
details and then appear to have completely forgotten to include
them. Thus my question is misphrased & incomplete.
I intended to ask:
I'd have assumed you simple used any of the usual "automount
drives with udev" guides, but based their entry in "/dev/disk/by-
uuid/". Am I wrong?
How do you find the serial, please? I'm guessing from `dmesg`?
I think the entry in "/dev/disk/by-uuid/" may change if you reformat
the drive, so your response is most helpful.
Thank you for your help,
Stroller.