LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 10-21-2010, 07:43 PM   #1
earlysame55
LQ Newbie
 
Registered: Feb 2008
Posts: 24

Rep: Reputation: 15
Removing devices on RHEL 4 and 5


Dear Gurus

Need to remove the following LV. I cannot drill down to the level of which disks it's made up with. Please validate my response.
PS: Server was not built and managed by me and there is a lack of documentation.

Please refer : http://paste.org/pastebin/view/23848

Now the question.

I get to see the lv is made up of dm-7 and dm-9. On the partition table dm-7 has the mjor:minor as :
253 7 23068672 dm-7
and dm-9 is:
253 9 23068672 dm-9

now the problem is finding what these 2 devices are, luckily i see the same major:minor numbers in /dev/mapper directory


brw-rw---- 1 root disk 253, 9 Oct 13 15:49 temp
brw-rw---- 1 root disk 253, 7 Oct 13 15:49 temp_1

QUESTION 1
is
dm-7 --> temp_1
dm-9 --> temp

Now i did another guess to find out what these 2 were. This is a guess, there was no science and methodology behind my guess. I need to know if my approach was right, if not what is the right way of doing it.

Here are the 2
temp (360060e8005b24f000000b24f00007500)
[size=22 GB][features="1 queue_if_no_path"][hwhandler="0"]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:7 sdd 8:48 [active][ready]
\_ 1:0:0:7 sdk 8:160 [active][ready]


temp_1 (360060e8005b24f000000b24f00007501)
[size=22 GB][features="1 queue_if_no_path"][hwhandler="0"]
\_ round-robin 0 [prio=2][active]
\_ 0:0:0:8 sde 8:64 [active][ready]
\_ 1:0:0:8 sdl 8:176 [active][ready]

now i see multipathd is not configured to run
chkconfig --list | grep multi
multipathd off on all the levels

ps -ef | grep -i multi
root 24365 17927 0 08:21 pts/7 00:00:00 grep -i multi


Again the question is how to drill down and find where my devices are coming from which make up the temp_lv.

Part 2
-------
How do i get rid of these devices the proper way if they are the correct devices.

TIA

Last edited by earlysame55; 10-21-2010 at 07:51 PM. Reason: including the pastie URL
 
Old 10-21-2010, 10:30 PM   #2
rayfordj
Member
 
Registered: Feb 2008
Location: Texas
Distribution: Fedora, RHEL, CentOS
Posts: 488

Rep: Reputation: 78
OK, here goes; see if I followed correctly...

temp_lv is the only LV in the temp_vg VG which is comprised of two mpath devices temp (currently sdd and sdk) and temp_1 (currently sde and sdl).

It looks like you drilled down through the layers identifying each participating component already, so it is just a matter of procedurally backing out the configuration. If you want to remove the LV, it is just a matter of ensuring the the LV is not mounted, edit fstab to prevent the system from attempting to mount the LV during boot, deactivate the LV, remove the LV.

Code:
# #umount /where/ever/it/is/mounted
# #comment entry in /etc/fstab to prevent mount attempt during boot
# lvchange -an /dev/temp_vg/temp_lv
# lvremove /dev/temp_vg/temp_lv
To continue...
If native multipathing (dm-multipath) is not being used, then something has leveraged device-mapper multipath to create the two mpath devices and this should be identified and suppressed before continuing down the layers and removing the LUNs/disks.

Code:
# vgchange -an /dev/temp_vg
# vgremove /dev/temp_vg
# pvremove /dev/mpath/temp /dev/mpath/temp_1
# #break down the mpath devices and suppress creation attempt
# #remove LUNs/disks

NOTE: depending on the package versions some of the options and/or arguments might vary. For example, lvremove /dev/temp_vg/temp_lv or lvremove temp_vg/temp_lv. Please consult the documentation for binary version specific options, parameters, and syntax.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to import Virtual RAID devices into New RHEL 5 Install louisb Linux - Enterprise 0 07-28-2008 08:04 PM
LXer: Removing Logical Devices Using LVM On Linux And Unix LXer Syndicated Linux News 0 06-16-2008 06:50 AM
removing/unjoin a linux RHEL 5.1 server from Domain? saikat.siddharth Linux - Networking 6 02-04-2008 02:16 PM
RHEL 4 doesn't see SAN devices after boot bret Red Hat 1 12-20-2006 05:21 PM
Adding or removing new devices changes the device name aceman2373 Linux - Hardware 6 09-08-2006 04:24 PM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

All times are GMT -5. The time now is 03:24 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration