2009 April

Convert Cisco pcf file to vpnc

By WladyX on 27 April, 2009 | General, Ubuntu | A comment?

HP Logical Volume Manager (LVM)

Commonly used LVM procedures

Create a new volume group, logical volume and filesystem

pvcreate /dev/rdsk/c0t1d0
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0×010000
vgcreate /dev/vg01 /dev/dsk/c0t1d0
lvcreate -L 2000 /dev/vg01
newfs -F vxfs -o largefiles /dev/vg01/rlvol1
mkdir /ora_data01
mount /dev/vg01/lvol1 /ora_data01

Create a stripped filesystem

lvcreate -i 3 -I 32 -L 24 -n lvol1 /dev/vg01

-i number of stripes
-I stripe size of 32KB
-L size of the volume

Mirror root and swap disk

pvcreate -B /dev/rdsk/c0t6d0
vgextend /dev/vg00 /dev/dsk/c0t6d0
mkboot /dev/rdsk/c0t6d0
mkboot -a “hpux -lq” /dev/rdsk/c0t6d0
mkboot -a “hpux -lq” /dev/rdsk/<primary disk>
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c0t6d0
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c0t6d0
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c0t6d0
lvextend ……..all other volumes on primary disk

setboot -a 8/8.6.0

replace a non-mirrored disk

lvreduce -m 0 -A n /dev/vg01/lvol1 /dev/dsk/cxtxdx
vgreduce vg01 /de/dsk/cxtxdx
or
pvchange -a N /dev/dsk/cxtxdx (if you have online replacement disks)

vgcfgrestore -n /dev/vgXX /dev/rdsk/cxtxdx
vgchange -a y /dev/vgXX
newfs -F <fstype> /dev/vgXX/rlvolx
mount <mountpoint>

Notes:
Make sure you have /etc/lvmconf/vgXX.conf
vgcfgbackup is run automatically
Defective disk was not mirrored before it failed

replace a mirrored disk

vgcfgrestore -n /devvgXX /dev/rdsk/cxtxdx
vgchange -a y /dev/vgXX
vgsync /dev/vgXX

Notes:
Defective disk was mirrored before it failed

replace mirrored boot disk

vgcfgrestore -n /dev/vg00 /dev/rdsk/cxtxdx
vgchange -a y /dev/vg00
vgsync /dev/vg00
mkboot /dev/rdsk/cxtxdx
mkboot -a “hpux -lq” /dev/rdsk/cxtxdx
shutdown -r -y 0

Notes:
Confirm that you have /etc/lvmconf/vg00.conf
Defective disk was mirrored before it failed

export and import a volume group

System One:
vgchange -a n /dev/vg01
vgexport -v -m /tmp/mapfile -s /dev/vg01
rcp /tmp/mapfile <system 2>:/tmp/mapfile

System two:
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0xyy0000
vgimport -v -m /tmp/mapfile -s /dev/vg01
vgchange -a y /dev/vg01
mkdir /ora_data01
mount /dev/vg01/ora_data01 /ora_data01

extend VxFS file ssytem using onlineJFS lvextend -L 800 /dev/vg01/lvol1
fsadm -F vxfs -b 800M /ora_data01
change a logical volume to support largefiles fsadm -F vxfs -o largefiles /dev/vg01/rlvol1
display the boot area lifls -Clv /dev/dsk/c0t6d0
display boot information lvlnboot -v /dev/vg00
display all disks in the system ioscan -funC disk
make a dump device lvchange -C y /dev/vg00/dump (makes it contiguous)
lvlnboot -d /dev/vg00/dump
display dump devices lvlnboot -v

 

HP LVM

By WladyX on 22 April, 2009 | General, HP-UX | A comment?

Yaourt on Arch Linux

Search and install
yaourt [keywords]: quick search + install
yaourt -S [packages] : install package, Compile it from AUR if needed
yaourt -Ss
[keywords] : search on repos and on AUR (with notice for already installed packages)
yaourt -Sb [packages] : install a packages by compilation from sources (abs)
yaourt -Sl [repos] : prompt for packages of the selected repos (emphasize those already installed)
yaourt -Qs [keywords] : colorized ouput of installed packages and the repos where they come from
yaourt -Qo
[progname] or [filename] : shows the package which provides the program or the file

Updgrade:
yaourt -Syu : complete update and upgrade of the system (onlys from repos)
yaourt -Syu –aur : complete update and upgrade, even for packages coming from AUR
yaourt -Sybu –aur : complete update and upgrade by compilation of all packages (repos and AUR)
yaourt -Su –devel : update and upgrade of cvs/svn/mercurial/git packages

Cleaning:
yaourt -C : editing and merging of .pacnew/.pacsave
yaourt -Cc : removal of all .pacnew/.pacsave
yaourt -Qt : search for orphaned packages
yaourt -Cd : search for obsolete repos

Other options:
–export [directory] : exports compiled packages for gensync
yaourt -S –aur [packages] : forces compilation from AUR for a packages which is also in repos
yaourt -G [packages] : retrive PKGBUILD and local sources in current directory.
yaourt -B : backup the pacman database

Tux Training » Blog Archive » How to install and use Yaourt in Arch Linux

By WladyX on | Arch | A comment?

Change gnome lock screen background

replace /usr/share/pixmaps/backgrounds/gnome/background-default.jpg

Arch Linux Forums / Lock screen?

Script to mount/unmount drive


#!/bin/bash

DRIVE="/media/tera"

if mount | grep -q $DRIVE; then
umount $DRIVE
else
mount $DRIVE
fi

Arch Linux Forums / Post your handy self made command line utilities

By WladyX on 21 April, 2009 | Scripts | A comment?

iRedMail: Build A Full-Featured Mail Server With LDAP, Postfix, RoundCube, Dovecot, ClamAV, DKIM, SPF On CentOS 5.x

By WladyX on 15 April, 2009 | General, Mail, Mysql, Scripts | A comment?

Enable Metacity Compositing

gconftool-2 -s '/apps/metacity/general/compositing_manager' --type bool true

Enable Metacity Compositing in GNOME 2.22 | Tombuntu

By WladyX on 10 April, 2009 | Compiz, General, X11 | A comment?

Color man pages

You can add the values to your ~/.bashrc so that they are always used:

# Less Colors for Man Pages
export LESS_TERMCAP_mb=$’\E[01;31m’ # begin blinking
export LESS_TERMCAP_md=$’\E[01;38;5;74m’ # begin bold
export LESS_TERMCAP_me=$’\E[0m’ # end mode
export LESS_TERMCAP_se=$’\E[0m’ # end standout-mode
export LESS_TERMCAP_so=$’\E[38;5;246m’ # begin standout-mode – info box
export LESS_TERMCAP_ue=$’\E[0m’ # end underline
export LESS_TERMCAP_us=$’\E[04;38;5;146m’ # begin underline

Less Colors For Man Pages « Helpful Linux Tidbits

By WladyX on 6 April, 2009 | General, Scripts | A comment?