Showing posts with label LVM. Show all posts
Showing posts with label LVM. Show all posts

Thursday, 24 November 2011

RAID Level supported by LVM - HP UX

HP-UX with LVM supports

1 ) Mirroring RAID 1

2 ) Striping RAID 0

3 ) Striping + Mirroring ( 0 + 1 ) with PVGS that is
with PVG strict & distributed striping LVM polict ( -S g -D y)

Note : RAID 5 & RAID Mirroring + striping are supported on VXVM only !!

Root disk failed in HP Unix ??? How to change the Root disk?

If the disk is hot swappable, remove the disk

1. # vgreduce -f /dev/vg00

This will remove the failed disk from vg00

2. # lvlnboot -R

3. Insert the new disk

4. # ioscan -fnC disk

5. # vgcfgrestore -n /dev/vg00 /dev/rdsk/

6. # mkboot /dev/rdsk/devicefile

7. # mkboot -a "hpux" /dev/rdsk/devicefile

8. # vgchange -a y /dev/vg00

9. # vgsync /dev/vg00

10. # lvlnboot -R

11. confirm with vgdisplay, lvdisplay, pvdisplay and lvlnboot.

=============================
If the disks are not hot swappable

1. Shutdown and get the disk replaced

2. boot in single-user mode

3. ioscan, find the device file

4. vgcfgrestore -n /dev/vg00 /dev/dsk/

5. mkboot /dev/rdsk/

6.mkboot -a "hpux" /dev/rdsk/

7.vgchange -a y /dev/vg00

8.vgsync /dev/vg00

9. Reboot in multi-user mode

Wednesday, 23 November 2011

LVM2 in HPUX 11.31

LVM2 found in HPUX 11.31 has lifted a lot of burdensome limits on volume groups. vgcreate automatically creates the device group file; VGs are only limited by the MAX VG size you specify when creating the VG, using the -S option; hitting the max VG size is the only case where a backup/recreate/restore is needed. Here's a list of helpful commands:

LVMP_CONF_PATH_NON_BOOT found in /etc/lvmrc (in March 2010 release) allows lvm2 vg configuration file backups to an alternate location because of the large size of VG 2.X backups

lvmadm - (-t) displays limits of LVM1 and LVM2 VG 1.0 and VG 2.0 and up; (-l) also lists the contents of /etc/lvmtab and lvmtab_p

lvmadm -l
--- Version 1.0 volume groups ---
VG Name /dev/vg00
PV Name /dev/disk/disk3_p2
/dev/disk/disk2_p2

--- Version 2.1 volume groups ---
VG Name /dev/vgXX
PV Name /dev/disk/diskXXX


convert from legacy to persistent DSF: use vgdsf
/usr/contrib/bin/vgdsf –c vgXX

vgcreate using the new LVM2 VG2.0+ notation:
vgcreate -V 2.1 -s 16 -S 4t vgXXX /dev/disk/diskxxx /dev/disk/diskxxx

convert from VG1.0 to VG2.0+
The -r does a "review" to make sure the VG can be converted.
vgversion -V 2.1 -r vgXX

before the convert will run the VG has to be deactivated:
vgchange -a n vgXX
vgversion -V 2.1 vgXX


ioscan new options for persistent dsfs:
ioscan -m dsf /dev/disk/disk127
Persistent DSF Legacy DSF(s)
========================================
/dev/disk/disk127 /dev/dsk/c5t5d0
/dev/dsk/c6t5d0

fsadm: You don't have a license to run this program : how to fix??

If u got the below error

fsadm -b 1024M /home/user1
fsadm: /etc/default/fs is used for determining the file system type
fsadm: You don't have a license to run this program

1. # /usr/sbin/vxlicrep -e

Check the valid Liscense

2. # vxlicense -p vxlicrep

Check the valid license from running server and install it on this server

License location : # /etc/vx/elm

# ll /etc/vx/elm

total 32
-rw-r--r-- 1 root sys 171 Nov 4 14:43 50.lic
-r--r--r-- 1 bin bin 291 Nov 14 2000 README

Copy the 50.lic file to the required server and install it

3. # vxlicinst -k 010449565889805115946465 (install the license)

4. # sbin/fs/vxfs/vxenablef -a (Enable that license)

Now u can try to extend the FS

# fsadm -b 1024M /home/user1

Tuesday, 22 November 2011

Rename VG & LVOL in HP UX


Rename VG in HP UX

1.Unmount the FS in that VG

  #umount /mountpoint

2.Export the VG

  #vgexport -s -v -m -N /tmp/vgname.map /dev/vgname

3.#mkdir /dev/newvgname
  #mknod /dev/newvgname/group c 64 "minor no"

4.Import the VG now

  #vgimport -s -v -m /tmp/vgname.map /dev/newvgname

5.Vgchange -a y newvgname

6.vgcfgbackup newvgname

7.Edit the /etc/fstab and change the mount point to new VG name.

8. # mount -a



Rename a Lvol in HP UX

a. #umount /

b. #mv /dev/vgxx/ /dev/vgxx/

c. #mv /dev/vgxx/r /dev/vgxx/r
e. Modify the /etc/fstab file to reflect the newname.
f. mount /dev/vgxx/ /
   or
  mount -a