DLM

2007年10月29日 22点17分 没有评论

Linux kernel currently lacks a generic cluster framework. Different clustering solutions like GFS and OCFS2 use their own internode communication framework. GFS uses SCTP and OCFS2 uses TCP as their transport protocol.

DLM: A distributed lock manager(DLM) is a common component of many clustering filesystem and databases. DLMs provide cluster-wide locking services which are fault-tolerant and scalable.

In a typical DLM, mastery(owenership) of locks is distributed to different nodes in the cluster, so that the locking resource burden is distributed across all the nodes in the cluster. One node is assigned the job of keeping track of which nodes master which locks, so that if a node does not know where a lock is being mastered, it can find that out. To minimize this extra overhead, each node keeps a cache of lock location information it has obtained from the lock location service. One of the key issue in DLM implementation is recovery, when a node dies, all locks it was holding are released and the state of all locks it was mastering have to be recovered.

As a result, each node in the cluster has to keep track of all the locks it is holding so that it can provide this information to the new lock master when recovering the state of locks mastered by the nodes which left the cluster. Some DLM implementation will migrate lock mastery to a new node if that new node is performing the majority of the lock operations on a particular lock.

分类: 科技 标签:

dlm_sendd & SCTP/TCP

2007年10月29日 21点15分 没有评论

Kernel: fs/dlm/lowcomms-top.c
The patch adds a TCP based communications layer to the DLM which is compile time selectable. The existing SCTP layer gives the advantage of allowing multihoming, whereas the TCP layer has been heavily tested in precious versions of the DLM and is known to be robust and therefore can be used as a baseline for performancing testing. Internode communication using SCTP. This level is not aware of locks or resources or other dlm objects, only data buffers. These functions also batch(and extract) lots of small messages bound for one node into larger chunks.

Why current node use SCTP?
This is the low-level comms layer. It’s responsible for sending/receiving message from other nodes in the cluster.Cluster nodes are referred to by their nodeids, nodeids are simply 32bit numbers to the locking module. If they need to be expanded for the cluster infrastructure then that is its responsibility.It is this layers responsiblity to resolve there into IP addresses or whatever it needs for internode communications.

The comms level is two kernel threads that deal mainly with the receiving of messages from other nodes and passing them up to the mid-level comms layer(which understand the message format) for execution by locking core, and a send thread which does all the setting up of connections to remote nodes and the sending of data. Threads are not allowed to send their own data because it may cause them to wait in times of high load. Alao, this way, the sending thread can collect together message bound for one node and send them in one block.

From David Tergland: I don’t see any problem with the recv thread executing the locking code on behalf of remote processes as the locking code is short, efficient and nevel(well, hardly ever) waits.

In my way of thinking, you’re well on the way.

TCP Limitation:
TCP(rfc793) has performed immense service as the primary means of reliable data transfer in IP networks.However, an increasing number of recent applications have found TCP too limiting. The limitation which means have wished to bypass including the following:

1.TCP provides both reliable data transfer and strict order-of-transmission delivery of data. Some applications need reliable transfer without sequence maintenance, while other would be satisfied with partial ordering of the data. In both of these cases the head-of-line blocking offerred by TCP causes unnecessary delay.
2.The stream oriented nature of TCP is often an inconvenience. Applications must add their own record marking to delineate their messages, and must make explict use of the push facility to ensure that a complete message is transferred in a reasonable time.
3.The limitation scope of TCP sockets complicates the task of providing highly-available data transer capability using multi-homed hosts.
4.TCP is relatively vulenerable to denial of service attacks such as SYN attacks.(Dos).

With message framing(SCTP and UDP), the boundaries in which messages are communicated through a socket are preserved, this means that if a client sends 100 bytes to a server following by 50 bytes, the server will read 100 bytes and 50 bytes, respectively, for two reads.UDP also operaters in this way, which makes it advantage for message-oriented protocols.

In contrast, TCP operates in a byte-streams fashion, without framing, a peer may receive more or less than was sent(splitting up a write or aggregating multiple writes into a single read). This behavior requires that message-oriented protocols operating over TCP provide data-buffer and message framing within their application layer.

Message in SCTP are transferred reliably but not necessary in the desire order. TCP guarantees that data is delivered in order(which is good thing, considering TCP is a stream protocol). UDP guarantees no ordering. But you can also configure streams within SCTP to accept un-ordered message if desired.

Detail for SCTP: http://www.ibm.com/developerworks/linux/library/l-sctp

分类: 科技 标签:

Streaming-media Storage

2007年10月28日 21点00分 没有评论

Advanced encryption standard(AES) encryption and decryption engineer for secured data storage.
GPIO: general purpose input/output

Interface GbE media access control(MAC)
USB Transceiver microcell interface + (UTMI +)

Concurrent users. This is possible due to the inclusion of a protocols accelerator and a session-aware traffic manager that determines the bandwidth/prority to associate with each session types. The upper-layer processor protocol accelerator provides processing of TCP/IP and UDP/IP protocols, which offloads the embedded application processor that is used for control and navigation functions. The TMA allocates system network, memory, and storage resources among both control and streaming-media sessions.

The result is hig-performancing DMC Soc that can accommodate many concurrent media sessions including several high-definitin video streams.

Besides serving mesia, the NAS40x enables the DMS application to protect media form data-loss because of a single HDD failure. Because of time and econmic considevations associated with acquired, tailoring, and formating media for enjoyable playback, the avoidance of data loss is an important concern among users, The NAS40x supports enhanced streaming RAID to ensure the media is protected from the time it is imported onto an NAS40x based media archive and continutes to be protected even during the failure f HDD from with the associated array. The user need not take any additional steps to protect media such as mirroring or backing up to other resources. Simillarly, no additional steps are needed to recovered media form data loss other then replacing the affected HDD at convenient time .The user never loses access to streaming media because of a single HDD failure with enhanced streaming RAID.

The software are NAS40X allows the users to parse files according to type(audio, video, still pictures), according to genre(action videos, co-medias), or according to title or author.

File Transfer using portable USB HDD: Media can be shared between networks using a portable USB HDD or Flash driver. Media can be read from the HDD or Flash drive and stored on the NAS40X controlled RAID5 HDDs and vice versa. Other media devices such as MP3 music players could be connected to the USB port to download music files from the RAID5 HDD array.

分类: 科技 标签:

Linux news and some useful words

2007年10月28日 20点38分 没有评论

TurboxLinux is latest to sign Microsoft Pact. TurboLinux, headquartered in Japan, sells Linux systems mostly in emerging markets such as China and India.

Linux hold to its ideals of freedom and openess.
A smear of memory means the there’s something dirty on the memory.
A shagged battery describes the cables are mess.

I VNC in it from around the planet to keep it on it toes.
I know why, and I know it’s an old complaint but it remains a real problem.
Know enough about what’s going on to correctly diagnose problems.

So here’s the funny thing, I’ve used Windows since 1.0. I’ve lived through the bad times of Windows 386 and ME, and the good times of NT3.5 and 2K. I know XP if not backwards, then with a degree of familarity that only middle-aged co-dependents can afford each other.

Then how come I’m so much more at home with Ubuntu(Gusty Gibbon) than Vista? It boils down to one abiding impression. Ubuntu goes out of its way to get out of your way, even if it doesn’t succeed all the time. Vista goes out its way to be Vista and enforce Vista way. You must conform regardless of the implications.

分类: 科技 标签:

BMC and Winbond chips

2007年10月28日 18点05分 没有评论

SS2280, implemented with Intel Woodcrest Dual-Core processor: enhance server visualization, faster networking. The dual core technology improves significiently the computing speed by running applications in parrellel, instead one stage each time and more to the next in line.

North bridge: Intel Blackford North Bridge. (BNB)
South bridge: ESB2E, Enterprise South Bridge 2.
PHY: Physical Layer Transceiver.
OOB: Out of Bond
VRD: Voltage Regular Down
SDR: Sensor Data Repository

The most advanced management controller, “Server Engine Pilot”, which combines baseboad management controller and graphics controller into one single chip. Such technology lowers down not only the cost, making you budget more economy, but also minimize the space of board. This chip features its enhanced performance on remote management through web service. The KVM, USB storage can also be included in the domain of remote control.

There’s something wrong with the BMC chip in last Monday, as we can not access its web service while ping is OK. Even restart the server, the BMC was not found. Later I fixed this issue by plugging out the power cable, wait for about 30 seconds, and then start up. The support engineer of SS2280 doubled it was a single failure, and suggested me to verify the following 4 servers coming in this week.

BMC monitors the fan speed according to the temperature the sensors have detected and make an appropriate adjustment and management. BMC is also responsible for monitoring of power unit through the way of checking events via SMBus. There’s anther chipset called Winbond 83627HG-AW embedded in baseboard, that also has monitoring functions. The support engineer told me it is BMC to monitor the system environment, not Winbond chips.

In the early test, I installed CentOS 4.4 with lm_sensor packages on SS2280, and then executing “sensor_detect” command detected three sensor on the board: BMC, Winbond83627HF and i2c. “sensor” command returned wired datas about all monitored elements. At first, I want to get the correct data by following up Winbond83627HF, but can not find the related driver. The support engineer gave me the hints that OpenIPMI is the default package of Linux. Then I installed this package, and using its command “ipmitool sensor” to get appropriate contents about environment. OpenIPMI provides virtual power function, that maybe useful for our BA880 to replace the physical fenced device(APC). I will study OpenIPMI in the following weeks.

分类: 科技 标签:

He who does not advance falls backward

2007年10月24日 23点38分 没有评论

I must keep up writing working blog here, for colloecting the knowledge and working status. In the last two months, I am effected by some private things, and even I can not put all my heart on the current researching working in UIT. Only studing ONStor products and creating a report was praised and senseful. However, I do not show my 100% energy. It’s a shame that I feel I did not do my best, and I must do something and set new goals. First, I will study deeply about NAS products in the market,and then learn from them to apply in our BA880 series. Second, preparing for CCNA exam is obviously benifit to my tech career.

In the following two weeks, I am going to research on OpenIPMI and the Virtual Power. If Virtual Power is available in the lab, it would change the future BA880 architecture, that means the NAS gateway does not need APC device.

He who does not advance falls backward. Forza, Phillip.

分类: 科技 标签:

CCNA Exam

2007年10月23日 20点53分 没有评论

Prepare for CCNA Exam(update version).

分类: 科技 标签:

Network camera

2007年9月12日 9点30分 没有评论

Input the below strings in google, it is very interesting.

inurl:”viewerframe?mode=”

分类: 科技 标签:

Specifiers and Function

2007年8月27日 21点23分 没有评论

If they limit the scope of their variable to their pieces of code, they do not have to worry about conflicting with variales of the same name used by ohters in other parts of the program. In C, you can declare a variable and indicate its visiblity level by designing its scope. Thus, variables with local scope can only be accessed with the block in which they are declared.

1.Block scope
In this section, a block refers to any sets of statements enclosed in braces. A variable declared within block has block scope. Thus, the variable is active and accessiable from the declaration point to the end of the block. Sometimes, block scope is also called local scope. Usually, a variable with block scope is called a local variable.

2.Nested block size
If a variable declared in the outer block shares the same name with one of the variables in the inner block, the variable within the outer block is hidden by the one within the inner block for the scope of the inner block.

3.Program scope
A variable is said to have program scope when it is declared outside a function. Here variable with program scope and also called global variables, which are visiable among different files.

Since a global variable is visible among different source file of a program, using global variable increases your program’s complexity, which in turn makes your program hard to maintain or debug. It’s not recommended that you declare and are global variables unless it’s very necessary. For instance, you can declare a global variable whose value is used but never changed by several subroutines in your program(use #define directive to define constants that are used in many places in a program).

4.File scope
The program file that contains the source code.

Auto specifier:
A variable’s reserved space in the memory can be erased or relocated when the variable is out of its scope.

Static specifier:
Permanent duration, in other words, the memory storage allocated for the variabl is exited, the value of the variable is maintained outside the scope, and if execution even returns to the scope of the variable, the last stored in the variable is still there.

The register specifer:
In CPU, it’s much quicker to access a register than a memory location. Therebefore, storing variables in register may help to speed up your program. The C language provides you with the register specifer. You can apply this specifer to variables when you think it’s necessary to put the variable into the computer registers. However, the register specifier only gives the compiler a suggestion. In other words, a variable specifierd by the register keyword is not guaranteed to be stored in a register. The compiler can ignore the suggestion if there is no register available, if some other restrictions have to apply.

It is illegal to take the address of a variable that is declared with register specifier because the variable is intended to be stored in a register, not in memory.

Extern specifer:
How can a global variable declare in file A, for instance, be seen in file B? In other words, how does the compiler know the variable used in file B is actually the same variable in file A?
The answer is : Use the extern specifier provided by the C language to allude to a global variable defined elsewhere. In this case, we declare a global variable in file A, and then declare the variable again using the exterm specifier in file B.

To make your program portable across different computer platforms, you can apply the following rules in your program when you declare or allude to a global variables:
1. Ignore the extern specififer, but include an initialize when you declare a global variable.
2. Use extern specifier without an initializer.

Storage class modifiers, used to indicate to C compiler how variable many be accessed.
1.The const modifier:
The content of the variable can not be changed after it is initialized. eg:
char const *ptr_str = “hello”;
2.Volatile modifer, content can be changed without any explicite assignment statement. Ask compiler to turn off certain optimizations on a variables, can declare with valatile specifier.

A function can be declared to return any data type, except an array or function. The return statement used in a function definition returns a single value whose type should match the one declared in the function declaration. By default, the return type of a function is int, if no explicit data is specifier for the function.

syntax:
data-type-specifier function-name()
Here data-type-specifer indicates the data type that the function should return.

Function prototype(with ANSI standard, the number and types fo arguments passed to a function are allowed to be added into the function declaration). The number and types of an argument are called the function prototype.

The purpose of using a function prototype is to help the compiler check whether the data types of arguments passwd to a function match what function expects. The compiler issues an error message if the data types do not match.

“void” is used in the declaration to indicate to the compiler that no argument is needed by this function.

time() return calendar time(current data and time).
locatetime(), local time converted from calendar time
asctime: convert the date and time represented by the structure tm.

vg_start, vg_arg, vg_end.
vg_arg: use to get the next argument passed to the function.

分类: 科技 标签:

array and string

2007年8月24日 23点17分 没有评论

In many cases, you need to declare a set of variables that are of the same data type. Instead of declaring each variable separately, you can declare all hte variables collectively in the format fo an array. Each variable, as an element fo the array, can be accessed either through the array reference or through a pointer that references the array.

An array consists of consecutive memory locations.
datatype Array_Name[Array-Size];
The total bytes of the array:
sizeof(data-type)* Array-size;
Or sizeof(Array_Name);

A character string is actually a character array ended with a null character

分类: 科技 标签: