About Us

RSInfoMinds, a web based IT Training and Consultancy firm. It is established with high dreams in training people in IT Infrastructure Field. We provide Online and Class Room training in various fields of IT Infrastructure Management.

Join Us: http://www.facebook.com/RSInfoMinds
Mail Us: rsinfominds@gmail.com
Twitter: @RSInfoMinds

We are specialized in the below courses:

Redhat Linux Admin Redhat Linux Cluster
Redhat Virutualization IBM AIX Admin
IBM AIX Virtualization IBM AIX Cluster
HP Unix Admin HP Unix Cluster
HP Unix Virtualization Shell Scripting
Veritas Volume Manager Veritas Cluster
Oracle Core DBA VMWare


We provide training in such a way, So that you get in depth knowledge on the Courses you look for.

And we ensure you are very confident from each and every Techincal aspect that the IT Industry needs and expects from you.

We also conduct Workshops on the latest technology and the real time faculties sharing their work experiences to make you the best.

Friday, 20 January 2012

Replacing a disk in the LVM environment

Scenario:

In the LVM scenario, we want to replace hdisk2 in the volume group vioc_rootvg_1, which contains the LVs vioc_1_rootvg associated to vtscsi0. It has the following attributes:

 
 
 

> The virtual SCSI adapter on the virtual I/O server is vhost0.
 

On the VIO_Client:

1) # unmirrovg rootvg hdisk1 : Unmirror the failing disk.

2) # bosboot -ad /dev/hdisk0 : Create a bootimage on hdisk0.

3) # boolist -m both -o hdisk0 : Change the boot order.

4) # reducevg -d -f rootvg hdisk1 : Remove the failing disk from the rootvg

5) # rmdev -dl hdisk1 : Command to remove the disk from the machine.

Now the disk can be removed from the VIO_Server:

The "hdisk1" is presented at the VIO_Client as the logical volume of name "vioc_1_rootvg" that belongs to the volume group called "vioc_rootvg_1" that is made up of physical volume hdisk2 at the VIOS end.

Since the hdisk1 is the failed disk which has to be replace, which in turn refer to a logical volume at the VIOS. We need to remove the logical volume.

Note: The logical volume is associated with the Virtual Targer Device "vtscsi0" and mapped to the virtual client SCSI Adapter "vscsi1".

1) Login into VIOS_Sever as padmin.

2) $ lslv vioc_1_rootvg  : Make a note of the size of the LV (No.of LP/PP Counts).

3) $ rmdev -vtd vtscsi0 : Command to remove the Virtual Target Device.

4) $ rmlv -f  vioc_1_rootvg  : Command to remove the logical volume.

5) $ lsvg -lv vioc_rootvg_1 : Command to verify the logical volume has been remove from the volume group.

6) $ mklv -lv vioc_1_rootvg vioc_rootvg_1  32G: Command to recreate another logicalvolume of same size.

7) $ lslv vioc_1_rootvg  : Command to verify the logical volume has been created.

8) $ mkvdev -dev vioc_1_rootvg  -vadapter vhost0  : Mapping of the logical volume to the Virtual SCSI client adapter.

9) $ lsmap -vadapter vhost0 : Verify the mapping has been done successfully.

On the client:

1) # cfgmgr : Command to look for any new devices added.

2) # lspv : List the physical volumes. Look for the one in "None" state.

3) # extendvg rootvg hdisk# : Command to add the new disk to the rootvg.

4) # mirrorvg rootvg hdisk# : Command to mirror the rootvg to the newly added disk.

5) # lsvg -m rootvg  : Command to verify the rootvg is mirrored onto new disk.

6) # bosboot  -ad /dev/hdisk# : Create a boot image on the newly added disk.

7) # bootlist -m both -o hdisk# : Update the bootlist.

> The volume group on the virtual I/O client is rootvg.
> The virtual SCSI adapter on the virtual I/O client is vscsi1.
> The failing disk on the virtual I/O client is hdisk1.
> The virtual disk is LVM mirrored on the virtual I/O client.
> The size is 32 GB.

To extend a logical volume on the Virtual I/O Server and recognize the change on the virtual Client

1) Login into the VIOS as padmin.

$ lslv <logical_volume_name>

$ lslv db_lv
LOGICAL VOLUME: db_lv VOLUME GROUP: db_sp
LV IDENTIFIER: 00cddeec00004c000000000c4a8b3d81.1 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 32512 PP SIZE: 32 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 320 PPs: 320
STALE PPs: 0 BB POLICY: non-relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 1024
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
DEVICESUBTYPE : DS_LVZ

2) $ extendlv <logical_volume_name> <Size>

$ extendlv db_lv 5G

$ lslv db_lv
LOGICAL VOLUME: db_lv VOLUME GROUP: db_sp
LV IDENTIFIER: 00cddeec00004c000000000c4a8b3d81.1 PERMISSION: read/write
VG STATE: active/complete LV STATE: opened/syncd
TYPE: jfs WRITE VERIFY: off
MAX LPs: 32512 PP SIZE: 32 megabyte(s)
COPIES: 1 SCHED POLICY: parallel
LPs: 480 PPs: 480
STALE PPs: 0 BB POLICY: non-relocatable
INTER-POLICY: minimum RELOCATABLE: yes
INTRA-POLICY: middle UPPER BOUND: 1024
MOUNT POINT: N/A LABEL: None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?: NO
DEVICESUBTYPE :
DS_LVZ

3) $ chvg -g <volume_group_name> : Command to find whether the volume group size has increased or not.