1748242 Members
4118 Online
108759 Solutions
New Discussion юеВ

LUN deletion with linux

 
SOLVED
Go to solution
Britta Eckhardt
New Member

LUN deletion with linux

In general my question deals with: when i delete a disk (LUN) from attached storage the linux systems that they were presented to think they can still see the LUN, although the wwn when we do a scan is different. I was told by one engineer that it is normal and you must reboot the system as the best method to remove the LUN from the OS. Having to reboot all the systems is a problem for us.

What i am trying to find out is if anyone else has seen this issue and knows more about it, if there is a patch relating to this, and if it definitely is a Linux OS issue affecting all Linux OS'. Please give me any information you may have about this.

5 REPLIES 5
Ivan Ferreira
Honored Contributor

Re: LUN deletion with linux

Sometimes, you can use:

rescan-scsi-bus.sh
hp_rescan

To detect/remove disks from a host. Just be carefull because when you remove a disk from linux, device names can change, for example:

sda
sdb
sdc

If you remove sdb, sdc may be renamed to sdb, and you "could" have problems to mount again the file systems on it.
Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Britta Eckhardt
New Member

Re: LUN deletion with linux

We tried rescanning and also doing echo 1 > delete on the /dev/sdX/.../device folder. We don't consider the latter option a safe recommendation to give customers, and was already rejected by one as well.

But this is a Linux OS issue for any Linux, correct? Is it considered a known bug as of today?
Ivan Ferreira
Honored Contributor

Re: LUN deletion with linux

But this is a Linux OS issue for any Linux, correct? Is it considered a known bug as of today?

Do you mean about the device naming changes? I don't see it as a bug, maybe a limitation. There are ways to make device names persistent, normally used when you access raw devices, and also you can mount the file system by using LABELS instead of device names, so does not matter if the device name changes.

For persistent device names see:

https://www.data.com.py/foro/viewtopic.php?t=130

Por que hacerlo dificil si es posible hacerlo facil? - Why do it the hard way, when you can do it the easy way?
Britta Eckhardt
New Member

Re: LUN deletion with linux

No i mean that the LUN remains in the OS after deleted from storage.
Matti_Kurkela
Honored Contributor
Solution

Re: LUN deletion with linux

The OS does not get enough information from thae storage to determine whether the vanishing of the LUN is intentional or not.

Unless the sysadmin tells otherwise, the system makes the assumption that the vanished LUN may come back at some later time.

Consider a case when a SAN administrator makes a mistake and unrepresents a wrong LUN: with the current policy, the system can continue work as usual when the SAN admin undoes his/her mistake.

If the OS would automatically delete the LUN and then re-install it as a "new" LUN, the device paths might change. You would need some SAN-manufacturer-specific method to identify the disks. Then some reconfiguration would be needed at some level.
MK