Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
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.ukwrote: 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}== 00 This is also useful when you have external harddrives that use ext3 formatting and flashdrives that don't. Ops... 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.
Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
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}== 00 This is also useful when you have external harddrives that use ext3 formatting and flashdrives that don't. Ops... 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.
Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
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. Sorry. This should be regular text now. How do you find the serial, please? I'm guessing from `dmesg`? Just a re-post on how to find the serial on a usb drive, where the USB device in question is at node /dev/sdb : # udevadm info -a -p $(udevadm info -q path -n /dev/sdb) | grep ATTRS{serial} You might get more than one return on this command. Us the first serial, and it is also the one without colons or periods, just numbers and letters. Then for the udev rule you just need to include ATTRS{serial}== 00 Regards, daid
Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
On 5 Oct 2009, at 23:52, daid kahl wrote: 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. Sorry. This should be regular text now. Not you. It was the top-posting when the thread was already so consistently bottom-posted that wound me up. And that wasn't you, but another poster. Unfortunately, the HTML made it difficult to correct this, which did piss me off further. How do you find the serial, please? I'm guessing from `dmesg`? Just a re-post on how to find the serial on a usb drive, where the USB device in question is at node /dev/sdb : # udevadm info -a -p $(udevadm info -q path -n /dev/sdb) | grep ATTRS {serial} I'm really sorry. You said this before, and I didn't read it properly. Thanks for posting. Stroller.
Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
Apparently I have bodged the setup somehow on this system. Each time I plug in a flash drive, two Nautilus windows open up. If I plug three USB drives in, six windows open. Any ideas please, to smooth this minor wrinkle? Another useful notion is to use udev to automount flash drives (or external usb harddrives) to a specified location based on serial number. I found a nice overview on the web a few weeks ago, but I didn't bookmark it and just kept notes of what steps I took. I can either give an overview or dig up the url if anyone likes. It's damn useful and fairly painless. This is fairly useful for doing backups to external that want the backup disk at the same mount point, for example. Now I just need to figure out how to tell KDE not to ask me what to do with these particular devices that I have udev rules for so I don't need to click cancel / do nothing every time. ~daid
Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
On 3 Oct 2009, at 15:30, 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. Cheers, Stroller.
Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
... 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}== 00 This is also useful when you have external harddrives that use ext3 formatting and flashdrives that don't. ~daid
Re: [gentoo-user] Double nautilus windows for each USB flash drive plugged in
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}== 00 This is also useful when you have external harddrives that use ext3 formatting and flashdrives that don't. Ops... 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.
[gentoo-user] Double nautilus windows for each USB flash drive plugged in
Hello: Apparently I have bodged the setup somehow on this system. Each time I plug in a flash drive, two Nautilus windows open up. If I plug three USB drives in, six windows open. Any ideas please, to smooth this minor wrinkle? Thank you, Alan Davis