1756562 Members
2308 Online
108848 Solutions
New Discussion юеВ

Adding new disk

 
SOLVED
Go to solution
Betty Hardin
Frequent Advisor

Re: Adding new disk

Good info. Have identified my drives (all of my drives including those that are missing). Now; how can I match the physical drive to a volume group or device?

For example; I'd like to equate the serial number of each disk to the device (ie. /dev/dsk/c5t0d5 = 3BV186XE) - or something like that.

Is it possible?

TIA
B
Todd McDaniel_1
Honored Contributor

Re: Adding new disk

not sure why you would need the serial number... related to the device name?

Easy way to tell when new devices are added ...

do a:

ls -lrt /dev/dsk/*


This will list in reverse order your disks of most recent creation last.

All you need now is to add them since you have found the correct new disks.
Unix, the other white meat.
Todd McDaniel_1
Honored Contributor

Re: Adding new disk

Here is an easy script I have that lists used disks by VG...


you need a control file with all your VG names in it... vgnamesEMC.out


for name in `cat /root/vgnamesEMC.out `
do
echo $name
vgdisplay -v $name |grep "PV Name" |awk '{ print $3 }'
done > /root/disks.by.VG.`date +%m%d%y` 2> /root/vgerr.`date +%m%d%y`
~
Unix, the other white meat.
Sridhar Bhaskarla
Honored Contributor

Re: Adding new disk

Hi,

This simple script should print out a map of VGs and their corresponding disks.

for VG in $(vgdisplay -v |awk '/VG Name/ {print $3}')
do
printf "$VG -"
vgdisplay -v $VG |awk '/PV Name/ {printf "%s ", $3 }'
echo
done

The disks that are not shown in the above output would be unused. But make sure you don't have any VGs that are in deactivated stage as vgdisplay doesn't show information about them. You will have to depend on 'strings /etc/lvmtab' to get that information.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try