Create swap on HP-UX

HP-UX
MBYTE=300
VG=vg00
LV=lv_swap2
LVOL=/dev/$VG/$LV
ORG_DSKS=/dev/dsk/c0t12d0
MIRR=1
MIR_DSKS=/dev/dsk/c2t12d0
PRI=1
Option -s only works if physical VGs are defined only in EMC or Clariion disk type

sudo lvcreate -n $LV -s y -r N /dev/$VG

If it is not EMC nor Clariion disk type

sudo lvcreate -n $LV -s y -C y /dev/$VG

Next steps:

sudo lvextend -l 1 $LVOL $ORG_DSKS
sudo lvextend -m $MIRR $LVOL $MIR_DSKS
sudo lvextend -L $MBYTE $LVOL $ORG_DSKS $MIR_DSKS
sudo swapon -p $PRI -u $LVOL
echo $LVOL …. swap pri=$PRI # add to /etc/fstab
Checks:

sudo swapinfo -tm

About vicki

Welcome to the Sovereign Republic of Vickistan. I am the President here. Lucky me! No taxes or laws yet. Lucky you!
This entry was posted in Linux. Bookmark the permalink.