- Community Home
- >
- Servers and Operating Systems
- >
- Operating System - Linux
- >
- General
- >
- LUN Clear Host residuals in Red Hat linux
-
- Forums
-
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
- HPE Blog, Austria, Germany & Switzerland
- Blog HPE, France
- HPE Blog, Italy
- HPE Blog, Japan
- HPE Blog, Middle East
- HPE Blog, Latin America
- HPE Blog, Russia
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
-
Blogs
- Advancing Life & Work
- Advantage EX
- Alliances
- Around the Storage Block
- HPE Blog, Latin America
- HPE Blog, Middle East
- HPE Blog, Saudi Arabia
- HPE Blog, South Africa
- HPE Blog, UK & Ireland
- HPE Ezmeral: Uncut
- OEM Solutions
- Servers & Systems: The Right Compute
- Tech Insights
- The Cloud Experience Everywhere
-
Information
- Community
- Welcome
- Getting Started
- FAQ
- Ranking Overview
- Rules of Participation
- Tips and Tricks
- Resources
- Announcements
- Email us
- Feedback
- Information Libraries
- Integrated Systems
- Networking
- Servers
- Storage
- Other HPE Sites
- Support Center
- Aruba Airheads Community
- Enterprise.nxt
- HPE Dev Community
- Cloud28+ Community
- Marketplace
-
Forums
-
Blogs
-
Information
-
English
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
- Email to a Friend
- 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
Hewlett Packard Enterprise International
- Communities
- HPE Blogs and Forum
© Copyright 2021 Hewlett Packard Enterprise Development LP