I created a directory called, file. Then, i touched 3 dummy files, file1, file2, file3.
[root@rhel54-1 file]# ls
file1 file2 file3
when i zip those file. I choose two different ways, one with gzip compression and one without
[root@rhel54-1 ~]# tar -cvf file.tar.gz file/
file/
file/file2
file/file3
file/file1
[root@rhel54-1 ~]# tar -zcvf file.tgz file
file/
file/file2
file/file3
file/file1
[root@rhel54-1 ~]# tar -jcvf file.tar file
file/
file/file2
file/file3
file/file1
I have three tarball files right now. Then, I do a file command on my tarballs file
[root@rhel54-1 ~]# file file.tar.gz
file.tar.gz: POSIX tar archive
[root@rhel54-1 ~]# file file.tgz
file.tgz: gzip compressed data, from Unix, last modified: Thu Sep 10 10:27:48 2009
[root@rhel54-1 ~]# file file.tar
file.tar: bzip2 compressed data, block size = 900k
Cool. I have three different formats. POSIX tar archive, and gzip and bzip2 file.
So, when i extract the tarballs. i will prompt in the command.
1. tar -zvxf for gzip tarball
2. tar -xvf for POSIX tar archive
3. tar -jvxf for bzip2 tarball
Obviously, the size of those tarballs also varying.
[root@rhel54-1 ~]# ls -sh file.*
4.0K file.tar 12K file.tar.gz 4.0K file.tgz
gzip and bzip2 is much more better than POSIX tarball.
Wednesday, September 9, 2009
Tuesday, June 9, 2009
RPM packaging
NUM_RPM_INSTANCE == 1 is a normal installation
NUM_RPM_INSTANCE == 2 is a normal upgrading
NUM_RPM_INSTANCE == 0 is a normal uninstallation
Here are the actual values passed during an install:
Run %pre of new package (1)
Install new files
Run %post of new package (1)
Here are the values passed during an upgrade:
Run %pre of new package (2)
Install new files
Run %post of new package (2)
Run %preun of old package (1)
Delete any old files not overwritten by newer ones
Run %postun of old package (1)
Here are the values passed during a delete:
Run %preun of old package (0)
Delete files
Run %postun of old package (0)
NUM_RPM_INSTANCE == 2 is a normal upgrading
NUM_RPM_INSTANCE == 0 is a normal uninstallation
Here are the actual values passed during an install:
Run %pre of new package (1)
Install new files
Run %post of new package (1)
Here are the values passed during an upgrade:
Run %pre of new package (2)
Install new files
Run %post of new package (2)
Run %preun of old package (1)
Delete any old files not overwritten by newer ones
Run %postun of old package (1)
Here are the values passed during a delete:
Run %preun of old package (0)
Delete files
Run %postun of old package (0)
Monday, June 1, 2009
Monday, May 11, 2009
Highlighting matching on regexp
hi all,
If you wish to declare a environment variable to have regular expression operates with grep where the standard output showing the colors, in fact, you can!
export GREP_OPTIONS='--color=auto'
Have fun.
yen_onn_hiu@nasilemak:~/regexp> grep .a.. text1
sales1.xls
sales2.xls
sales3.xls
apac1.xls
na1.xls
na2.xls
sa1.xls
If you wish to declare a environment variable to have regular expression operates with grep where the standard output showing the colors, in fact, you can!
export GREP_OPTIONS='--color=auto'
Have fun.
yen_onn_hiu@nasilemak:~/regexp> grep .a.. text1
sales1.xls
sales2.xls
sales3.xls
apac1.xls
na1.xls
na2.xls
sa1.xls
Thursday, May 7, 2009
VAS troubleshooting skills
Yesterday, I have been spending times to debug the vastool. That's give me error when prompting the id of the account.
End up, I did a "vas merge" to get all the vas cache load into the /etc/passwd and /etc/group. That's pain. But, It works temporarily.
Here are the bunch of vas command for troubleshooting.
1. To check on the user access
vastool user checkaccess[account_name]
2. To get the vastool status result
ftp://ftp.vintela.com/vas/support/vas_status.sh.gz
To get the vastool snapshot
/opt/quest/libexec/vas/scripts/vas_snapshot.sh
3. To flush the cache
vastool flush
4. To check is vas
vastool isvas user [account name]
5. Test AD connection and user password
vastool kinit [account_name]
6. Test VAS service access control (assuming your using sshd)
vastool user checkaccess -s sshd [acount_name]
7. Check authentication logs
1) Add the words "debug" and "trace" to the end of all pam_vas lines in /etc/pam.d/system-auth
2) Add "*.debug /var/log/debug" to /etc/syslog.conf
3) Restart syslog daemon
4) Attempt login
5) Look at output in /var/log/debug for indication/reason of failure
8. You can also turn on vasd debug if desired
1) vastool configure vas vasd debug-level 3
End up, I did a "vas merge" to get all the vas cache load into the /etc/passwd and /etc/group. That's pain. But, It works temporarily.
Here are the bunch of vas command for troubleshooting.
1. To check on the user access
vastool user checkaccess
2. To get the vastool status result
ftp://ftp.vintela.com/vas/support/vas_status.sh.gz
To get the vastool snapshot
/opt/quest/libexec/vas/scripts/vas_snapshot.sh
3. To flush the cache
vastool flush
4. To check is vas
vastool isvas user [account name]
5. Test AD connection and user password
vastool kinit [account_name]
6. Test VAS service access control (assuming your using sshd)
vastool user checkaccess -s sshd [acount_name]
7. Check authentication logs
1) Add the words "debug" and "trace" to the end of all pam_vas lines in /etc/pam.d/system-auth
2) Add "*.debug /var/log/debug" to /etc/syslog.conf
3) Restart syslog daemon
4) Attempt login
5) Look at output in /var/log/debug for indication/reason of failure
8. You can also turn on vasd debug if desired
1) vastool configure vas vasd debug-level 3
Tuesday, March 3, 2009
vmware way of discovering lun
In order to list a vmware lun, please do this.
[root@testdev01 volumes]# esxcfg-mpath -l
Disk vmhba1:0:16 /dev/sdr (204800MB) has 4 paths and policy of Most Recently Used FC 10:0.0 10000000c9610905<->5006016941e02f2b vmhba1:0:16 Standby FC 10:0.0 10000000c9610905<->5006016141e02f2b vmhba1:1:16 On active FC 14:0.0 10000000c96106fc<->5006016041e02f2b vmhba2:0:16 On FC 14:0.0 10000000c96106fc<->5006016841e02f2b vmhba2:1:16 Standby preferred
Disk vmhba1:0:17 /dev/sds (204800MB) has 4 paths and policy of Most Recently Used FC 10:0.0 10000000c9610905<->5006016941e02f2b vmhba1:0:17 Standby FC 10:0.0 10000000c9610905<->5006016141e02f2b vmhba1:1:17 On active FC 14:0.0 10000000c96106fc<->5006016041e02f2b vmhba2:0:17 On FC 14:0.0 10000000c96106fc<->5006016841e02f2b vmhba2:1:17 Standby preferred
Disk vmhba1:0:18 /dev/sdt (204800MB) has 4 paths and policy of Most Recently Used FC 10:0.0 10000000c9610905<->5006016941e02f2b vmhba1:0:18 Standby FC 10:0.0 10000000c9610905<->5006016141e02f2b vmhba1:1:18 On active FC 14:0.0 10000000c96106fc<->5006016041e02f2b vmhba2:0:18 On FC 14:0.0 10000000c96106fc<->5006016841e02f2b vmhba2:1:18 Standby preferred
[root@testdev01 volumes]# esxcfg-mpath -l
Disk vmhba1:0:16 /dev/sdr (204800MB) has 4 paths and policy of Most Recently Used FC 10:0.0 10000000c9610905<->5006016941e02f2b vmhba1:0:16 Standby FC 10:0.0 10000000c9610905<->5006016141e02f2b vmhba1:1:16 On active FC 14:0.0 10000000c96106fc<->5006016041e02f2b vmhba2:0:16 On FC 14:0.0 10000000c96106fc<->5006016841e02f2b vmhba2:1:16 Standby preferred
Disk vmhba1:0:17 /dev/sds (204800MB) has 4 paths and policy of Most Recently Used FC 10:0.0 10000000c9610905<->5006016941e02f2b vmhba1:0:17 Standby FC 10:0.0 10000000c9610905<->5006016141e02f2b vmhba1:1:17 On active FC 14:0.0 10000000c96106fc<->5006016041e02f2b vmhba2:0:17 On FC 14:0.0 10000000c96106fc<->5006016841e02f2b vmhba2:1:17 Standby preferred
Disk vmhba1:0:18 /dev/sdt (204800MB) has 4 paths and policy of Most Recently Used FC 10:0.0 10000000c9610905<->5006016941e02f2b vmhba1:0:18 Standby FC 10:0.0 10000000c9610905<->5006016141e02f2b vmhba1:1:18 On active FC 14:0.0 10000000c96106fc<->5006016041e02f2b vmhba2:0:18 On FC 14:0.0 10000000c96106fc<->5006016841e02f2b vmhba2:1:18 Standby preferred
Tuesday, February 10, 2009
Discovering HBA information from RHEL3 and SLES10
If you wish to retrieve information on HBAs on RHEL3 or SLES10 SP1. Basically, here is the path that you are looking for.
RHEL3: /proc/scsi/lpfc/
SLES10 SP1: /sys/class/fc_host/
As for the SLES10 SP2 : /sys/class/scsi_host/
There are bunch of information like HBA model, firmware, speed, port_state and WWN.
RHEL3: /proc/scsi/lpfc/
SLES10 SP1: /sys/class/fc_host/
As for the SLES10 SP2 : /sys/class/scsi_host/
There are bunch of information like HBA model, firmware, speed, port_state and WWN.
Discovering HBA from OEL5
hbanyware prepares a good place to query the hba information.
e.g.
[root@test03 audit]# /usr/sbin/hbanyware/hbacmd listhbas
Manageable HBA List
Port WWN : 10:00:00:00:c9:63:1d:79
Node WWN : 20:00:00:00:c9:63:1d:79
Fabric Name: 10:00:00:05:1e:04:6c:8b
Flags : 8000f0e5
Host Name : test03.hiu.com
Mfg : Emulex Corporation
Port WWN : 10:00:00:00:c9:63:1d:34
Node WWN : 20:00:00:00:c9:63:1d:34
Fabric Name: 10:00:00:05:1e:04:3f:9d
Flags : 8000f0e5
Host Name : test03.hiu.com
Mfg : Emulex Corporation
In order to get the HBA Model, you can get the information from hbanyware command as well.
[root@test03 audit]# /usr/sbin/hbanyware/hbacmd hbaAttributes 10:00:00:00:c9:63:1d:79
HBA Attributes for 10:00:00:00:c9:63:1d:79
Host Name : test03.hiu.com
Manufacturer : Emulex Corporation
Serial Number : BG72036851
Model : LPe1150-E
Model Desc : EMC LPe1150-E 4Gb PCIe Fibre Channel Adapter
Node WWN : 20 00 00 00 c9 63 1d 79
Node Symname : Emulex LPe1150-E FV2.72A2 DV8.2.0.22
HW Version : 2057706d
Opt ROM Version:
FW Version : 2.72A2 (W3F2.72A2), sli-3
Vendor Spec ID : 10DFNumber of Ports: 1
Driver Name : lpfc
Device ID : F0E5
HBA Type : LPe1150-E
Operational FW : SLI-3 Overlay
SLI1 FW : SLI-1 Overlay 2.72a2
SLI2 FW : SLI-2 Overlay 2.72a2
SLI3 FW : SLI-3 Overlay 2.72a2
IEEE Address : 00 00 c9 63 1d 79
Boot BIOS : 1.70a3
Driver Version : 8.2.0.22; HBAAPI(I) v2.1.g, 12-07-07
Kernel Version : 1.20a4
HBA Temperature: Not Available
e.g.
[root@test03 audit]# /usr/sbin/hbanyware/hbacmd listhbas
Manageable HBA List
Port WWN : 10:00:00:00:c9:63:1d:79
Node WWN : 20:00:00:00:c9:63:1d:79
Fabric Name: 10:00:00:05:1e:04:6c:8b
Flags : 8000f0e5
Host Name : test03.hiu.com
Mfg : Emulex Corporation
Port WWN : 10:00:00:00:c9:63:1d:34
Node WWN : 20:00:00:00:c9:63:1d:34
Fabric Name: 10:00:00:05:1e:04:3f:9d
Flags : 8000f0e5
Host Name : test03.hiu.com
Mfg : Emulex Corporation
In order to get the HBA Model, you can get the information from hbanyware command as well.
[root@test03 audit]# /usr/sbin/hbanyware/hbacmd hbaAttributes 10:00:00:00:c9:63:1d:79
HBA Attributes for 10:00:00:00:c9:63:1d:79
Host Name : test03.hiu.com
Manufacturer : Emulex Corporation
Serial Number : BG72036851
Model : LPe1150-E
Model Desc : EMC LPe1150-E 4Gb PCIe Fibre Channel Adapter
Node WWN : 20 00 00 00 c9 63 1d 79
Node Symname : Emulex LPe1150-E FV2.72A2 DV8.2.0.22
HW Version : 2057706d
Opt ROM Version:
FW Version : 2.72A2 (W3F2.72A2), sli-3
Vendor Spec ID : 10DFNumber of Ports: 1
Driver Name : lpfc
Device ID : F0E5
HBA Type : LPe1150-E
Operational FW : SLI-3 Overlay
SLI1 FW : SLI-1 Overlay 2.72a2
SLI2 FW : SLI-2 Overlay 2.72a2
SLI3 FW : SLI-3 Overlay 2.72a2
IEEE Address : 00 00 c9 63 1d 79
Boot BIOS : 1.70a3
Driver Version : 8.2.0.22; HBAAPI(I) v2.1.g, 12-07-07
Kernel Version : 1.20a4
HBA Temperature: Not Available
Sunday, February 8, 2009
Configure opensuse11 + rewrite_module
if you are using opensuse 11 with cakephp development, most likely you will need to have the rewrite_module enabled on apache2.
All apache2 modules are kept at /usr/lib/apache2. Please use this command to enable your rewrite_module. Enjoy!
a2enmod rewrite
/etc/init.d/apache2 force-reload
All apache2 modules are kept at /usr/lib/apache2. Please use this command to enable your rewrite_module. Enjoy!
a2enmod rewrite
/etc/init.d/apache2 force-reload
Subscribe to:
Posts (Atom)