Posts

Showing posts from August, 2015

Install Software RAID in Linux System

Image
Install Software RAID in Linux System Table of Contents Benefit Prepare install and configure mdadm finished 1 Benefit RAID can provide stable, speed and security for your data access, but not at the same time. We need different performance at a different scenario, and the above three traits that I mentioned, are trade-off factors in real apply, some time we sacrifice one to achieve another. In my desktop work station, what I really need is the speed all the time. That's the RAID-0. Here is my disks, one SSD as the system disk for ubuntu, and two additional 1T disks to be an RAID-0 array. 2 Prepare Plug two disks into the motherboard first, then erase the disk's format use fdisk tool and build one partition for each one with the same size. In my case, I got two devices, /dev/sdb, /dev/sdc. sudo fdisk /dev/sdb # d .... delete all partition in the hard driver # n create one partition for the whole disk # t choice fd (linux raid disk)

Python yield paradigm

Image
Python yield paradigm Table of Contents generator or iterator generator pipe coroutine concurrency The yield keyword in python language is its landmark and invention, it is not just a language syntactic and feature, it lets python programming rocks in the functional programming way. Here in this article, I try to collect all the yield magic here to surprise the python newbie. 1 generator & iterator "yield" is the keyword that to make a generator in python, so what the generator is? Before that, I just try to explain what the Iterator is first? An iterator is an easier and more common concept in objective oriented languages, take java, for example, basically, every container can be converted to an iterator. List < String> namesList = new ArrayList < String> (); // add 3 names namesList.add( "moses" ); namesList.add( "jacobs" ); namesList.add( "davide" ); // iterate via Iterator Iterator < Str

RAID learning

Image
RAID learning Table of Contents RAID's benefit RAID's types type 0 type 1 type 10 type 2, 3, 4 type 5 type 6 RAID's limitation 1 RAID's benefit So, what the RAID is? RAID is short for Redundant Array of Independent Disks. In the storage industry, the speed, redundancy, and cost are the three factors that the market cares about. I/O speed: hard drive's I/O performance is limited by the physical law, if we continue to use magnetic storage materials. redundancy: the fault of a subset disks in an array can't damage the whole data stored in them. cost: the density of data per dollar. RAID is a common solution to face that. 2 RAID's types 2.1 type 0 parallel multi disks together, with the highest disk write/read IO performance, but none data security. split the data into n pieces, n equals to the array size of the disks. And both the write and read are parallel to improve the speed, but one disk's damage c

DIY my dreaming machine

DIY my dreaming machine Table of Contents My Requirements Composition of a PC Where to begin Budget 1 My Requirements Now I works in a PC desktop only on my office time, and it is a Mac machine, and after my office time, I primarily do entertainment and learning on my MacBook air (mba). To be honestly, I like my mba, but not my IMac, Mac system is stable, UI friendly and upgrade my efficiently a lot only with a high-ranking hardware, its so bad IO efficiency make her only perform good with a SSD driver inside. And also it's horrible scalability and its closed nature like Windows make her less funny in a nerds's eye. So what's my dreaming machine is? I think the answer is on the DIY field. It has to running a Linux system, for software hacking and audio composition. My favorite configuration is intel haswell CPU with more the 8G memory with a nice display, and also with vt-d compatible. 2 Composition of a PC The CPU, Motherboard, Mem