Hard Links
LN is created. as follows, create a hard link to the file oldfile.
Link Oldfile newfile
ln Oldfile NewFile
Because a hard link is a file with the same inode number with only a different file name, hard links have the following characteristics:
The file has the same inode and data block;
Only files that already exist can be created;
Cannot cross file system for hard link creation;
The directory cannot be created, only the file can be created;
Deleting a hard-link file does not affect other files that have the same inode number.
Soft links
Ln-s Oldfile Newfil
A soft link differs from a hard link in that the file is a soft connection if the contents of the file's user data block are pointing to the path name of another file.
Soft link is a normal file, but the content of the data block is a bit special. Soft links have their own inode numbers and user data blocks . Therefore, the creation and use of soft links does not have many restrictions similar to hard links:
Soft links have their own file attributes and permissions, etc.;
You can create a soft link to a nonexistent file or directory;
Soft link can cross file system;
Soft links can be created on files or directories;
When you create a soft link, the link count i_nlink not increase;
Deleting a soft link does not affect the file being pointed to, but if the original file being pointed to is deleted, the associated soft connection is called a dead link (that is, dangling link, if it is re-created by pointing to the path file, the dead link can revert to the normal soft link).
Raid:
Redundant arrays of inexpensive disks low-cost disk array
Independent Standalone disk array
BERKELEY:A case for redundant arrays of inexpensive disks
Hard raid: Some controllers have CPU, memory, battery.
Soft raid:
Levels: Level
Raid0
Raid1
Raid2
...
Raid5
Raid6
Raid10
Raid01
Raid4: At least three blocks. Two pieces of data, a piece of check code. Implemented by XOR or operation
Implementation of software RAID on CENTOS6
Combined with MD (multi devices) in the kernel
Mdadm-c dev/md0-a yes-n 3-x 1-l 5/dev/sda{7,8,9,10} three disc RAID5, piece of spare
-D Display RAID details
Mdadm-d/dev/md0
Management mode
-F: Mark the specified disk as damaged
-R: Remove disk
-A: Adding disks
Observing the state of MD
Cat/proc/mdstat
Stop MD Device
Mdadm-s/dev/md0
Watch-n1 ' Cat/proc/mdstat ' not a second refresh view
Linux-ln-raid