Mailinglist Archive: opensuse (4054 mails)
| < Previous | Next > |
Re: [SLE] Mounting external hdd at the same mount point every time.
- From: Roger Oberholtzer <roger@xxxxxx>
- Date: Fri, 13 Jan 2006 14:58:10 +0100
- Message-id: <1137160691.25364.98.camel@xxxxxxxxxxxx>
Is it possible to achieve this only with udev? I am trying to get 4 SATA
disks to be mounted based on the SCSI addresses, not the kernel default
name, to achieve the same mount point. The disks are removable. Disk
changes will only happen at boot time.
A sample drive
is /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0
In the kernel log, I see (when sd_mod is loaded):
msg_queue_insert: seq 759 queued, 'add' '/block/sda/sda1'
udev_event_run: seq 759 forked, pid [3257], 'add' 'block', 0 seconds
old
udev_rules_get_name: no node name set, will use kernel name 'sda1'
create_node: creating device node '/dev/sda1'
udev_done: seq 759 exit, 0 seconds old
When I make a udev rule, I thought I could use the pci ID. In my case, I
am trying:
SUBSYSTEM="block", ENV{ID_PATH}="pci-0000:00:1f.2-scsi-0:0:0:0",
SYMLINK="cameraB_2"
I would expect to see a symlink when the ID_PATH matches. But this does
not happen. I do not think this rule is being called. I have placed it
in a file called /etc/udev/rules.d/55-dpavue.rules.
I am also confused about this:
When I load the ata_piix driver, I see things like this in the log:
msg_queue_insert: seq 748 queued, 'add'
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0'
udev_event_run: seq 748 forked, pid [3223], 'add' 'scsi', 0 seconds old
msg_queue_insert: seq 749 queued, 'add' '/class/scsi_device/0:0:0:0'
udev_done: seq 748 exit, 0 seconds old
udev_event_run: seq 749 forked, pid [3232], 'add' 'scsi_device', 0
seconds old
udev_done: seq 749 exit, 0 seconds old
But is it appropriate for me to make a udev rule that acts at this time?
I tries this rule, with nothing happening (that I can see):
SUBSYSTEM="scsi", ENV{ID_PATH}="pci-0000:00:1f.2-scsi-0:0:0:0",
SYMLINK="cameraB_2"
But as udev does not make a /dev entry as a result of this call, I am
not sure what the SYMLINK would point it anyway.
Any useful suggestions are very welcome.
BTW, I am rebooting between changes of the rules - just to be sure. The
drivers are loaded after / is mounted. I load them with modprobe just to
be sure they are running when I think they are. If any of this makes any
difference...
On Tue, 2006-01-10 at 12:11 +0100, Carlos E. R. wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> The Tuesday 2006-01-10 at 09:30 +0200, Marius Roets wrote:
>
> > respectively. It does not however consistently mount the same
> > partition to the same directory. Is it possible to create 2
> > directories, say "/media/MyPartition1" and "/media/MyPartition2" and
> > then have Linux automatically mount the correct partition to the
> > correct directory, when I plug in the hdd. Or do I have to unmount,
> > and manually mount it.
>
> Have a look at:
>
> http://portal.suse.com/sdb/en/2005/05/dkukawka_hal_mountpoints.html
> Mounting to Static Mount Points
>
> and somewhat related:
>
> http://portal.suse.com/sdb/en/2005/05/dkukawka_subfs_nomount.html
> Conventional Mounting Instead of subfs
>
>
>
> > I use Suse 10.0 btw.
>
> Those articles refer to 9.3, things might have changed a bit.
>
>
> - --
> Cheers,
> Carlos Robinson
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Made with pgp4pine 1.76
>
> iD8DBQFDw5ZptTMYHG2NR9URAhsVAJ0cKnETJn5aNTDn/TM9qgmj4uXNjwCfVVbP
> 3fotZ/zubNh/L2Akxy/MMsU=
> =zbUP
> -----END PGP SIGNATURE-----
>
>
--
Roger Oberholtzer
OPQ Systems AB
disks to be mounted based on the SCSI addresses, not the kernel default
name, to achieve the same mount point. The disks are removable. Disk
changes will only happen at boot time.
A sample drive
is /sys/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0
In the kernel log, I see (when sd_mod is loaded):
msg_queue_insert: seq 759 queued, 'add' '/block/sda/sda1'
udev_event_run: seq 759 forked, pid [3257], 'add' 'block', 0 seconds
old
udev_rules_get_name: no node name set, will use kernel name 'sda1'
create_node: creating device node '/dev/sda1'
udev_done: seq 759 exit, 0 seconds old
When I make a udev rule, I thought I could use the pci ID. In my case, I
am trying:
SUBSYSTEM="block", ENV{ID_PATH}="pci-0000:00:1f.2-scsi-0:0:0:0",
SYMLINK="cameraB_2"
I would expect to see a symlink when the ID_PATH matches. But this does
not happen. I do not think this rule is being called. I have placed it
in a file called /etc/udev/rules.d/55-dpavue.rules.
I am also confused about this:
When I load the ata_piix driver, I see things like this in the log:
msg_queue_insert: seq 748 queued, 'add'
'/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0'
udev_event_run: seq 748 forked, pid [3223], 'add' 'scsi', 0 seconds old
msg_queue_insert: seq 749 queued, 'add' '/class/scsi_device/0:0:0:0'
udev_done: seq 748 exit, 0 seconds old
udev_event_run: seq 749 forked, pid [3232], 'add' 'scsi_device', 0
seconds old
udev_done: seq 749 exit, 0 seconds old
But is it appropriate for me to make a udev rule that acts at this time?
I tries this rule, with nothing happening (that I can see):
SUBSYSTEM="scsi", ENV{ID_PATH}="pci-0000:00:1f.2-scsi-0:0:0:0",
SYMLINK="cameraB_2"
But as udev does not make a /dev entry as a result of this call, I am
not sure what the SYMLINK would point it anyway.
Any useful suggestions are very welcome.
BTW, I am rebooting between changes of the rules - just to be sure. The
drivers are loaded after / is mounted. I load them with modprobe just to
be sure they are running when I think they are. If any of this makes any
difference...
On Tue, 2006-01-10 at 12:11 +0100, Carlos E. R. wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
>
> The Tuesday 2006-01-10 at 09:30 +0200, Marius Roets wrote:
>
> > respectively. It does not however consistently mount the same
> > partition to the same directory. Is it possible to create 2
> > directories, say "/media/MyPartition1" and "/media/MyPartition2" and
> > then have Linux automatically mount the correct partition to the
> > correct directory, when I plug in the hdd. Or do I have to unmount,
> > and manually mount it.
>
> Have a look at:
>
> http://portal.suse.com/sdb/en/2005/05/dkukawka_hal_mountpoints.html
> Mounting to Static Mount Points
>
> and somewhat related:
>
> http://portal.suse.com/sdb/en/2005/05/dkukawka_subfs_nomount.html
> Conventional Mounting Instead of subfs
>
>
>
> > I use Suse 10.0 btw.
>
> Those articles refer to 9.3, things might have changed a bit.
>
>
> - --
> Cheers,
> Carlos Robinson
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.0 (GNU/Linux)
> Comment: Made with pgp4pine 1.76
>
> iD8DBQFDw5ZptTMYHG2NR9URAhsVAJ0cKnETJn5aNTDn/TM9qgmj4uXNjwCfVVbP
> 3fotZ/zubNh/L2Akxy/MMsU=
> =zbUP
> -----END PGP SIGNATURE-----
>
>
--
Roger Oberholtzer
OPQ Systems AB
| < Previous | Next > |