Friday 23 September 2016

LVM Partition                                   

-------------------------                                        
Storage Allocation:  add a new LUN using EMC powerpath                            
--------------------------                                  
  • Process is raise a new storage request for additional disks. On allocation of the disks from storage team.                                        
                                        
----------------------------------------------------                                        
1.Pre-Backup                                        
----------------------------------------------------                                        
------take powermt backup pre---                                        
-------take fdisk backup pre----                                        
----Take various backup of all                                        
  • fdisk -l 2>/dev/null | egrep ^Disk | egrep -v 'dm-' >/home/nyada01/fdisk.pre  
  • powermt display dev=all >/home/n/powermt.pre                                        
  • df -Ph > df.Ph.pre                                        
  • fdisk -l > fdisk.l.pre                                        
  • pvs > pvs.pre                                        
  • vgs > vgs.pre                                        
  • lvs > lvs.pre                                        
  • cat /etc/fstab >fstab.pre                                        
                                        
                                        
--------------------------------------------                                        
2.Scan the server for newly allocated disks                                        
--------------------------------------------                                        
--A.)Find out how many SCSI controller configured                                        
  • ls /sys/class/scsi_host/                                        
                                        
--B.)Use systool command to see active HBA link                                        
  • systool -c fc_host -v                                        
  • tail /var/log/messages in duplicate window to see any changes to disk detected in logs simultaneously.                                        
Based on the systool output above scan the HBA ports for new disks.                                         
--C.)Scan the SCSI disks                                        
                                        
  • echo "- - -" > /sys/class/scsi_host/host*/scan                                        
                                        
Please use the SCSI controller number in place of * above & run the command seperately.                                        
                                        
--D.)Take fdisk & powermt backup post                                        
                                        
  • fdisk -l 2>/dev/null | egrep ^Disk | egrep -v 'dm-' >/home/nyada01/fdisk.post    
  •  powermt display dev=all >/home/n/powermt.post                                        
  • powermt config                                        
  • powermt save                                        
                                        
--E.)check the difference between pre & post for fdisk & powermt                                        
                                        
  • cd /home/n/                                        
  • diff fdisk.pre fdisk.post                                        
  • diff powermt.pre powermt.post                                        
                                        
Note:If you are still not able to find the new disk then issue the following command.                                        
  • echo "1" > /sys/class/fc_host/host/issue_lip                                        
  • Issue fdisk –l command to see if any new disks are detected.                                        
                                        
--------------------------------------------                                        
3.LVM Creation                                        
--------------------------------------------                                        
A.)Now create a physical volume                                        
  • pvcreate /dev/emcpowere                                        
                                        
B.)Volume Group create                                        
  • vgcreate ny01vg /dev/emcpowere                                        
                                        
Use 'vgextend' to add an initialized physical volume to an existing volume group.                                        
# vgextend my_volume_group /dev/hdc1                                        
                                        
C.)Logical Volume Creation                                        
  • lvcreate -L 980G -n ny01vol ny01vg                                        
                                        
D.)Convert the volume to gfs2 file system                                        
  • mkfs.gfs2 -p lock_dlm -t nylinux-clus1:nyata -j 8 /dev/ny01vg/ny01vol                                        
                                        
--------------------------------------------                                        
4.Mount the file system                                        
--------------------------------------------                                        
A.)Mount the gfs2 file system                                        
  • mkdir -p /oracle/ny01/                                        
  • mount /dev/ny01vg/ny01vol /oracle/ny01/                                        
                                        
B.)After mounting do /etc/mtab                                        
You should see the below mount point entries, copy the below line and update in /etc/fstab                                        
/dev/mapper/ny01vg-ny01vol /oracle/ny01 gfs2 rw,relatime,hostdata=jid=0 0 0                                        
                                        
C.)On ny02 node scan for newly created gfs2 file system                                        
                                        
  • vgscan                                                                  
  • lvscan                                        
                                        
Do, df –h and you should see the newly created gfs2 file system visible.                                        
----------------------------------------------------                                        
5.Post-Backup                                        
----------------------------------------------------                                        
----Take various backup of all post                                        
  • df -Ph > df.Ph.post                                        
  • fdisk -l > fdisk.l.post                                        
  • pvs > pvs.post                                        
  • vgs > vgs.post                                        
  • lvs > lvs.post                                        
  • cat /etc/fstab >fstab.post                                        
                                        
----------------------------------------------------------------

0 comments:

Post a Comment

ShortNewsWeb

Blog Archive

Recent Comments

Popular Posts

Translate

System Admin Share

Popular

Total Pageviews