1752325 Members
5561 Online
108786 Solutions
New Discussion юеВ

Removing logical volume

 
ossupport55
Frequent Advisor

Removing logical volume

Hi,
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 0:off 1:off 2:off 3:off 4:off 5:off 6:off

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.

2 REPLIES 2
Randy Jones_3
Trusted Contributor

Re: Removing logical volume

Since you found them in the multipath listing showing "0:0:0:7" and "0:0:0:8", try "cat /proc/scsi/scsi" and see if the Vendor and Model shown for Lun 7 and 8 give you an idea whether they are SAN connections or something else. How you should remove them depends somewhat on what they are.
Matti_Kurkela
Honored Contributor

Re: Removing logical volume

The VG is no longer active, so if you want to delete it, go ahead:

vgremove temp_vg
pvremove /dev/dm-7
pvremove /dev/dm-9

After this they will no longer be associated with LVM at all.


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

Yes. They are both block devices, and have the same major&minor numbers, so they are accessing the same thing in the kernel.

"dm-7" and "dm-9" are kernel's default names for the device-mapper devices: these are assigned automatically in ascending order, and are not guaranteed to be persistent across reboots. /dev/mapper/* are names created by userspace utilities: these are usually persistent and informative.

It's pretty obvious that block devices with major number 253 are associated with the device-mapper subsystem in your server, but if you need to confirm it, you can look into /proc/devices. There you'll find a list of major device numbers and the drivers/subsystems they're associated with.

To get more information, please run "dmsetup ls --tree". This will list all the device-mapper mappings in tree format. It makes no difference whether your mystery devices are LVM, software RAID, disk encryption, multipathing or custom tests: this *will* get them all.

In your case, the dm-7 and dm-9 (aka temp_1 and temp) appear to be multipath devices. The system will automatically clean them up when you remove their component disk devices (/dev/sdd, /dev/sdk, /dev/sde and /dev/sdl respectively). If you're going to disconnect those disks from your system, then here's a way to clean them up:

Example:
To tell the system /dev/sdd will be intentionally removed and won't come back:

echo 1 >/sys/block/sdd/device/delete

The fact that multipathd is not running does not mean multipathing is disabled: dm-multipath also has a kernel module, and your "multipath -l" output indicates it's still active.

MK
MK