存档

2006年11月 的存档

Week summary

2006年11月19日 没有评论

Spin out/in SATA module from kernel when physically remove the drivers, especial Hot-Swap case. I did a whole testing on SNAZ-S4-400 platform(RAID0, 1,5), plug the disk out when there’s (or not) I/O, when the “miss” hard disk inserted back, the RAID were all recoveried. Bruce said, Irish had produced many disk failure issues when hotswap. I would follow up this testing and plan to use larger I/O pression.

“smbpasswd” add user to LDAP
1.In the “/etc/samba/smb.conf”, modify the second line as the following:
Passdb backend=ldapsam: ldap://192.168.123.33:389
This means the new users will be added here.
2.In localhost, # adduser phillip
# smbpasswd -a phillip
3. Then issue “ldapsearch -x”, the new user “phillip” is in the returned entries.

IE 7.0 running as IE6.0:
Microsoft supplied UASU tool for opening an IE7.0 instruce that emluates IE6 by sending the IE6 use agent string. I downloaded UASU.msc and installed, it works well on IE7.0 platform.

Perl, for about two months, I restarted to learn it now, and I must pay more attention on enhancing my program ability, such as read, write and debug. Bruce gave me a good advice, learn this program when using it, read the manul when needed. I think it is right and will be on this learning road. My schedule is spending one week, to master this program as almost our general programs are all written in Perl.

Before do anything, think about it careful, try to make it more clearly. Then, just do it.

分类: 科技 标签:

RAID commands

2006年11月13日 没有评论

Check the RAID setting by running the following command:
# cat /proc/mdstat
Personalites: [md5]
md0: active raid5 sdd1[2] sde1[3] sdc1[1] sdb1[0]
75469842 blocks level 5, 128k chunk, algorithm[3/3] [UUU]
Here, the first “3” in “[3/3]” indicates the how many devices in the array; the second “3” means active device numbers. If one device in array has been destoried, the second number would decrease “1”, for example, one disk failed, the second number is “2” as the result of “3-1”.
“UUU” marks the currently using device status. Assume /dev/sdb1 failed, it should be [_UU], at this point, the array runs in degrade mode without redundant.
“sdd1[2]”, assume “n” is the number of devices in array: if the number in “[]” is less than “n”, it means the device is active,else if the device is for backup. When one device down, the coresponding “[]” will be marked as “[F]”.

Mark the /dev/sdb1 as failed:
# mdadm /dev/md0 -f /dev/sdb1
Note, in this case, “/dev/sdb1” was component of “/dev/md0”.

Remove failed device:
# mdadm /dev/md0 -r /dev/sdb1

Add device to array:
# mdadm /dev/md0 -a /dev/sdb1

Start all arrays in “mdadm.conf”
# mdadm -As

Start idenfied array:
# mdadm -As /dev/md0

Stop array:
# mdadm -S /dev/md0

List detail information:
# mdadm -D /dev/md0

分类: 科技 标签:

RHCE study notes

2006年11月12日 没有评论

Chkconfig: maintain /etc/rc.d directory structure, add, remove change serivce, list time stamp information. Check the state of particular service.
# chkconfig –list sendmail
# chkconfig –level 4 sendmail off

The “ntsysv” command takes the functionality of chkconfig and wraps it into an easy-to-use screen interface.

kdbconfig: set the type of keyboard, refer to “/etc/sysconfig/keyboard”
timeconfig: set time zone, refer to “/etc/sysconfig/clock”
mouseconfi: set mouse, refer to “/etc/sysconfig/mouse”
sndconfig: screen-oriented interface to make install sound card.

NT boot, NT’s loader installs to the master boot record(MBR) and relies on three major files: ntdetect.com, ntldr, boot.ini.

Once you have a working LILO boot disk, you can simply copy the boot sector from the disk instead of the harddriver,eg:
# dd if=/dev/fd0 of=/bootsect1n1 bs=512 count=1
I think the first 512 byte in /dev/fd0 may record the boot information.

RAID: Only three are implemented in Linux, linear,0,1,5
You can assign additional disks from failover, called spare disks within the RAID set, when one disk fails it is marked as bad and the data is reconstructed on the first space disk, which is used as replacement, resulting in litter or no downtime. When using fdisk to format RAID component disks, the Partition ID must be set as “FD”.
# mk2fs -b 4096 -R stride=8 /dev/md0

To check what interrupts you are using:
# cat /proc/interrrupts
i386 PC have up to 15 usable interrupts out of 16: 0-15

To get a list of IO address and DMA channels used:
# cat /proc/ioports

To check DMA resources:
# cat /proc/dma

To load modules into kernel:
# modprobe sb irq=5 io=0x220 dma=0
comment, here “sb” means sound device.

Laptops have a special peripheral interface bus called PCMCIA, that requires a special set of drivers and service to handle it. Whenever a card is loaded, you can check the “/var/run/stab”. To see waht setting your card is set to, you can issue the “cardctl” command.

Advanced Power Management(APM)
When the BIOS tells the daemon about a pending suspend or a standbycall, it immediately calls sync(and writes all cached file system information to disk immediatelly). It will then sleep for two seconds and tell BIOS to continute.

# runlevel
5 3
means, you were in level 5 last and are now in level 3.

LCD: Liquid Crystal Display

To have the kernel dynamically load and unload modules as needed, a special kernel thread, “kmod” is called upon to control the loading and unloading of modules. Refer to “/etc/modules.conf”.

To load modules on command line:
# depmod -a
# modproble eth0
Place modules in “modules.conf” to have them automatic loaded.

Two limits manage disk consumption:
1. Limit the number fo inodes a user may have;
2. Limit the number of disk blocks a user’s file may consume

Quota are enabled on a file system basis only, they CAN NOT be set on directories.

分类: 科技 标签:

NetVault

2006年11月7日 没有评论

NetVault is used to backup data. The SNAZ system has been updated from NetVault 7.4 to latest NetVault 7.4.3. thus supports backup and restore ACL and Extended Attributes.I am verifing this new function these days.

First, in SNAZ operating system, start up backup service. Create a large volume as virtual harddisk for backup and restore. and then create other shares and files with assigning ACL and EAs. Second step, install NetVault GUI management software in Windows platform(or Linux), configure the SNAZ as NetVault server: Addministrator-Domain, select SNAZ; Device-Management-Server-Selection, select SNAZ, Add-Add Standalone Driver, and create virtual disk(right click) on precious large volume(Driver location-/exports/large_volume). Now, could run Backup and Restore.

Extended file attributes:
Permission, records of creation and modification times, author of a document, character encoding of a plain-text document, or a checksum. There are four name spaces: user,trusted,security and system.

Attr:(Add, remove and print)
set or add extended attribute to file/folder:
# attr -s attrname -V attr_value pathname(file/folder name)
print/show extended attribute of file/folder:
# attr -g attrname pathname(file/folder name)
remove identified attribute:
# attr -r attrname pathname(file/folder name)

getfattr -d: print file/folder’s EA entries.

According to NetVault supporting max 64KB EAs, how to create a pure 64K test file?
#!/bin/bash
# create 64KB EA file
for ((i=0;i<=524288;i++)) do printf "i"; done This script will create a 64KB test file, with 524288 "i" characters. But when I tried to used this output file in the following commands: # attr -s Club -V `cat 64KB_file_name` /exports/barcelona There will be an error messages: argument list too long. I had to assign EA one by one: # !/bin/bash # assign EA one by one for ((i=0;i<=524388;i++)) do attr -s Team_$i -V i /exports/barcelona done It would be added successful, but issue "getfattr -d /export/barcelona" still meet "Argument list too long" errors. I'll fixed this issue tomorrow.

分类: 科技 标签:

Preparing for RHCE

2006年11月6日 没有评论

Keep on reading Study Guide.

分类: 科技 标签: