- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- LUN Clear Host residuals in Red Hat linux
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-13-2013 01:51 PM
04-13-2013 01:51 PM
Hello All,
I have a Red hat linux server running 6.3 version OS. And below is the problem description.
I assign a LUN to the server today with LUN ID as 4 from SAN. I scan that LUN and use it for my applications using LVM. i use that LUN for couple of months. After few days i do not need that LUN anymore, so i remove that LUN from LVM and release it to the storage pool.
After few days, there is one more requirement for LUN, and i assign the same LUN with LUN ID 4 to the server again. And it still hold the old information from the last time it was assigned to the server.
How can i clear the Old LUN information from the server before assigning the same LUN again to the server?
In HPUX there is a command scsimgr replace_wwid option to achieve this.
Thanks,
VJ
iGATE
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-15-2013 01:32 AM
04-15-2013 01:32 AM
SolutionThis is related to Linux hot-plugging: once the kernel has seen a particular device, it tries to make sure that the device can keep the same device name(s) whenever possible, even after it is temporarily disconnected. To make the kernel completely forget a particular device, you will need to tell it that the removal is intentional.
The full RedHat-recommended procedure can be found in the RHEL 6 Storage Administration Guide:
In a nutshell:
- unmount filesystems, reduce disk out of LVM and/or otherwise stop applications from using it
- if you use dm-multipath, identify the individual /dev/sd* devices with "multipath -l", then remove the multipath device with "multipath -f <multipathname>"
- run "blockdev --flushbufs /dev/sdX" for the devices that will be removed (= component paths of the multipath device that was removed in the previous step). This ensures that all forms of disk I/O have been completed for the device(s).
- finally tell the kernel to forget the /dev/sdX device(s):
echo 1 > /sys/block/sdX/device/delete
If the LUN was already unmounted, removed from the LVM and un-presented, you'll only need the "multipath -f" and "echo 1 > /sys/block/sdX/device/delete" steps. The "blockdev --flushbufs" step won't do any good if the disk/LUN is no longer accessible.
You may also want to remove the WWID of the LUN from /etc/multipath.conf, if you used a custom multipath alias for the device, or from /etc/multipath/bindings, if you used the user_friendly_names feature of dm-multipath.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-16-2013 11:29 AM
04-16-2013 11:29 AM
Re: LUN Clear Host residuals in Red Hat linux
Hi Matti,
Thanks for the reply!
I will try these steps.
Regards,
VJ
iGATE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-17-2013 10:11 AM
04-17-2013 10:11 AM
Re: LUN Clear Host residuals in Red Hat linux
Accepted your post as a solution to my problem, a well deserved kudos given!!!
Thankyou!!
VJ
iGATE