HOW-to related-aix-hdisk-and-hdiskpower#
hostname:/ # lspv
hdisk0 0009b26a7e8e242b rootvg
hdisk1 000d67bf3525b180 rootvg
hdisk2 0024b7fae032d46d None
hdisk3 0024b7fa18e4e85c None
hdisk4 none None
hdisk5 none None
hdisk6 none None
hdisk7 none None
hdisk8 none None
hdisk9 none None
hdisk10 none None
hdisk11 none None
hdisk12 none None
hdisk13 none None
hdisk14 none None
hdisk15 none None
hdisk16 none None
hdisk17 none None
hdisk18 none None
hdisk19 none None
hdisk20 none None
hdisk21 none None
hdisk22 none None
hdisk23 none None
hdisk24 none None
hdisk25 none None
hdisk26 none None
hdisk27 none None
hdiskpower0 0024b7fa93d99b03 hds128vg
hdiskpower1 0024b7fa93d9d2ac hds128vg
hdiskpower2 0024b7fa93da1ec3 hds128vg
hdiskpower3 0024b7fa93da6abd hds128vg
hdiskpower4 0024b7fa93daa17f hds128vg
hdisk28 none None
hdisk29 none None
hdisk30 none None
hdisk31 none None
hdiskpower5 0024b7fa940c2ba4 hds128vg
hostname:/ # which powermt
/usr/sbin/powermt
hostname:/ # powermt display dev=all
Pseudo name=hdiskpower4
CLARiiON ID=APM00051203858 [USPLSAPLP032 (hostname)]
Logical device ID=600601602FA01400E6BBF1D4BF45DB11 [LUN 313]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B
==============================================================================
---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi0 hdisk12 SP A1 active alive 0 0
0 fscsi0 hdisk17 SP B0 active alive 0 0
1 fscsi1 hdisk22 SP A0 active alive 0 0
1 fscsi1 hdisk27 SP B1 active alive 0 0
Pseudo name=hdiskpower3
CLARiiON ID=APM00051203858 [USPLSAPLP032 (hostname)]
Logical device ID=600601602FA01400E7BBF1D4BF45DB11 [LUN 314]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B
==============================================================================
---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi0 hdisk11 SP A1 active alive 0 0
0 fscsi0 hdisk16 SP B0 active alive 0 0
1 fscsi1 hdisk21 SP A0 active alive 0 0
1 fscsi1 hdisk26 SP B1 active alive 0 0
Pseudo name=hdiskpower2
CLARiiON ID=APM00051203858 [USPLSAPLP032 (hostname)]
Logical device ID=600601602FA01400E8BBF1D4BF45DB11 [LUN 315]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B
==============================================================================
---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi0 hdisk10 SP A1 active alive 0 0
0 fscsi0 hdisk15 SP B0 active alive 0 0
1 fscsi1 hdisk20 SP A0 active alive 0 0
1 fscsi1 hdisk25 SP B1 active alive 0 0
Pseudo name=hdiskpower1
CLARiiON ID=APM00051203858 [USPLSAPLP032 (hostname)]
Logical device ID=600601602FA01400E9BBF1D4BF45DB11 [LUN 316]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B
==============================================================================
---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi0 hdisk14 SP B0 active alive 0 0
1 fscsi1 hdisk19 SP A0 active alive 0 0
1 fscsi1 hdisk24 SP B1 active alive 0 0
0 fscsi0 hdisk9 SP A1 active alive 0 0
Pseudo name=hdiskpower0
CLARiiON ID=APM00051203858 [USPLSAPLP032 (hostname)]
Logical device ID=600601602FA01400EABBF1D4BF45DB11 [LUN 317]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B
==============================================================================
---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi0 hdisk13 SP B0 active alive 0 0
1 fscsi1 hdisk18 SP A0 active alive 0 0
1 fscsi1 hdisk23 SP B1 active alive 0 0
0 fscsi0 hdisk8 SP A1 active alive 0 0
Pseudo name=hdiskpower5
CLARiiON ID=APM00051203858 [USPLSAPLP032 (hostname)]
Logical device ID=600601602FA01400EBBBF1D4BF45DB11 [LUN 318]
state=alive; policy=CLAROpt; priority=0; queued-IOs=0
Owner: default=SP B, current=SP B
==============================================================================
---------------- Host --------------- - Stor - -- I/O Path - -- Stats ---
### HW Path I/O Paths Interf. Mode State Q-IOs Errors
==============================================================================
0 fscsi0 hdisk28 SP A1 active alive 0 0
0 fscsi0 hdisk29 SP B0 active alive 0 0
1 fscsi1 hdisk30 SP A0 active alive 0 0
1 fscsi1 hdisk31 SP B1 active alive 0 0
hostname:/ #
Monday, February 25, 2008
Monday, February 18, 2008
Solaris: How to find disk serial number that need to be replaced
Entry in /var/adm/messages
Feb 14 04:14:50 ebitb2b5 SCSI transport failed: reason 'timeout': giving up
Feb 17 00:12:44 ebitb2b5 scsi: [ID 243001 kern.warning] WARNING: /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w2100002037e225c6,0 (ssd22):
Entry in #iostat -En
ssd22 Soft Errors: 0 Hard Errors: 1 Transport Errors: 60
Vendor: SEAGATE Product: ST336704FSUN36G Revision: A42D Serial No: 0101D1DLB5
Size: 36.42GB <36418595328>>
Feb 14 04:14:50 ebitb2b5 SCSI transport failed: reason 'timeout': giving up
Feb 17 00:12:44 ebitb2b5 scsi: [ID 243001 kern.warning] WARNING: /pci@8,600000/SUNW,qlc@2/fp@0,0/ssd@w2100002037e225c6,0 (ssd22):
Entry in #iostat -En
ssd22 Soft Errors: 0 Hard Errors: 1 Transport Errors: 60
Vendor: SEAGATE Product: ST336704FSUN36G Revision: A42D Serial No: 0101D1DLB5
Size: 36.42GB <36418595328>>
VERITAS: To set the ownership and permissions on a Volume, use the vxedit
Command:
#vxedit set user= group= mode=
EXAMPLE:
#vxedit set user=bchoi group=sysadm mode=755 webvol01
#vxedit set user=
EXAMPLE:
#vxedit set user=bchoi group=sysadm mode=755 webvol01
VERITAS: How to move a disk from diskgroup A to diskgroup B and create a new volume
tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk disk1 sparedg online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$ vxdg destroy sparedg <- because disk1 is the only/last disk of sparedg
tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk - - online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$ vxdg -g lp1dg1 adddisk disk01=emcpower7
tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk disk01 lp1dg1 online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$
tzddvf$ vxassist -g lp1dg1 maxsize
Maximum volume size: 52422656 (25597Mb)
tzddvf$ vxassist -g lp1dg1 make autologvol 16g layout=concat disk01
tzddvf$
tzddvf$ ls -l /dev/vx/rdsk/lp1dg1
total 0
crw------- 1 root root 277,9005 Nov 24 03:11 autologvol
crw------- 1 root root 277,9000 Aug 5 02:23 v_home_ap1adm
crw------- 1 root root 277,9001 Aug 5 02:23 v_home_lp1adm
crw------- 1 root root 277,9004 Aug 5 02:23 v_sapdb_LP1_sapbackup
crw------- 1 root root 277,9002 Aug 5 02:23 v_scratch
crw------- 1 root root 277,9003 Aug 12 13:11 v_usr_sap_AP1
tzddvf$ newfs /dev/vx/rdsk/lp1dg1/autologvol
newfs: construct a new file system /dev/vx/rdsk/lp1dg1/autologvol: (y/n)? y
/dev/vx/rdsk/lp1dg1/autologvol: 33554432 sectors in 16384 cylinders of 32 tracks, 64 sectors
16384.0MB in 335 cyl groups (49 c/g, 49.00MB/g, 6144 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 100448, 200864, 301280, 401696, 502112, 602528, 702944, 803360, 903776,
Initializing cylinder groups:
......
super-block backups for last 10 cylinder groups at:
32614752, 32715168, 32815584, 32916000, 33016416, 33116832, 33217248,
33317664, 33418080, 33518496,
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk disk1 sparedg online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$ vxdg destroy sparedg <- because disk1 is the only/last disk of sparedg
tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk - - online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$ vxdg -g lp1dg1 adddisk disk01=emcpower7
tzddvf$ vxdisk list
DEVICE TYPE DISK GROUP STATUS
c1t0d0s2 auto:sliced rootdisk rootdg online
c1t1d0s2 auto:sliced rootmirr rootdg online
c1t2d0s2 auto:none - - online invalid
c1t3d0s2 auto:sliced contingency rootdg online reserved
c5t70d91s2 auto:sliced c8t98d57 datadg01 online
c5t70d92s2 auto:sliced c8t98d58 datadg02 online
c5t70d93s2 auto:sliced c8t98d59 datadg03 online
c5t70d104s2 auto:sliced c8t98d60 saplogdg online
emcpower2s2 auto:cdsdisk CLAR_002 lp1dg1 online
emcpower7s2 auto:cdsdisk disk01 lp1dg1 online
- - CLAR_001 lp1dg1 failed was:emcpower1s2
- - datadg001 datadg01 failed nohotuse was:c5t2d2s2
- - datadg001 datadg02 failed nohotuse was:c5t2d3s2
- - datadg001 datadg03 failed nohotuse was:c5t2d0s2
- - saplogd01 saplogdg failed nohotuse was:c5t2d1s2
tzddvf$
tzddvf$ vxassist -g lp1dg1 maxsize
Maximum volume size: 52422656 (25597Mb)
tzddvf$ vxassist -g lp1dg1 make autologvol 16g layout=concat disk01
tzddvf$
tzddvf$ ls -l /dev/vx/rdsk/lp1dg1
total 0
crw------- 1 root root 277,9005 Nov 24 03:11 autologvol
crw------- 1 root root 277,9000 Aug 5 02:23 v_home_ap1adm
crw------- 1 root root 277,9001 Aug 5 02:23 v_home_lp1adm
crw------- 1 root root 277,9004 Aug 5 02:23 v_sapdb_LP1_sapbackup
crw------- 1 root root 277,9002 Aug 5 02:23 v_scratch
crw------- 1 root root 277,9003 Aug 12 13:11 v_usr_sap_AP1
tzddvf$ newfs /dev/vx/rdsk/lp1dg1/autologvol
newfs: construct a new file system /dev/vx/rdsk/lp1dg1/autologvol: (y/n)? y
/dev/vx/rdsk/lp1dg1/autologvol: 33554432 sectors in 16384 cylinders of 32 tracks, 64 sectors
16384.0MB in 335 cyl groups (49 c/g, 49.00MB/g, 6144 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 100448, 200864, 301280, 401696, 502112, 602528, 702944, 803360, 903776,
Initializing cylinder groups:
......
super-block backups for last 10 cylinder groups at:
32614752, 32715168, 32815584, 32916000, 33016416, 33116832, 33217248,
33317664, 33418080, 33518496,
Sunday, February 17, 2008
DNS How to add host inside domain
root@:/etc/mail # diff /etc/named.conf /etc/named.conf_as08022007
72,77d71
< zone "host.domain.com" IN {
< type master;
< file "host.domain.com.zone";
< allow-update { none; };
< };
<
root@:/etc/mail #
root@:/var/named # more host.domain.com.zone
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 10.6.100.14
root@:/var/named #
Add reverse if necessary
Restart named
72,77d71
< zone "host.domain.com" IN {
< type master;
< file "host.domain.com.zone";
< allow-update { none; };
< };
<
root@:/etc/mail #
root@:/var/named # more host.domain.com.zone
$TTL 86400
@ IN SOA @ root (
42 ; serial (d. adams)
3H ; refresh
15M ; retry
1W ; expiry
1D ) ; minimum
IN NS @
IN A 10.6.100.14
root@:/var/named #
Add reverse if necessary
Restart named
Solaris How to grow soft partition
(root)# metastat d31
d31: Soft Partition
Device: d20
State: Okay
Size: 8388608 blocks (4.0 GB)
Extent Start Block Block count
0 2097154 2097152
1 13262854 2097152
2 18071563 4194304
Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@SSEAGATE_ST336607LSUN36G_3JAX268Y000075139UX8
c0t1d0 Yes id1,sd@w4849544143484920444b3332454a2d33364e4320202020203433353139343634
(root)# metastat d20
d20: Mirror
Submirror 0: d21
State: Okay
Submirror 1: d22
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 45929322 blocks (21 GB)
d21: Submirror of d20
State: Okay
Size: 45929322 blocks (21 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s3 0 No Okay Yes
d22: Submirror of d20
State: Okay
Size: 45929322 blocks (21 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s3 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@SSEAGATE_ST336607LSUN36G_3JAX268Y000075139UX8
c0t1d0 Yes id1,sd@w4849544143484920444b3332454a2d33364e4320202020203433353139343634
(root)#
(root)# metattach d31 750M
d31: Soft Partition has been grown
(root)# growfs -M /export/home /dev/md/rdsk/d31
Warning: 1996 sector(s) in last cylinder unallocated
/dev/md/rdsk/d31: 9924608 sectors in 3436 cylinders of 27 tracks, 107 sectors
4846.0MB in 215 cyl groups (16 c/g, 22.57MB/g, 10816 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 46368, 92704, 139040, 185376, 231712, 278048, 324384, 370720, 417056,
9477408, 9523744, 9570080, 9616416, 9662752, 9709088, 9755424, 9801760,
9848096, 9894432,
(root)# df -k /export/home
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d31 4668164 3408354 1023092 77% /export/home
(root)# df -k /home/fpr/dat/in
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d31 4668164 3408355 1023091 77% /export/home
(root)#
d31: Soft Partition
Device: d20
State: Okay
Size: 8388608 blocks (4.0 GB)
Extent Start Block Block count
0 2097154 2097152
1 13262854 2097152
2 18071563 4194304
Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@SSEAGATE_ST336607LSUN36G_3JAX268Y000075139UX8
c0t1d0 Yes id1,sd@w4849544143484920444b3332454a2d33364e4320202020203433353139343634
(root)# metastat d20
d20: Mirror
Submirror 0: d21
State: Okay
Submirror 1: d22
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 45929322 blocks (21 GB)
d21: Submirror of d20
State: Okay
Size: 45929322 blocks (21 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t0d0s3 0 No Okay Yes
d22: Submirror of d20
State: Okay
Size: 45929322 blocks (21 GB)
Stripe 0:
Device Start Block Dbase State Reloc Hot Spare
c0t1d0s3 0 No Okay Yes
Device Relocation Information:
Device Reloc Device ID
c0t0d0 Yes id1,sd@SSEAGATE_ST336607LSUN36G_3JAX268Y000075139UX8
c0t1d0 Yes id1,sd@w4849544143484920444b3332454a2d33364e4320202020203433353139343634
(root)#
(root)# metattach d31 750M
d31: Soft Partition has been grown
(root)# growfs -M /export/home /dev/md/rdsk/d31
Warning: 1996 sector(s) in last cylinder unallocated
/dev/md/rdsk/d31: 9924608 sectors in 3436 cylinders of 27 tracks, 107 sectors
4846.0MB in 215 cyl groups (16 c/g, 22.57MB/g, 10816 i/g)
super-block backups (for fsck -F ufs -o b=#) at:
32, 46368, 92704, 139040, 185376, 231712, 278048, 324384, 370720, 417056,
9477408, 9523744, 9570080, 9616416, 9662752, 9709088, 9755424, 9801760,
9848096, 9894432,
(root)# df -k /export/home
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d31 4668164 3408354 1023092 77% /export/home
(root)# df -k /home/fpr/dat/in
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d31 4668164 3408355 1023091 77% /export/home
(root)#
Solaris How to LOFS (Loopback File system)
Creating a Loopback File System (LOFS)
A LOFS file system is a virtual file system that provides an alternate path to an existing file system. When other file systems are mounted onto an LOFS file system, the original file system does not change.
For more information, see the lofs(7FS).
--------------------------------------------------------------------------------
Caution –
Be careful when creating LOFS file systems. Because LOFS file systems are virtual file systems, the potential for confusing both users and applications is enormous.
--------------------------------------------------------------------------------
How to Create an LOFS File System
Become superuser or assume an equivalent role.
Create the directory you want to mount as an LOFS file system, if necessary.
# mkdir loopback-directory
Grant the appropriate permissions and ownership on the newly created directory.
Create the mount point where you want to mount the LOFS file system, if necessary.
# mkdir /mount-point
Mount the LOFS file system.
# mount -F lofs loopback-directory /mount-point
loopback-directory
Specifies the file system to be mounted on the loopback mount point.
/mount-point
Specifies the directory on which to mount the LOFS file system.
Verify that the LOFS file system has been mounted.
# mount -v
Example—Creating and Mounting an LOFS File System
The following example illustrates how to create, mount, and test new software in the /new/dist directory as a loopback file system without actually having to install it.
# mkdir /tmp/newroot
# mount -F lofs /new/dist /tmp/newroot
# chroot /tmp/newroot newcommand
Example—Mounting an LOFS File System at Boot Time
You can set up the system to automatically mount an LOFS file system when it boots by adding an entry to the end of the /etc/vfstab file. The following example shows an entry in the /etc/vfstab file that mounts an LOFS file system for the root (/) file system on /tmp/newroot.
A LOFS file system is a virtual file system that provides an alternate path to an existing file system. When other file systems are mounted onto an LOFS file system, the original file system does not change.
For more information, see the lofs(7FS).
--------------------------------------------------------------------------------
Caution –
Be careful when creating LOFS file systems. Because LOFS file systems are virtual file systems, the potential for confusing both users and applications is enormous.
--------------------------------------------------------------------------------
How to Create an LOFS File System
Become superuser or assume an equivalent role.
Create the directory you want to mount as an LOFS file system, if necessary.
# mkdir loopback-directory
Grant the appropriate permissions and ownership on the newly created directory.
Create the mount point where you want to mount the LOFS file system, if necessary.
# mkdir /mount-point
Mount the LOFS file system.
# mount -F lofs loopback-directory /mount-point
loopback-directory
Specifies the file system to be mounted on the loopback mount point.
/mount-point
Specifies the directory on which to mount the LOFS file system.
Verify that the LOFS file system has been mounted.
# mount -v
Example—Creating and Mounting an LOFS File System
The following example illustrates how to create, mount, and test new software in the /new/dist directory as a loopback file system without actually having to install it.
# mkdir /tmp/newroot
# mount -F lofs /new/dist /tmp/newroot
# chroot /tmp/newroot newcommand
Example—Mounting an LOFS File System at Boot Time
You can set up the system to automatically mount an LOFS file system when it boots by adding an entry to the end of the /etc/vfstab file. The following example shows an entry in the /etc/vfstab file that mounts an LOFS file system for the root (/) file system on /tmp/newroot.
Solaris How to find free chunk on each vx disk
root$ sh a.sh
... Free chunk: rootmirr 25226.6 Meg
... Free chunk: rtdisk 5122.05 Meg
... Free chunk: rtdisk 0.250977 Meg
... Free chunk: rtdisk 0.255859 Meg
... Free chunk: rtdisk 2049.67 Meg
... Free chunk: rtdisk 550.151 Meg
root$ more a.sh
#! /bin/sh
vxdg -g rootdg free | nawk '
{
#if ($5/2/1024 > 100)
if ($5/2/1024 > 0)
print "... Free chunk: "$1" " $5/2/1024, "Meg"
}'
root@ebitb2b2 $
root$ sh a.sh
... Free chunk on rootmirr(c0t1d0s2) 25226.6 Meg
... Free chunk on rtdisk(c0t0d0s2) 5122.05 Meg
... Free chunk on rtdisk(c0t0d0s2) 0.250977 Meg
... Free chunk on rtdisk(c0t0d0s2) 0.255859 Meg
... Free chunk on rtdisk(c0t0d0s2) 2049.67 Meg
... Free chunk on rtdisk(c0t0d0s2) 550.151 Meg
root$ more a.sh
#! /bin/sh
vxdg -g rootdg free | nawk '
{
#if ($5/2/1024 > 100)
if ($5/2/1024 > 0)
print "... Free chunk on "$1"("$2")"" " $5/2/1024, "Meg"
}'
root$
... Free chunk: rootmirr 25226.6 Meg
... Free chunk: rtdisk 5122.05 Meg
... Free chunk: rtdisk 0.250977 Meg
... Free chunk: rtdisk 0.255859 Meg
... Free chunk: rtdisk 2049.67 Meg
... Free chunk: rtdisk 550.151 Meg
root$ more a.sh
#! /bin/sh
vxdg -g rootdg free | nawk '
{
#if ($5/2/1024 > 100)
if ($5/2/1024 > 0)
print "... Free chunk: "$1" " $5/2/1024, "Meg"
}'
root@ebitb2b2 $
root$ sh a.sh
... Free chunk on rootmirr(c0t1d0s2) 25226.6 Meg
... Free chunk on rtdisk(c0t0d0s2) 5122.05 Meg
... Free chunk on rtdisk(c0t0d0s2) 0.250977 Meg
... Free chunk on rtdisk(c0t0d0s2) 0.255859 Meg
... Free chunk on rtdisk(c0t0d0s2) 2049.67 Meg
... Free chunk on rtdisk(c0t0d0s2) 550.151 Meg
root$ more a.sh
#! /bin/sh
vxdg -g rootdg free | nawk '
{
#if ($5/2/1024 > 100)
if ($5/2/1024 > 0)
print "... Free chunk on "$1"("$2")"" " $5/2/1024, "Meg"
}'
root$
Solaris How to grow vxfs filesystem reside on disksuite without soft partition
This can also be done on vxvm vol. It does not matter it is just vxfs style to grow.
** be carefull with fadm command as it can shrink the filesystem
partition> p
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 1 - 3630 5.00GB (3630/0/0) 10487070
1 swap wu 3631 - 4356 1.00GB (726/0/0) 2097414
2 backup wm 0 - 24619 33.92GB (24620/0/0) 71127180
3 unassigned wm 10962 - 24028 18.00GB (13067/0/0) 37750563 <-----added size
4 unassigned wm 10891 - 10961 100.16MB (71/0/0) 205119
5 usr wm 4357 - 5808 2.00GB (1452/0/0) 4194828
6 usr wm 5809 - 10164 6.00GB (4356/0/0) 12584484 <----- actual size
7 usr wm 10165 - 10890 1.00GB (726/0/0) 2097414
partition>
# metattach d46 c0t0d0s3
# metattach d76 c0t1d0s3
# metastat d6
d6: Mirror
Submirror 0: d46
State: Okay
Submirror 1: d76
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 50335047 blocks
d46: Submirror of d6
State: Okay
Size: 50335047 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s6 0 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare <-------- added
c0t0d0s3 0 No Okay
d76: Submirror of d6
State: Okay
Size: 50335047 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s6 0 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare <-------- added
c0t1d0s3 0 No Okay
root@:/opt/VRTSvxfs/sbin # ./fsadm -b 23g /var/nas/.nfsvol **23g is final size
UX:vxfs fsadm: INFO: V-3-23585: /dev/md/rdsk/d6 is currently 12582912 sectors - size will be increased
root@:/opt/VRTSvxfs/sbin # df -k /var/nas/.nfsvol
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d6 24117248 5093342 17853137 23% /var/nas/.nfsvol
root@:/opt/VRTSvxfs/sbin # cd /var/nas/.nfsvol
root@:/var/nas/.nfsvol # ls
cyclone cyclone5 dstx home lost+found mercator tomcat var_cyclone
root@:/var/nas/.nfsvol #
** be carefull with fadm command as it can shrink the filesystem
partition> p
Current partition table (original):
Total disk cylinders available: 24620 + 2 (reserved cylinders)
Part Tag Flag Cylinders Size Blocks
0 root wm 1 - 3630 5.00GB (3630/0/0) 10487070
1 swap wu 3631 - 4356 1.00GB (726/0/0) 2097414
2 backup wm 0 - 24619 33.92GB (24620/0/0) 71127180
3 unassigned wm 10962 - 24028 18.00GB (13067/0/0) 37750563 <-----added size
4 unassigned wm 10891 - 10961 100.16MB (71/0/0) 205119
5 usr wm 4357 - 5808 2.00GB (1452/0/0) 4194828
6 usr wm 5809 - 10164 6.00GB (4356/0/0) 12584484 <----- actual size
7 usr wm 10165 - 10890 1.00GB (726/0/0) 2097414
partition>
# metattach d46 c0t0d0s3
# metattach d76 c0t1d0s3
# metastat d6
d6: Mirror
Submirror 0: d46
State: Okay
Submirror 1: d76
State: Okay
Pass: 1
Read option: roundrobin (default)
Write option: parallel (default)
Size: 50335047 blocks
d46: Submirror of d6
State: Okay
Size: 50335047 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t0d0s6 0 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare <-------- added
c0t0d0s3 0 No Okay
d76: Submirror of d6
State: Okay
Size: 50335047 blocks
Stripe 0:
Device Start Block Dbase State Hot Spare
c0t1d0s6 0 No Okay
Stripe 1:
Device Start Block Dbase State Hot Spare <-------- added
c0t1d0s3 0 No Okay
root@:/opt/VRTSvxfs/sbin # ./fsadm -b 23g /var/nas/.nfsvol **23g is final size
UX:vxfs fsadm: INFO: V-3-23585: /dev/md/rdsk/d6 is currently 12582912 sectors - size will be increased
root@:/opt/VRTSvxfs/sbin # df -k /var/nas/.nfsvol
Filesystem kbytes used avail capacity Mounted on
/dev/md/dsk/d6 24117248 5093342 17853137 23% /var/nas/.nfsvol
root@:/opt/VRTSvxfs/sbin # cd /var/nas/.nfsvol
root@:/var/nas/.nfsvol # ls
cyclone cyclone5 dstx home lost+found mercator tomcat var_cyclone
root@:/var/nas/.nfsvol #
Sendmail How to masquarate from user@host.domain.com to user@domain.com
root@:/etc/mail # diff sendmail.cf sendmail.cf.save
986,987c986
< #R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
< R$* < @ *LOCAL* > $* $: $1 < @ $M . > $2
---
> R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
root@:/etc/mail #
add the line shown below
--------------
###################################################################
### Ruleset 94 -- convert envelope names to masqueraded form ###
###################################################################
SMasqEnv=94
#R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2 <--------------- this line commented
R$* < @ *LOCAL* > $* $: $1 < @ $M . > $2 <--------------- this line added
----------
Testing masquerading
sendmail's address test mode makes it easy to test masquerading.
====================================================
# sendmail -bt
/tryflags HS (to test the header sender address; other tryflags values would be ES, HR, and ER, for envelope sender, header recipient, and envelope recipient, respectively)
/try esmtp email_address_to_test
Example:
sendmail -bt
> /tryflags ES
> /try esmtp user@host.domain.com
Trying envelope sender address user@host.domain.com for mailer esmtp
(many lines omitted)
final returns: user @ domain . com
Rcode = 0, addr = user@domain.com
986,987c986
< #R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
< R$* < @ *LOCAL* > $* $: $1 < @ $M . > $2
---
> R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2
root@:/etc/mail #
add the line shown below
--------------
###################################################################
### Ruleset 94 -- convert envelope names to masqueraded form ###
###################################################################
SMasqEnv=94
#R$* < @ *LOCAL* > $* $: $1 < @ $j . > $2 <--------------- this line commented
R$* < @ *LOCAL* > $* $: $1 < @ $M . > $2 <--------------- this line added
----------
Testing masquerading
sendmail's address test mode makes it easy to test masquerading.
====================================================
# sendmail -bt
/tryflags HS (to test the header sender address; other tryflags values would be ES, HR, and ER, for envelope sender, header recipient, and envelope recipient, respectively)
/try esmtp email_address_to_test
Example:
sendmail -bt
> /tryflags ES
> /try esmtp user@host.domain.com
Trying envelope sender address user@host.domain.com for mailer esmtp
(many lines omitted)
final returns: user @ domain . com
Rcode = 0, addr = user@domain.com
solaris: how to check real memory usage
#ps -e -o pid -o pmem -o pcpu -o args
10557 29.7 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
13631 0.0 0.0 /usr/openv/volmgr/bin/oprd -sockfd 6
25983 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
11374 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
19227 0.0 0.0 /usr/openv/volmgr/bin/oprd -sockfd 6
11244 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
pmem The ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.
another way to check:
memory
Report on usage of virtual and real memory.
swap amount of swap space currently available
(Kbytes)
free size of the free list (Kbytes)
page Report information about page faults and paging
activity. The information on each of the following
activities is given in units per second.
# vmstat 2 10
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 s3 in sy cs us sy id
0 5 0 70804464 8978120 588 1970 915 8 8 0 0 0 0 0 0 8548 39921 18926 5 4 91
0 0 0 70409832 11055384 299 1898 0 0 0 0 0 0 0 0 0 8008 30560 6888 3 1 96
0 0 0 70414672 11059536 155 951 0 0 0 0 0 0 0 0 0 5277 18103 5589 2 0 98
0 0 0 70416672 11061992 1 0 0 0 0 0 0 0 0 0 0 7124 6024 5999 2 0 98
0 0 0 70416672 11061984 0 0 0 0 0 0 0 0 0 0 0 4314 4849 4604 1 0 99
0 0 0 70416672 11061976 0 0 0 0 0 0 0 0 0 0 0 5616 4750 5152 1 1 97
0 1 0 70416184 11060760 282 1230 0 0 0 0 0 0 0 0 0 4507 19205 4318 2 0 98
0 0 0 70416592 11061712 155 742 0 0 0 0 0 0 0 0 0 4737 15962 5091 1 1 98
0 1 0 70416560 11061688 0 0 0 0 0 0 0 0 0 0 0 6394 6252 5918 2 1 97
0 1 0 70416624 11061688 560 2165 0 8 4 0 0 0 0 0 0 4814 25827 5041 2 1 97
# /usr/platform/sun4u/sbin/prtdiag | more
System Configuration: Sun Microsystems sun4u Sun Fire V890
System clock frequency: 150 MHz
Memory size: 65536 Megabytes
========================= CPUs ===============================================
Run E$ CPU CPU
Brd CPU MHz MB Impl. Mask
--- ----- ---- ---- ------- ----
A 0, 16 1500 32.0 US-IV+ 2.2
B 1, 17 1500 32.0 US-IV+ 2.2
A 2, 18 1500 32.0 US-IV+ 2.2
B 3, 19 1500 32.0 US-IV+ 2.2
C 4, 20 1500 32.0 US-IV+ 2.2
D 5, 21 1500 32.0 US-IV+ 2.2
C 6, 22 1500 32.0 US-IV+ 2.2
D 7, 23 1500 32.0 US-IV+ 2.2
========================= Memory Configuration ===============================
Logical Logical Logical
MC Bank Bank Bank DIMM Interleave Interleaved
------------ analysis-----------
free memory is about 11061688Kbytes =10Gbytes
total memory is 64Gbytes
10557 29.7 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
13631 0.0 0.0 /usr/openv/volmgr/bin/oprd -sockfd 6
25983 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
11374 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
19227 0.0 0.0 /usr/openv/volmgr/bin/oprd -sockfd 6
11244 29.6 0.0 oracleRP1 (DESCRIPTION=(LOCAL=NO)(SDU=32768))
pmem The ratio of the process's resident set size to the physical memory on the machine, expressed as a percentage.
another way to check:
memory
Report on usage of virtual and real memory.
swap amount of swap space currently available
(Kbytes)
free size of the free list (Kbytes)
page Report information about page faults and paging
activity. The information on each of the following
activities is given in units per second.
# vmstat 2 10
kthr memory page disk faults cpu
r b w swap free re mf pi po fr de sr s0 s1 s2 s3 in sy cs us sy id
0 5 0 70804464 8978120 588 1970 915 8 8 0 0 0 0 0 0 8548 39921 18926 5 4 91
0 0 0 70409832 11055384 299 1898 0 0 0 0 0 0 0 0 0 8008 30560 6888 3 1 96
0 0 0 70414672 11059536 155 951 0 0 0 0 0 0 0 0 0 5277 18103 5589 2 0 98
0 0 0 70416672 11061992 1 0 0 0 0 0 0 0 0 0 0 7124 6024 5999 2 0 98
0 0 0 70416672 11061984 0 0 0 0 0 0 0 0 0 0 0 4314 4849 4604 1 0 99
0 0 0 70416672 11061976 0 0 0 0 0 0 0 0 0 0 0 5616 4750 5152 1 1 97
0 1 0 70416184 11060760 282 1230 0 0 0 0 0 0 0 0 0 4507 19205 4318 2 0 98
0 0 0 70416592 11061712 155 742 0 0 0 0 0 0 0 0 0 4737 15962 5091 1 1 98
0 1 0 70416560 11061688 0 0 0 0 0 0 0 0 0 0 0 6394 6252 5918 2 1 97
0 1 0 70416624 11061688 560 2165 0 8 4 0 0 0 0 0 0 4814 25827 5041 2 1 97
# /usr/platform/sun4u/sbin/prtdiag | more
System Configuration: Sun Microsystems sun4u Sun Fire V890
System clock frequency: 150 MHz
Memory size: 65536 Megabytes
========================= CPUs ===============================================
Run E$ CPU CPU
Brd CPU MHz MB Impl. Mask
--- ----- ---- ---- ------- ----
A 0, 16 1500 32.0 US-IV+ 2.2
B 1, 17 1500 32.0 US-IV+ 2.2
A 2, 18 1500 32.0 US-IV+ 2.2
B 3, 19 1500 32.0 US-IV+ 2.2
C 4, 20 1500 32.0 US-IV+ 2.2
D 5, 21 1500 32.0 US-IV+ 2.2
C 6, 22 1500 32.0 US-IV+ 2.2
D 7, 23 1500 32.0 US-IV+ 2.2
========================= Memory Configuration ===============================
Logical Logical Logical
MC Bank Bank Bank DIMM Interleave Interleaved
------------ analysis-----------
free memory is about 11061688Kbytes =10Gbytes
total memory is 64Gbytes
sudo:I don't know you,i'm telling!
If you receive this kind of error message
solution - just upgrade sudo/copy from other machine that have same sudo and os version
solution - just upgrade sudo/copy from other machine that have same sudo and os version
Friday, February 15, 2008
AIX How to flash device for replacement
lsslot Displays all hot swap slots
lsslot -c pci Lists all pci hot swap slots
lsslot -c pci -a Lists all available pci hot swap slots
drslot Reconfgiures PCI hot-plug slots
drslot -i -c pci -s U0.1-P1-I3 Display a slot, flashes the LED next to the slot so that it can be identified.
Example to find disk slot
# lscfg -vl hdisk22
hdisk22 U9119.590.0254E7D-V30-C70-T1-L820000000000 Virtual SCSI Disk Drive
#
---------------------------------------------
To identify a particular PCI slot before replacing the scsi card in it, enter the following:
#drslot -R -c pci -s U0.2-P1-I3
The system displays messages similar to the following:
The visual indicator of the specified PCI slot has been set to the identify state. Press Enter to continue or enter x to exit.
The LED for the PCI slot blinks to identify the slot. Pressing any key but the Enter key exits the command. Pressing Enter continues with this slot. If continuing, the LED for the PCI slot is changed to the action state and the system displays a message similar to the following:
The visual indicator for the specified PCI slot has been set to the action state. Replace the PCI card in the identified slot, reconnect any devices to be configured, and press Enter to continue. Enter x to exit. Exiting now leaves the PCI slot in the removed state.
lsslot -c pci Lists all pci hot swap slots
lsslot -c pci -a Lists all available pci hot swap slots
drslot Reconfgiures PCI hot-plug slots
drslot -i -c pci -s U0.1-P1-I3 Display a slot, flashes the LED next to the slot so that it can be identified.
Example to find disk slot
# lscfg -vl hdisk22
hdisk22 U9119.590.0254E7D-V30-C70-T1-L820000000000 Virtual SCSI Disk Drive
#
---------------------------------------------
To identify a particular PCI slot before replacing the scsi card in it, enter the following:
#drslot -R -c pci -s U0.2-P1-I3
The system displays messages similar to the following:
The visual indicator of the specified PCI slot has been set to the identify state. Press Enter to continue or enter x to exit.
The LED for the PCI slot blinks to identify the slot. Pressing any key but the Enter key exits the command. Pressing Enter continues with this slot. If continuing, the LED for the PCI slot is changed to the action state and the system displays a message similar to the following:
The visual indicator for the specified PCI slot has been set to the action state. Replace the PCI card in the identified slot, reconnect any devices to be configured, and press Enter to continue. Enter x to exit. Exiting now leaves the PCI slot in the removed state.
Subscribe to:
Posts (Atom)
UNIX: How to print column nicely using printf
[user@hostfwnms1-oam tmp]# cat b.sh printf "%-26s %-19s %-8s %-8s %-s %-s\n" HOSTNAME IP PING SNMPWALK 0-ok 1-fail for i in `cat n...
-
This does increase the amount of CPU and I/O that both your sending and receiving side use, but I’ve been able to run ~25 parallel instance...
-
syntax: rmvterm –m {msys} –p {lpar} # rmvterm -m Server-9117-570-SN103FACD_B -p WBITVIO2
-
Cluster operations Start VCS hastart [-force-stale] hasys -force system Stop VCS hastop -local [-force-evacuate] hastop -sys system [-force-...