The harddrivers always have cache for buffer the data. The cache is very fast than both harddrivers and Host Bus, so it is impossible to form continous transfer stream in the Host Bus, because it acts like middlestone between harddriver and host bus. I think the following example would indicate the factor more clearly.
Just image, in an operating system, copy data from harddriver “A” to harddriver “B”.
SCSI: because the cache is more faster device, it always has to wait for harddisk to full it. when the cache is full, A will send all the data in cache to host, in this time, the cache is receiving data again, and the host send the data to B through host bus! Yes, it saves time and increase the transfer rate greatly.
IDE: A will hold the channel single until it writes all data to host memory, even there’s other way which is free when A’s cache is fulling. This mode waste a large machine time and has low rate.
Absolutely, SCSI is more powerful than IDE.
Serial Attached SCSI is running SCSI command set on the electric and physical lyers of Serial ATA. So call it “SAS”.
SCSI ans IDE:
1.Connecting ability: Ultra SCSI has 16bit host bus, and each SCSI channel holds 15 devices; IDE is also 16bit as SCSI,but only two devices would be supported. The length of ATA cable should not be more than 0.5m.
2.Adapter: In the early, ATA used PIO(Programmer Input Output) transfer mode, every I/O operation need CPU resource, so the processor is alway in a high working rate, even sometimes the whole system looks halt without no responding.With the development to Ultra ATA, DMA(Direct Memory Access) increases the performance, the system accesses interface device through DMA, not as former tools “CPU”. To SCSI, it has its own powerful adapter which need litter cpu resources.
3.ATA Channel: ATA Channel is not shared.The primary channel has he prior, for example, it is why we usually set the harddisk to “primary” or “slave” when having two. Note, whoever hold the ATA channel, the other one device could not access and only has to wait for the ending of the current one.
One machine whose IP is 192.168.123.78, and could be accessed by ssh. Later, I re-installed this machine with the same Linux system, and then try to log in by ssh, but to my surprise, I was refused! So many times I tried, finally found the resolution: On my own computer, “vi” the file “/root/.ssh/known_hosts”, and delete the line comprising the strings “192.168.123.78”. At this time, I could login on 78 successfully.
Simply script to find number of files in current directory:
# ls | awk ‘{x++}END{print x}’
Create identified size file:
# dd if=/dev/urandom of=targername bs=1M count=100
bs: block size
Check the video card status:
# glxgears
glxgears is a GLX demo that draws three rotation gears, and prints out framerate information to stdout.
# glxinfo
display info about a GLX entension and OpenGL render.
Note, we could use “winex” to play CS and WARIII.
What the capacity of harddisk are different from the value appeared in Linux system? For example, a 40GB harddisk seems to only have 38GB in OS?
First, it is caused by different measurement, the harddisk manufactor use 1000byte which is easy for calculate, but the system uses 1024byte.
Second, harddisk must be formatted before using, note, this formating operating would also contains some spaces on disk.
How to test harddisk transfer rate(Interal):
# hdparm -Tt /dev/hda
# hdparm -Tt /dev/sdb
IOP acts as chipset and CPU, if we just look RAID card like a motherboard. By adding different control chipset,eg, SCSI,SAS,SATA, we could make all these type RAID products.
IOP is made by Intel:
IOP331 supports PCI-X(1.0)
IOP333 supports PCI Express
In some Linux distributions, there is a file named “/etc/inetd.conf”. inetd is such a procession that monitors the requirement from the network,and call the corresponding program to done with them. “inetd.conf” tells the inetd procession which ports should be listened, and what service should be started for these using ports.
So, we could turn off the ports just adding “#” before the line indicated the port in “inetd.conf” file. and then send out “SIGHUP” to inetd. For all doing:
1. # chmod 600 /etc/inetd.conf
2. idenfity the owner is root:
# stat /etc/inetd.conf
3. # vi /etc/inetd.conf
4. # killall -HUP inetd
after the above steps, we must set the “inetd.conf” to be un-changed.
5. $ chattr +i /etc/inetd.conf
Check the local network setting:
# cat /etc/sysconfig/network
Issue the ifconfig command, the output line will contain the string “TX” and “RX”.
Here “T” means transmit, and “R” is receive.
Difference between byte and bit:
1 byte = 8bit
1 kilobyte = 2^10 bytes = 1024 bytes
1 megabyte = 2 ^20 bytes = 1,048,576 bytes
1 gigabyte = 2 ^ 30 bytes = 1,073,741,824 bytes
when letter “b” is used to indicate capacity, it is byte; when the letter “b” descripts speed or transfer rate, it is also bit.
for example,
80GB harddisk, here “B” is byte.
1Gbps Network device, “b” is bit.
/etc/hosts: as the system start up, it will require some hosts’ name in /etc/hosts before doing the same thing through DNS service.
for example:
# cat /etc/hosts
IP ADDRESS HOSTNAME ALIAS
192.168.123.32 Phillip
Just image,there are two machines which are connected to each other through network device. One is install RH9.0, and the other is SuSE 9.0 which used reiserfs formation.
If data are transferring from RH9.0 machine to SuSE by NFS service, it also means copying ext2 to reiserfs formations.
As we all know, reiserfs has log information acts more powerful than ext2, so I think reiserfs has larger storage space than ext2.
The question is, what’s happening when transfer between ext2 and reiserfs? Does the data file in ext2 be re-written to reiserfs formation?
It only sees it as a file. It doesn’t matter what file system that are used. It will place the files on the drive and add any information that it needs to for reiserfs. The same can be said if you were copying from reiserfs to ext2. It would just place the files on the drive without the extra information.
It will be fine to just copy it over. I have never heard of it causing any trouble and don’t see how it could really. This would not work if you were using dd though.
I’ve ever heard of that copy files from Linux(ext2) to MS-Windows directory(NTFS) through smb service, it could be atteched more extra information, does this matter the data integration?
Permissions and ownerships differ, nothing else. Those aren’t kept IN the file, though, but in a separate area of the file-system. As far as the file-content goes, this is completely file-system and transport agnostic. There’s no piece of ext2 coming to your reiser partition, and NTFS won’t pollute ext2.
I used two IDE harddisks(one is ST 40G’/dev/hdb’,and the other is WD 120G’/dev/hdc’) to build soft RAID 0 on Linux.As I read from book,RAID 0 is a striping array which data will be written to the disks in sequence,that’s also what call it “stripe”. This array should be idenfied by the smallest disks capacity for spreading data in stripe mode. So, I think the capacity of RAID0 is equal to twice of smallest one. In the way, my soft RAID0 should be 80G(2x40G)
The following lines are issued to create RAID0:
# mdadm -C /dev/md0 –level 0 -n /dev/hdb /dev/hdc
# cat /proc/mdstat
Personalities : [raid0]
md0 : active raid0 hdb[0] hdc[1]
159142336 blocks 64k chunks
I found the capacity of my soft raid 0 is 160G.It made me confused,how does RAID0 work as the end of writing over 40G in each disk?
The size of a RAID0 array is equal to the sum of the sizes of the individual volumes. The way the stripes works is that the first 80gigs will be striped between the two drives–resulting in roughly twice the read/write speed of the slower drive. The remaining 80gigs will be on the larger drive only–it will be only as fast as the larger drive.
You don’t really have any control over whether certain files are in the “fast” half or the “slow” half. If you’re particularly concerned about performance, it may make more sense to split the larger drive into multiple partitions–one 40gig partition to RAID0 with the other drive, and one 80gig partition to be “slow” storage.
Use ‘dd’ to create identified size file:
# dd if=/dev/urandom of=targerfile bs=1M count=100
Here, the created file size will be the result of ‘bs’ x ‘count’, in other word:
size = bs x count
# vmstat -n
if the ‘vs’ and ‘sy’ values under CPU are high, and the idle time value under CPU is closed to zero. Your server’s CPU is heavily loaded, Try using a faster machine as your NFS server. Do not use a gateway or a terminal server as an NFS or NTS server.