I have a system attached to a fibre channel SAN that has a number of drives defined on it. We had a switch fail and bought a new 8gbps switch along with an 8gbps card for our existing system which previously had a 4gbps card.
This system, with it’s prior 4gbps card had hard drives on our SAN from /dev/sdb through /dev/sdi. After I changed the card out the drives were called /dev/sdj through /dev/sdq. I edited my /etc/fstab to reflect the new drive letters, but I am getting a lot of IO errors on the old, non-existent devices. I would like to rebuild my device database to reflect the devices attached to the system even if it means changing drive letters again or at least delete the old devices to I quit getting IO errors on them.
It seems like there should be a way to do this with udevadm, but I haven’t been able to figure how to do so. I have rebooted the system several times and I am still getting errors on the devices that don’t exist anymore. If this were a Solaris/SPARC system, I could reboot with a “boot -r” to rebuild devices and I was wondering if there’s a Linux equivalent.
On 07/30/2013 07:36 PM, schaffin wrote:
> The system is OpenSUSE 12.1
maybe you overlooked that openSUSE 12.1 went past end of life on May
15th 2013 and has had no security or other updates since…
that and the fact that few here might have a 12.1 system they could
test their advice on leads me to suggest you well consider moving to
a secure and supported version…
note, i can’t actually help with your problem or i would try…hang
around because there may be some good advice on the best way to move
to a supported version AND solve the current problem in the process…
you might also consider moving to a longer lived, enterprise version…
As all device special fiiles are recreated on every boot (and lost on shutdown) becausr /dev is a tmpfs
devtmpfs on /dev type devtmpfs (rw,relatime,size=496712k,nr_inodes=124178,mode=755)
you can not remove nor create entries there with any hope of this being permanent.
Thus you must find out why the “old” devic file are still created on every boot. You could e.g. look in /dev/disk/by-id to see what the manufacturer and type is.
> This system, with it’s prior 4gbps card had hard drives on our SAN from
> /dev/sdb through /dev/sdi. After I changed the card out the drives were
> called /dev/sdj through /dev/sdq. I edited my /etc/fstab to reflect the
> new drive letters, but I am getting a lot of IO errors on the old,
> non-existent devices. I would like to rebuild my device database to
> reflect the devices attached to the system even if it means changing
> drive letters again or at least delete the old devices to I quit getting
> IO errors on them.
No, that’s the wrong way to do it.
You have to use references to the devices in /dev/disk/by-*/whatever
instead.
The devices names are all dynamic; only those where I said are
guaranteed not to change. The /sdX names are given by the kernel, I
understand, so it is futile to try to change them.
> The system is OpenSUSE 12.1, by the way.
Which is out of maintenance.
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
To expand on what the others have already said, udev creates/deletes the /dev/disk/by-… links dynamically (via kernel uevents) as any disks are detected or removed. FWIW, here’s an old thread discussing this.
In particular, the rule responsible for persistent storage alias naming is /lib/udev/rules.d/60-persistent-storage.rules (I think even 12.1 uses this arrangement).
You can see for yourself the key=“value” pairs that are passed to udev with
On 2013-07-31 03:36, deano ferrari wrote:
>
> To expand on what the others have already said, udev creates/deletes the
> /dev/disk/by-… links dynamically (via kernel uevents) as any disks are
> detected or removed. FWIW, here’s an old ‘thread’
> (http://www.linuxformat.com/forums/viewtopic.php?p=105211) discussing
> this.
>
> In particular, the rule responsible for persistent storage alias naming
> is /lib/udev/rules.d/60-persistent-storage.rules (I think even 12.1 uses
> this arrangement).
However, as far as I know, you can not force replacement of, say, sda
with sdc, which was the OP question. Right?
–
Cheers / Saludos,
Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)
When I replaced the switch in our SAN, I did not set up zoning at the switch level since the RAID boxes connected to our SAN do access control at the logical drive level. Each RAID box has two controllers with the same WWN and I think our system is seeing the drives on both controllers, even though the RAID boxes are configured to only allow access to one controller per WWN.
I am going to set up zoning on the switch tomorrow morning and see if the duplicate/unused devices go away.
Thanks for the help and I am planning on upgrading the OS at some time soon, but that’s a separate project.