Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Friday 1 November 2013

Physical Volume in linux


Physical Volume:

You can create PV on a hard disk or partiiosn (of type '8e' / Linux LVM)

To initialize a PV on a partition:
# pvcreate /dev/sdb1

To initialize multiple PVs:
# pvcreate /dev/sdb1 /dev/sdb2 /dev/sdb3

To forcibly initialize a PV on a disk :
# pvcreate -f /dev/sdb

Above command initializes a PV by putting a volume group descriptor area a.k.a VGDA at the start of the PV

To show the information about a PV:
# pvdisplay /dev/sdb1

To report information about PVs:
# pvs

To scan all disks for Physical volumes:
# pvscan

To scan/show PVs only for exported VGs:
# pvscan -e

To scan/show PVs not belonging to any VG:
# pvscan -n

To expand a PV after enlarging the partition with fdisk:
# pvresize /dev/sdb1

To shrink a PV on a partition prior to shrinking the partition with fdisk:
# pvresize --setphysicalvolumesize 40G /dev/sdb1

To view PEs:
# pvdata -E /dev/vg1/lv1

To move PEs between PVs :
# pvmove -n lv1 /dev/sdd1 /dev/sdd2

No comments:

Post a Comment