Raid is a tool installed by default using raidtools. add hard disk raid members as hard disk partitions first to hard disk partitions 2. install raidtools3. process modification script raidstop/dev/md0cp/usr/share/doc/raidtools-1.00.3/raid1.conf. sample/etc/raditabviraiddev
Raid is a tool installed by default using raidtools.
1. add a hard disk
Raid members are hard disk partitions
Partitioning hard disks first
2. install raidtools
3.
Process
Modify script
Raidstop/Dev/md0
Cp/usr/share/doc/raidtools-1.00.3/raid1.conf. sample/Etc/raditab
Vi
Raiddev /Dev/md1, name
Raid-level 1
Nr-raid-disks2 Raid disk count
Nr-spare-disks0 Number of redundant disks
Chunk-size 4
Device /Dev/sdb1
Raid-disk (raid disk) 0
Device/Dev/sdc1
Raid-disk 1
Device/Dev/sdc1
Spare-disks (redundant disk) 1
Mkraid-R/dev/md1
Mkfs. ext3/dev/md1
Mount/dev/md1/opt
Write vi/etc/fstab
/Dev/md0 /Opt
Lsraid-A-a/dev/md1
, More/proc/mdstat
Port the raid device to the root directory
Required
/Etc/grub. conf add raid device kernel
Simulated recovery
Raidsetfaulty/dev/md0/dev/sdb1
Raidhotadd/dev/md0/dev/sdd1 add hard disk
Raidhotremove/dev/md0/dev/sdb1 remove hard disk
Step Auto-restore
1.
Raidstop/dev/md0
2.
Vi/etc/raidtab to add redundant disk configuration files
Device/Dev/sdc1
Spare-disks (redundant disk) 1
3.
/Proc/mdstat
Disk information kernel
View repair progress
4.
Run raid0 first and run raid1.
After completion
Format raid1 only
You can.
Then you can mount it.
Lvm Logical Volume Management
Pvcreate/dev/sda1/dev/sda2/dev/sda3 add logical volume space
Pv (phisical volume) physical volume
Vg (vounme group)Logical group
Lv (logical volume) logical volume
Vgcreate vg0/dev/sda1/dev/sda2 create a logical volume Group
Lvcreate-n data (name)-L 10 m (size) vg0 add logical volume
Ese2fsadm-L + 10 m/dev/vg0/data adds space for the logical volume
Vgextend vg0/dev/sda3 logical volume group enlargement
Pvmove/dev/sda1 [/dev/sdb1]
Convert a file system to a pv linux lvm
Fdisk/dev/sdb
Linux lvm
Pvcreate/dev/sda [1-3]
Vgcreate-s size (pe block size) vg0/dev/sda1/dev/sda2
Vgdisplay vg0 view information
Lvcreate-n data (name)-L 10 m (size)
Lvcreate-d-l 8-n snap (snapshot) objective
Vgchange-an {close}-ay (enable) vg0