Sunday, March 8, 2015

Find the size of the disk that is part of ASM disk

# lvs
# fdisk -l
# multipath -ll | more
# multipath -ll | grep -A 1 ASMDISK
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/[features=1//'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/[features=1//'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/\[features=1//'
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/\[features=1//' | grep ASM
# multipath -ll | grep -A 1 ASMDISK | awk '{l1=$0;getline;print l1 " " $0}' | awk '{print $1 " " $5}' | sed -e 's/\[features=1//' | grep ASM
# multipath -ll | grep -A 1 ASMDISK | awk '/ASMDISK/ {print $1} /size=/ {print substr($0,1,11)}' | awk '/ASMDISK/ {l1=$0; getline; print l1 " " $0}'  | sort
ASMDISK01 [size=101G]
ASMDISK02 [size=101G]
ASMDISK02 [size=101G]
ASMDISK04 [size=101G]
ASMDISK05 [size=101G]
ASMDISK06 [size=101G]
ASMDISK07 [size=101G]
ASMDISK08 [size=101G]
ASMDISK09 [size=101G]
ASMDISK10 [size=101G]
ASMDISK19 [size=101G]
ASMDISK21 [size=101G]



# ls -l /dev/mapper
# multipath -ll
# multipath -ll  | grep -A 1 3600

# multipath -ll  | grep -A 1 3600
SANDISK03 (360060160ccd02600481caca40112e011) dm-2 DGC,VRAID
[size=100G][features=1 queue_if_no_path][hwhandler=1 emc][rw]
--
SANDISK02 (360060160ccd02600491caca40112e011) dm-0 DGC,VRAID
[size=100G][features=1 queue_if_no_path][hwhandler=1 emc][rw]
--
SANDISK01 (360060160ccd026004a1caca40112e011) dm-1 DGC,VRAID
[size=100G][features=1 queue_if_no_path][hwhandler=1 emc][rw]

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/cciss/c0d0p3      20G  5.4G   14G  30% /
/dev/mapper/system-oraclelv
                       34G  208M   32G   1% /opt/oracle
/dev/mapper/system-datalv
                      4.9G  885M  3.8G  19% /data
/dev/mapper/system-data_oraclelv
                       20G  7.4G   12G  40% /data/oracle
/dev/mapper/sanvg-oradblv1
                      249G  115G  121G  49% /data/oradata1
/dev/mapper/sanvg-oradblv2
                       47G  181M   44G   1% /data/oralog1

# pvs -o +devices
  PV                     VG     Fmt  Attr PSize   PFree    Devices
  /dev/cciss/c0d0p5      system lvm2 a--   84.44G    7.44G /dev/cciss/c0d0p5(0)
  /dev/cciss/c0d0p5      system lvm2 a--   84.44G    7.44G /dev/cciss/c0d0p5(384)
  /dev/cciss/c0d0p5      system lvm2 a--   84.44G    7.44G /dev/cciss/c0d0p5(1504)
  /dev/cciss/c0d0p5      system lvm2 a--   84.44G    7.44G /dev/cciss/c0d0p5(1664)
  /dev/cciss/c0d0p5      system lvm2 a--   84.44G    7.44G /dev/cciss/c0d0p5(1824)
  /dev/cciss/c0d0p5      system lvm2 a--   84.44G    7.44G
  /dev/mpath/SANDISK01p1 sanvg  lvm2 a--  100.00G       0  /dev/mpath/SANDISK01p1(0)
  /dev/mpath/SANDISK02p1 sanvg  lvm2 a--  100.00G       0  /dev/mpath/SANDISK02p1(0)
  /dev/mpath/SANDISK03p1 sanvg  lvm2 a--  100.00G 1012.00M /dev/mpath/SANDISK03p1(0)
  /dev/mpath/SANDISK03p1 sanvg  lvm2 a--  100.00G 1012.00M /dev/mpath/SANDISK03p1(13314)
  /dev/mpath/SANDISK03p1 sanvg  lvm2 a--  100.00G 1012.00M

# vgs -o +devices
  VG     #PV #LV #SN Attr   VSize   VFree    Devices
  sanvg    3   2   0 wz--n- 299.99G 1012.00M /dev/mpath/SANDISK01p1(0)
  sanvg    3   2   0 wz--n- 299.99G 1012.00M /dev/mpath/SANDISK02p1(0)
  sanvg    3   2   0 wz--n- 299.99G 1012.00M /dev/mpath/SANDISK03p1(0)
  sanvg    3   2   0 wz--n- 299.99G 1012.00M /dev/mpath/SANDISK03p1(13314)
  system   1   5   0 wz--n-  84.44G    7.44G /dev/cciss/c0d0p5(0)
  system   1   5   0 wz--n-  84.44G    7.44G /dev/cciss/c0d0p5(384)
  system   1   5   0 wz--n-  84.44G    7.44G /dev/cciss/c0d0p5(1504)
  system   1   5   0 wz--n-  84.44G    7.44G /dev/cciss/c0d0p5(1664)
  system   1   5   0 wz--n-  84.44G    7.44G /dev/cciss/c0d0p5(1824)

# lvs -o +devices
  LV            VG     Attr   LSize   Origin Snap%  Move Log Copy%  Convert Devices
  oradblv1      sanvg  -wi-ao 252.00G                                       /dev/mpath/SANDISK01p1(0)
  oradblv1      sanvg  -wi-ao 252.00G                                       /dev/mpath/SANDISK02p1(0)
  oradblv1      sanvg  -wi-ao 252.00G                                       /dev/mpath/SANDISK03p1(0)
  oradblv2      sanvg  -wi-ao  47.00G                                       /dev/mpath/SANDISK03p1(13314)
  data_oraclelv system -wi-ao  20.00G                                       /dev/cciss/c0d0p5(1824)
  datalv        system -wi-ao   5.00G                                       /dev/cciss/c0d0p5(1504)
  optlv         system -wi-ao  12.00G                                       /dev/cciss/c0d0p5(0)
  oraclelv      system -wi-ao  35.00G                                       /dev/cciss/c0d0p5(384)
  tmplv         system -wi-ao   5.00G                                       /dev/cciss/c0d0p5(1664)



No comments:

Post a Comment