1 |
With Flash drive partitions labeled, the mounting is consistent. I have a |
2 |
git bare repo directory, on each of two flash drives to keep certain |
3 |
directories in sync on three machines. The repos are found consistently by |
4 |
git this method. I don't remember any specific method I used to get this |
5 |
mounting behavior into place, but I have had to specifically set GID for my |
6 |
user account on each machine to keep permissions in line. |
7 |
|
8 |
By the way, when I reformatted a drive, I just used the same label, which |
9 |
seemed to work fine. I wonder though whether this system might be defeated |
10 |
by convolutions of various kinds outside my control at a future time. |
11 |
|
12 |
Alan |
13 |
|
14 |
On Sun, Oct 4, 2009 at 5:24 AM, Stroller <stroller@××××××××××××××××××.uk>wrote: |
15 |
|
16 |
> |
17 |
> On 3 Oct 2009, at 20:11, daid kahl wrote: |
18 |
> |
19 |
>> ... |
20 |
>>> |
21 |
>>>> Another useful notion is to use udev to automount flash drives (or |
22 |
>>>> external usb harddrives) to a specified location based on serial number. |
23 |
>>>> ... I can either give an overview or dig up the url if anyone likes. |
24 |
>>>> |
25 |
>>> |
26 |
>>> I'd have assumed you simple used any of the usual "automount drives with |
27 |
>>> udev" guides. Am I wrong? |
28 |
>>> |
29 |
>>> This is the way I have always intended to approach this problem, so I'd |
30 |
>>> be grateful to be corrected in advance if there's a better way. |
31 |
>>> |
32 |
>> |
33 |
>> That's correct, except not all of these guides discuss the drive serial |
34 |
>> number. If you want to ensure that different drives are mounted at |
35 |
>> different points, you have to rely on the device serial (since the /dev |
36 |
>> nodes are filled in order of the device connection, regardless of which |
37 |
>> drive it is). |
38 |
>> |
39 |
>> There are plenty of guides that mention how to find the serial number and |
40 |
>> how to write the correct udev rules, but most the guides are outdated and |
41 |
>> suggest use of the symlink udevinfo, which was removed upstream recently. |
42 |
>> So, to get a device's serial number, for example (replace /dev/sdb with the |
43 |
>> correct node) : |
44 |
>> |
45 |
>> # udevadm info -a -p $(udevadm info -q path -n /dev/sdb) | grep |
46 |
>> ATTRS{serial} |
47 |
>> |
48 |
>> and use the (first) serial that doesn't have colons and periods. Then for |
49 |
>> the udev rule you just need to include ATTRS{serial}==" 0000000000" |
50 |
>> |
51 |
>> This is also useful when you have external harddrives that use ext3 |
52 |
>> formatting and flashdrives that don't. |
53 |
>> |
54 |
> |
55 |
> Ooooops... I omitted a paste - I went to a terminal to check the details |
56 |
> and then appear to have completely forgotten to include them. Thus my |
57 |
> question is misphrased & incomplete. |
58 |
> |
59 |
> I intended to ask: |
60 |
> |
61 |
> I'd have assumed you simple used any of the usual "automount drives with |
62 |
> udev" guides, but based their entry in "/dev/disk/by-uuid/". Am I wrong? |
63 |
> |
64 |
> How do you find the serial, please? I'm guessing from `dmesg`? |
65 |
> |
66 |
> I think the entry in "/dev/disk/by-uuid/" may change if you reformat the |
67 |
> drive, so your response is most helpful. |
68 |
> |
69 |
> Thank you for your help, |
70 |
> |
71 |
> Stroller. |
72 |
> |
73 |
> |
74 |
> |