jump to navigation

Configure disk to use for veritas volume manager (VxVM) Sunday, September 16, 2007

Posted by piyut in Solaris.
4 comments

1. Detect new disk -> dfsadm, cfgadm -c configure control_number

2. Labeling disk -> format, choose disk number, label

3. Configure disks

# vxdisksetup -i disk_name

or using vxdiskadm -> choose 1. Add or initialize one or more disks

4. make diskgroup

# vxdg init dg_name disk_name=device_name

* vxdg init backupdg backupdg01=Disk_24

5. make volume

# vxassist -g backupdg maxsize

2096883712

# vxassist -g backupdg make backuplv 2096883712

*size=output from vxassist -g dg_name maxsize

6. Start volume

# vxvol -g backupdg startall

7. Make Filesystem

# mkfs -F vxfs /dev/vx/rdsk/backupdg/backuplv

8. Mounting Filesystem

# mkdir /backup

# mount -F vxfs /dev/vx/dsk/backupdg/backuplv /backup

9. Edit /etc/vfstab

How to find world writable file and directory Friday, September 14, 2007

Posted by piyut in HP-UX, Solaris.
add a comment

To find world writable file:

#  find / -type f -perm -o+w -exec ls -l {} \;

To find world writable directory:

# find /home -type d -perm -o+w -exec ls -ld {} \;

OS Memory Leaks/Hogs Thursday, September 13, 2007

Posted by piyut in HP-UX.
add a comment

1. To cek memory leaks in hpux can use an unsupported utility called kmeminfo

2. Checking memory hogs:

- JFS inode cache is sized by vx_ninode kernel parameter. the value of vx_ninode is determined by memory size

- lowering vx_ninode results in a large savings of memory

- to see the JFS inode cache:

# echo “vxfs_ninode/D” | adb -k /stand/vmunix /dev/mem

- to see how many JFS inodes are currently cached:

# echo “vx_cur_inodes/D” | adb -k /stand/vmunix /dev/mem

lsof Friday, September 7, 2007

Posted by piyut in HP-UX.
add a comment

Get the source of lsof from  http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.78/

To install, run command swinstall -s $PWD/lsof-4.78-hppa-11.11.depot \*, the insallation file will be put at /usr/local

To display just the lsof output lines with file locks run the following:

/opt/lsof/bin/lsof | awk ‘match(”NrRwWuUx”,substr($0,31,1))’