admin
mirror boot disk in HP-UX 11.x PA-RISC
30 июля
Say /dev/dsk/c0t6d0 is the root disk and /dev/dsk/c3t6d0 is the disk you want to make a mirror of.
1. Create a bootable LVM disk to be used for the mirror.
pvcreate -B /dev/rdsk/c3t6d0
2. Add this disk to the current root volume group.
vgextend /dev/vg00 /dev/dsk/c3t6d0
3. Make the new disk a boot disk.
mkboot -l /dev/rdsk/c3t6d0
4. Copy the correct AUTO file into the new LIF area.
mkboot -a "hpux -lq (;0)/vmunix" /dev/rdsk/c3t6d0
5. Mirror the boot, root and primary swap logical volumes to the new
bootable disk. Ensure that all devices in vg00, such as /usr, /swap,
etc., are mirrored.
The following is an example of mirroring the boot logical volume:
lvextend -m 1 /dev/vg00/lvol1 /dev/dsk/c3t6d0
The following is an example of mirroring the primary swap logical
volume:
lvextend -m 1 /dev/vg00/lvol2 /dev/dsk/c3t6d0
The following is an example of mirroring the root logical volume:
lvextend -m 1 /dev/vg00/lvol3 /dev/dsk/c3t6d0
6. Update the boot information contained in the BDRA for the mirror
copies of boot, primary swap and root.
/usr/sbin/lvlnboot -b /dev/vg00/lvol1
/usr/sbin/lvlnboot -s /dev/vg00/lvol2
/usr/sbin/lvlnboot -r /dev/vg00/lvol3
7. Check if the BDRA is correct.
/usr/sbin/lvlnboot -R /dev/vg00
8. Verify that the mirrors were properly created.
lvlnboot -v /dev/vg00
The output of this command is shown in a display like the following:
Boot Definitions for Volume Group /dev/vg00:
Boot Definitions for Volume Group /dev/vg00:
Physical Volumes belonging in Root Volume Group:
/dev/dsk/c0t6d0 (1/0/0/3/0.6.0) -- Boot Disk
/dev/dsk/c3t6d0 (1/0/1/0/0/1/1.6.0) -- Boot Disk
Boot: lvol1 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Root: lvol3 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Swap: lvol2 on: /dev/dsk/c0t6d0
/dev/dsk/c3t6d0
Dump: lvol2 on: /dev/dsk/c0t6d0, 0
vgdisplay -v vg00
Then lvextend for all other lvols:
lvextend -m 1 /dev/vg00/lvol4 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol5 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol6 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol7 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol8 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol9 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol10 /dev/dsk/c3t6d0
lvextend -m 1 /dev/vg00/lvol11 /dev/dsk/c3t6d0
tru64 user management
30 июня
unlock account in tru64
usermod -x grace_limit=1
will bypass most of the disabling conditions
for one day. This allows the user to log in
and clear the disabling condition.
Also
edauth -g user > file
edit the file and change the lock to be u_lock@
then
edauth -s < file
should unlock the user
EVA disk mount on Tru64
18 июня
Update SCSI devices:
15:52:39 root@host ~#hwmgr scan scsi
hwmgr: Scan request successfully initiated
Look for last found device:
15:52:51 root@host ~#hwmgr show scsi -type disk | tail -1
687: 51 host disk none 0 14 dsk29 [2/9/18]
Ok. We have new disk: device dsk29, device ID 51.
Look for WWN of device:
15:52:52 root@host ~#hwmgr show scsi -did 51 -full | grep WWID
WWID:01000010:6005-08b4-0009-5ffb-0000-9000-00b3-0000
Check if it really what we presented
Prepare disk:.
15:53:05 root@host ~#disklabel -rw -t advfs dsk29
Create new file domain prod17:
15:53:23 root@host ~#mkfdmn dsk29c prod17
Create new fileset prod17 in file domain prod17:
15:53:37 root@host ~#mkfset prod17 prod17
Create mountpoint:
15:53:49 root@host ~#mkdir /prod17
Mount new filest:
15:53:53 root@host ~#mount -t advfs prod17#prod17 /prod17
Add automount to fstab:
15:54:01 root@host ~#echo "prod17#prod17 /prod17 advfs rw 0 2" >> /etc/fstab
Check space:
15:54:11 root@host ~#df -k /*prod17
Filesystem 1024-blocks Used Available Capacity Mounted on
prod17#prod17 104857600 16 104851736 1% /prod17
iptables routing NAT
25 февраля
noteboot (10.1.1.2)-> |eth2 (10.1.1.1) – eth0 (172.20.200.33)| -> gw (172.20.200.1)
Linux:
*) enable forwarding echo '1' > /proc/sys/net/ipv4/ip_forward
*) turn NAT on iptables -t nat -A POSTROUTING -o eth0 -j SNAT --to 172.20.200.33
Восстанавливаем Windows XP MBR
16 июля
Зазружаемся с установочного диска.
Выбираем опцию ‘R’ (recovery console)
Выбираем нужную установленную версию OS
Пишем пароль администратора
Вводим команду FIXMBR
На вопрос отвечаем буквой ‘Y’
Перезагружаемся.
TRUSTED SYSTEM – UNIX
15 июля
TRUSTED SYSTEM – UNIX
1. To convert the system into trusted system the command is :
/usr/lbin/tsconvert
After converting it will create a directory /tcb/files/auth/*/*
Note: before converting into trusted system you have to modify /etc/nsswitch.conf file. In that file “passwd compact “ has to be changed into “passwd files”
Читать дальше >
Копирование файлов через ssh
3 июля
tar -cvf - test | ssh saygak@dodger "cd /usr/home/saygak/dp; cat | tar -xf - "
Storage for ServiceGuard using LVM
9 июня
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
look for sutable disks:
ioscan -fnC disk
diskinfo /dev/rdsk/c0t2d0
diskinfo /dev/rdsk/c0t3d0
prepare two disks:
pvcreate /dev/rdsk/c0t2d0
pvcreate /dev/rdsk/c0t3d0
create volumegroup:
vgcreate vg01 "/dev/dsk/c0t2d0" "/dev/dsk/c0t3d0"
Create 200mb logial volume on node1:
lvcreate -L 200 -n sglvol1 vg01
mirror new logial volume:
lvextend -m 1 /dev/vg01/sglvol1
Create new journaled FS:
newfs -F vxfs /dev/vg01/rsglvol1
create mount poit:
mkdir /sgdata1
Mount:
mount -F vxfs /dev/vg01/sglvol1 /sgdata1
copy some files:
cp /sbin/lv* /sgdata1/
export LVM onf in preview mode:
vgexport -v -p -s -m /tmp/vg01.map vg01
cat /tmp/vg01.map
VGID 41c165b2484d2496
1 sglvol1
Transfer /tmp/vg01.map on node2.
Actions on node2:
mkdir /dev/vg01
mknod /dev/vg01/group c 64 0x010000
vgimport -v -s -m /tmp/vg01.map vg01
mkdir /sgdata1
vgchange -a r vg01
mount -F vxfs -o ro /dev/vg01/sglvol1 /sgdata1
ll /sgdata1
vgcfgbackup vg01
umount /sgdata1
vgchange -a n vg01
Configuring and managing LVM
9 июня
Mirroring integrity boot disks
loate urrent boot disk:
lvlnboot -v
diskinfo /dev/rdsk/c0t0d0s2
create system partitions:
vi /tmp/idf
3
EFI 500MB
HPUX 100%
HSP 400MB
idisk -wf /tmp/idf /dev/rdsk/c0t1d0
create device files for new partitions:
insf -eC disk
use idisk again to verify:
idisk /dev/rdsk/c0t1d0
itialize and populate EFI system partition:
mkboot -e -l /dev/rdsk/c0t1d0
change auto on both disks:
vi /tmp/auto
boot vmunix -lq
efi_cp -d /dev/rdsk/c0t0d0s1 /tmp/auto /efi/hpux/auto
efi_cp -d /dev/rdsk/c0t1d0s1 /tmp/auto /efi/hpux/auto
verify:
efi_ls -d /dev/rdsk/c0t0d0s1
efi_ls -d /dev/rdsk/c0t1d0s1
verify contents:
efi_cp -d /dev/rdsk/c0t1d0s1 -u /efi/hpux/auto /tmp/auto.contents
cat /tmp/auto.contents
boot vmunix -lq
Configure OS partition:
pvcreate -fB /dev/rdsk/c0t1d0s2
vgextend vg00 /dev/dsk/c0t1d0s2
lvlnboot -v
mirror all logial volumes in vg00:
for f in /dev/vg00/lvol*
do
echo "Now mirroring $f \n"
lvextend -m 1 $f
done
change bootconf:
vi /stand/bootconf
l /dev/dsk/c0t0d0s2
l /dev/dsk/c0t1d0s2
verify, that disk was added:
vgdisplay -v vg00
verify, that BDRA updated properly:
lvlnboot -v
/dev/dsk/c0t0d0s2 (0/0/0/0.0.0) — Boot Disk
/dev/dsk/c0t1d0s2 (0/0/0/0.1.0) — Boot Disk
Configure EFI boot manager menu:
setboot -- show urrent
setboot -p 0/0/0/0.0.0 -- primary
find seond disk path: ioscan -funC disk
add new HAA: setboot -h 0/0/0/0.1.0
verify: setboot
unlock user in hpux
30 мая
/usr/lbin/getprpw -l -r -m lockout username
/usr/lbin/modprpw -l -k username
vmware and ubuntu 8
30 апреля
После апгрейда перестал работать vmware.
решилось следующими манипуляциями:
Проблема с компиляцией vmmon (nclude/asm/bitops_32.h:9:2: error)
1. cd /usr/lib/vmware/modules/source
2. cp vmmon.tar vmmon.tar.orig
3. sudo tar xvf vmmon.tar
4. cd vmmon-only/include/
5. sudo vi vcpuset.h
6. change line 74 from: #include “asm/bitops.h” to: #include “linux/bitops.h”
7. rm vmmon.tar
8. sudo tar cvf vmmon.tar vmmon-only/
9. sudo rm -rf vmmon-only/
10. sudo vmware-config.pl
Проблема с GCC (/usr/lib/vmware/bin/vmware: /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1: version `GCC_3.4′ not found (required by /usr/lib/libcairo.so.2) )
$ mv /usr/lib/vmware/lib/libgcc_s.so.1/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1libgcc_s.so.1.old
$ mv /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/libpng12.so.0.old
$ cp /lib/libgcc_s.so.1 /usr/lib/vmware/lib/libgcc_s.so.1/
$ cp /usr/lib/libpng12.so.0 /usr/lib/vmware/lib/libpng12.so.0/