LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 03-30-2015, 05:31 PM   #1
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558
Blog Entries: 5

Rep: Reputation: Disabled
How to find newly added disk in multipath


Hi All,
Need help how can i find newly added disk in multipath

[root@porsche~]# multipath -ll
mpathb (360000970000195701921533038383934) dm-1 EMC,SYMMETRIX
size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 0:0:1:1 sdd 8:48 active ready running
|- 1:0:0:1 sdf 8:80 active ready running
|- 0:0:0:1 sdb 8:16 active ready running
`- 1:0:1:1 sdh 8:112 active ready running
mpatha (360000970000195701921533038393938) dm-0 EMC,SYMMETRIX
size=137G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 0:0:0:0 sda 8:0 active ready running
|- 1:0:0:0 sde 8:64 active ready running
|- 0:0:1:0 sdc 8:32 active ready running
`- 1:0:1:0 sdg 8:96 active ready running
[root@porsche~]# ls -ltr /dev/sd*
brw-rw---- 1 root disk 8, 16 Mar 8 00:14 /dev/sdb
brw-rw---- 1 root disk 8, 32 Mar 8 00:14 /dev/sdc
brw-rw---- 1 root disk 8, 64 Mar 8 00:14 /dev/sde
brw-rw---- 1 root disk 8, 96 Mar 8 00:14 /dev/sdg
brw-rw---- 1 root disk 8, 112 Mar 23 11:45 /dev/sdh
brw-rw---- 1 root disk 8, 80 Mar 23 11:45 /dev/sdf
brw-rw---- 1 root disk 8, 48 Mar 23 11:45 /dev/sdd
brw-rw---- 1 root disk 8, 0 Mar 23 11:45 /dev/sda
brw-rw---- 1 root disk 8, 144 Mar 30 17:31 /dev/sdj
brw-rw---- 1 root disk 8, 128 Mar 30 17:31 /dev/sdi
brw-rw---- 1 root disk 8, 160 Mar 30 17:31 /dev/sdk
brw-rw---- 1 root disk 8, 176 Mar 30 17:31 /dev/sdl
[root@porsche~]# pvs
PV VG Fmt Attr PSize PFree
/dev/mapper/mpathap9 splunkvg lvm2 a-- 30.00g 0
/dev/mapper/mpathbp1 optvg lvm2 a-- 24.41g 2.69g
/dev/mapper/mpathbp2 appvg lvm2 a-- 1.98t 0
[root@porsche~]#

[root@porsche~]# ls -ltr /dev/mapper/mpath*
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpatha -> ../dm-0
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathb -> ../dm-1
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathap1 -> ../dm-2
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathap2 -> ../dm-3
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathbp1 -> ../dm-4
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathap3 -> ../dm-5
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathbp2 -> ../dm-6
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathap4 -> ../dm-7
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathap5 -> ../dm-8
lrwxrwxrwx 1 root root 7 Mar 8 00:14 /dev/mapper/mpathap6 -> ../dm-9
lrwxrwxrwx 1 root root 8 Mar 8 00:14 /dev/mapper/mpathap7 -> ../dm-10
lrwxrwxrwx 1 root root 8 Mar 8 00:14 /dev/mapper/mpathap8 -> ../dm-11
lrwxrwxrwx 1 root root 8 Mar 8 00:14 /dev/mapper/mpathap9 -> ../dm-12

Last edited by jsaravana87; 03-30-2015 at 05:44 PM.
 
Old 03-30-2015, 05:47 PM   #2
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Usually you perform the output comparison from previous run when the disk wasn't added and post run when the disk is added. If you are talking about how to check if the new disk is added or showing up on the system you have to perform a rescan of your fc host. You can refer the following document for the same: http://www.unixarena.com/2013/06/how...csi-disks.html
 
Old 03-30-2015, 06:06 PM   #3
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
Hi,
I have scanned the newly scanned disk .But still im unable figure out the newly added disk in multipath

# echo "1" > /sys/class/fc_host/host0/issue_lip# echo "1" > /sys/class/fc_host/host1/issue_lip

Last edited by jsaravana87; 03-30-2015 at 06:08 PM.
 
Old 03-30-2015, 06:14 PM   #4
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Did you compare the output of fdisk -l before the disk was added and after the disk was added? Did you anyway check the output of fdisk -l and find any of the disk which shows as unpartitioned? Also, did you run lsblk command to see if any of the disk shows as unassigned.
 
Old 03-30-2015, 06:35 PM   #5
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
How can i able to find unused disk in fdisk command


[root@porsche ~]# fdisk -l |egrep '^Disk' |egrep -v 'dm-'

Unable to read /dev/mapper/mpathap4
Disk /dev/sda: 140.6 GB, 146590924800 bytes
Disk identifier: 0x000d14dd
Disk /dev/sdd: 1198.9 GB, 2198863872000 bytes
Disk identifier: 0x00092f51
Disk /dev/sdb: 2198.9 GB, 2198863872000 bytes
Disk identifier: 0x00092f51
Disk /dev/sdc: 146.6 GB, 146590924800 bytes
Disk identifier: 0x000d14dd
Disk /dev/mapper/mpatha: 146.6 GB, 146590924800 bytes
Disk identifier: 0x000d14dd
Disk /dev/mapper/mpathb: 2198.9 GB, 2198863872000 bytes
Disk identifier: 0x00092f51
Disk /dev/mapper/mpathap1: 209 MB, 209715200 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/mpathap2: 4294 MB, 4294967296 bytes
Disk identifier: 0x00000000
Disk /dev/sde: 146.6 GB, 146590924800 bytes
Disk identifier: 0x000d14dd
Disk /dev/sdf: 2198.9 GB, 2198863872000 bytes
Disk identifier: 0x00092f51
Disk /dev/sdg: 146.6 GB, 146590924800 bytes
Disk identifier: 0x000d14dd
Disk /dev/sdh: 2198.9 GB, 2198863872000 bytes
Disk identifier: 0x00092f51
Disk /dev/mapper/mpathbp1: 26.2 GB, 26214400000 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/mpathap3: 10.7 GB, 10737418240 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/mpathbp2: 2172.6 GB, 2172648423424 bytes
Disk identifier: 0x00000000
[root@porsche ~]#
 
Old 03-30-2015, 06:42 PM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
With the output you shared we will not be able to make out anything as you have done inverse match for DM and start string to be Disk due to which lot of useful information is truncated. The only thing that is visible in the output is the number of disks which is of no use because we don't know how many were before.

Share the output of the following command as it is to get more information:

1.
Code:
fdisk -l
2.
Code:
lsblk
3.
Code:
ls -al /dev | grep sd
 
Old 03-31-2015, 03:02 AM   #7
robertjinx
Member
 
Registered: Oct 2007
Location: Prague, CZ
Distribution: RedHat / CentOS / Ubuntu / SUSE / Debian
Posts: 749

Rep: Reputation: 73
Hi, try this 2 commands:

Code:
# rescan-scsi-bus.sh -a
# multipath -ll
 
Old 03-31-2015, 04:52 PM   #8
jsaravana87
Member
 
Registered: Aug 2011
Location: Chennai,India
Distribution: Redhat,Centos,Ubuntu,Dedian
Posts: 558

Original Poster
Blog Entries: 5

Rep: Reputation: Disabled
Hi All,
I have reloaded multpath (multipath -r ) now I could find the newly added disk to multipath configuration file

[root@porsche ~]# multipath -ll
mpathc (360000970000195701921533038443844) dm-30 EMC,SYMMETRIX
size=5.0T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 0:0:0:2 sdi 8:128 active ready running
|- 1:0:0:2 sdk 8:160 active ready running
|- 0:0:1:2 sdj 8:144 active ready running
`- 1:0:1:2 sdl 8:176 active ready running
mpathb (360000970000195701921533038384232) dm-2 EMC,SYMMETRIX
size=2.0T features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 0:0:1:1 sdd 8:48 active ready running
|- 1:0:0:1 sdf 8:80 active ready running
|- 0:0:0:1 sdb 8:16 active ready running
`- 1:0:1:1 sdh 8:112 active ready running
mpatha (360000970000195701921533038394232) dm-0 EMC,SYMMETRIX
size=137G features='1 queue_if_no_path' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=1 status=active
|- 0:0:0:0 sda 8:0 active ready running
|- 1:0:0:0 sde 8:64 active ready running
|- 0:0:1:0 sdc 8:32 active ready running
`- 1:0:1:0 sdg 8:96 active ready running


pvcreate /dev/mapper/mpathc

Last edited by jsaravana87; 03-31-2015 at 04:55 PM.
 
  


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 add newly added to multipath jsaravana87 Linux - Server 3 02-05-2015 03:21 AM
Newly added hosts to BIND... slackware_newbie Linux - Server 15 01-10-2013 02:34 AM
How to find the exact devices attached to the newly added luns in Redhat linux 5 npk85 Linux - Server 3 07-23-2012 11:43 AM
how can i mount newly added H.D using SuSe 9.0 elbrens Linux - Software 3 08-14-2007 01:51 PM
How to add an existing linux on a newly added disk to grub ? glenn69 Linux - Newbie 1 10-07-2004 09:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 06:29 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