Create volume group in AIX

Create a volume group that contains 3 physical volumes with partition size set to 64 megabyte

# mkvg -s 64 hdisk2 hdisk3 hdisk4

Create volume group using all unused “None status” disks

# mkvg -S -y datavg -s ’64’ -n `lspv|grep None| awk ‘{print $1}’| xargs`

reference:
https://www-01.ibm.com/support/knowledgecenter/ssw_aix_71/com.ibm.aix.cmds3/mkvg.htm
http://unix.worldiswelcome.com/how-to-create-volume-group

Advertisements

Create volume group in Linux

1. If creating the volume group from scratch, verify which disk to use to create the volume group. (note: Assuming that disk has already been added)

# fdisk -l

Disk /dev/sdb doesn’t contain a valid partition table.

2. Create the partition inside the added disk and verify.

# cfdisk /dev/sdb
# fdisk -l

3. Create the physical volume with pvcreate and verify using pvdisplay

# pvcreate /dev/sdb1
# pvdisplay /dev/sdb1

4. Create the volume group using vgcreate and verify with vgdisplay.

# vgcreate new_vg /dev/sdb1
# vgdisplay

If adding disk with more than one partition

# vgcreate new_vg /dev/sdb1 /dev/sdb2
# vgdisplay

Create filesystem in Solaris (Veritas)

Creating RAW FS

# vxassist -g appdg make sybtempfs 2g user=sybase group=sybaseg
# newfs /dev/vx/rdsk/appdg/sybtempfs

Mounted FS

# vxassist -g appdg make sybtempfs 2g user=sybase15 group=sybase
# vxprint -ht | grep sybtempfs
v  sybtempfs    –            ENABLED  ACTIVE   4194304  SELECT    –        fsgen
pl sybtempfs-01 sybtempfs    ENABLED  ACTIVE   4194304  CONCAT    –        RW
sd paili01_11-02 sybtempfs-01 paili01_11 37748544 4194304 0       c2t50060E8003AAC711d9 ENA
# mkfs -F vxfs -o largefiles /dev/vx/rdsk/appdg/sybtempfs

create the mount point and mount the file system
# mkdir <mount point>
# mount -F vxfs /dev/vx/dsk/appdg/sybtempfs /apps/sybtemp

chown before and after mounting

change vfstab
/dev/vx/dsk/appdg/sybtempfs /dev/vx/rdsk/appdg/sybtempfs /apps/sybtemp vxfs 3 yes –

Create filesystem in AIX

1. Create the logical volume (fslv01) using volume group (in this case datavg) with 1Gb size.
# mklv -y fslv01 -t jfs2 datavg 1G

2. Create the filesystem on the logical volume fslv01 with mount point /filesystem
# crfs -v jfs2 -d /dev/fslv01 -m /filesystem -A yes -p rw

3. Modify the ownership
# chown user:group /filesystem

4. Mount the filesystem and modify the ownership
# mount /filesystem ; chown user:group /filesystem

5. Verify permissions, also check with df filesystem is mounted.
# ls -ld /filesystem

drwxr-xr-x    3 user  group         256 Sep 16 13:07 /filesystem

Create filesystem with enabled large files. Here’s the syntax.

# mklv -y <lvname> -t jfs2 <volume group> <size>

# crfs -v  jfs2 -a bf=true  -d /dev/<lvname> -m /<mount_point> -A yes -p rw