Archive for category linux

VCS: fix dg disabled. cannot open ” ” for quotactl

root@myhost1# vxdisk list
DEVICE TYPE DISK GROUP STATUS
sdbu auto:cdsdisk emc1XXX DB_PRD online dgdisabled
sdbv auto:cdsdisk emc1XXX DBarc_PRD online dgdisabled

root@myhost1# vxdg deport DB_PRD
VxVM vxdg ERROR V-5-1-584 Disk group DB_PRD: Some volumes in the disk group are in use
Read the rest of this entry »

No Comments

ldap and sudo issue on Linux box

issue with sudo, we can login with ldap account but can’t sudo -i. When turned on sudoer debug, got following error.
sudo: user_matches=1
sudo: host_matches=0
sudo: sudo_ldap_lookup(0)=0×40
[sudo] password for edy:

Actually the same configuration works on other hosts.
On broken-host, debug info,
sudo: found:cn=UNIX-Team-root,ou=SUDOers,dc=abc,dc=com
sudo: ldap sudoUser netgroup ‘+unixadms’ … not
Read the rest of this entry »

2 Comments

Important Server Maintenance/Update Notes from RH

First, the most important thing is to perform system update in a maintenance window, because if you have any critical service, the service must be stopped before the upgrade begins.

The maintenance window is also necessary because the server needs a reboot to the new kernel goes into production.

If the server has some third-party module into the kernel, the inclusion of these modules should also be made for the new kernel, otherwise the new kernel will not contain all the modules required and this can cause problems at boot process and devices’ recognition, such as storage, drive controllers, and others…
Read the rest of this entry »

No Comments

Install CentOS 6.0(64bit) with one CD

CentOS 6.0 Finally released. seems the CD/DVD has been updated. you should choose one net install CD or 4.4G DVD. could we have minimal install with one CD ? YES.

Here is the CD, you can minimal install the CentOS 6.0. so it good for guys who want to download one CD and install CentOS, of course you can install once you have installed basic system.

Download link:Download from linuxdict
Arch: 64bit
CD Size: 313M
Md5sum: 3f75769d89c8d5f897435f714abe4d11

Install details, please check http://www.linuxdict.com/2011-07-centos-6-0-in-one-cd/

No Comments

CentOS 6.0 In One CD (261M)

CentOS 6.0 Finally released. seems the CD/DVD has been updated. you should choose one net install CD or 4.4G DVD. could we have minimal install with one CD ? YES.

Here is the CD, you can minimal install the CentOS 6.0. so it good for guys who want to download one CD and install CentOS, of course you can install once you have installed basic system.

Download link:Download from china network Download from linuxdict
Arch: 32bit
CD Size: 261M
Md5sum: 0f668976b05374d2ecd09801b096f2e4

Guide for new guys use CentOS 6.
Read the rest of this entry »

No Comments

short scripts: convert squid timestamp

cat > /var/convert.pl
#!/usr/bin/perl -p
s/^\d+\.\d+/localtime $&/e;

Ctrl+D
. /var/convert.pl /var/squid/log/access.log |more

No Comments

readonly issue on disk

We have one server became readonly after update DMX.

Error logs:
Buffer I/O error on device dm-1, logical block 1545
lost page write due to I/O error on dm-1
ext3_abort called.
EXT3-fs error (device dm-1): ext3_journal_start_sb: Detected aborted journal
Remounting filesystem read-only
qla2xxx 0000:0d:00.0: scsi(0:0:0): Abort command issued — 1 11299f0 2002.
qla2xxx 0000:0d:00.1: scsi(1:0:0): Abort command issued — 1 113a04c 2002.
……
qla2xxx 0000:0d:00.0: Unable to read SFP data (102/a0/0).
process `sysctl’ is using deprecated sysctl (syscall) net.ipv6.neigh.eth3.base_reachable_time; Use net.ipv6.neigh.eth3.base_reachable_time_ms instead.
ext3_abort called.
EXT3-fs error (device dm-1): ext3_remount: Abort forced by user
ext3_abort called.

mount -o remount,rw /apps
mount: block device /dev/mapper/xxxx is write-protected, mounting read-only

Solution: reboot the server, all fixed :(

No Comments

Top and useful ssh tips

1. copy ssh key to remote host
ssh-copy-id user@remote_host

2 map the tunnel the remote host 80 port to local host port 2001
ssh -N -L2001:localhost:80 remote_host
# now we can use localhost:2001 to reach remote_host 80

3. compare the local file and remote file
ssh user@host cat /path/to/remotefile | diff /path/to/localfile –

4. jump point to unreachable_host
ssh -t reachable_host ssh unreachable_host
Read the rest of this entry »

No Comments

Enable USB Camera in Virtualbox

Due to some IM need camera in my virtualbox. get the result from ubuntu
if [ "`grep vboxusers /etc/group|grep $USER`" == "" ] ; then sudo usermod -G vboxusers -a $USER ; fi
restart the virtualbox. and follow the following instructions
DO NOT add the line to /etc/fstab, or you may meet some issue :)
none /proc/bus/usb usbfs devgid=groupid,devmode=664 0 0
Details

https://help.ubuntu.com/community/VirtualBox/USB

Also: furiusisomount can mount .bin file that can be mount as cd-rom in Windows.

,

No Comments

some tips

1. disable SSH host key checking, means skip the (yes/no) question when ssh
ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no
Details
2. generate random password for account
dd if=/dev/random bs=1024 count=1 2> /dev/null |base64
3. autologin
expect-lite is very useful.
4. dos2unix missing (Ubuntu 10.04)
$sudo aptitude install tofrodos
$sudo ln -s fromdos dos2unix
$sudo ln -s todos unix2dos

No Comments