Advanced Filesystem Management
Tools:
#tar
#dump
#restore
Ex:
dump -0u -f /dev/nst0 /dev/hda2
restore -rf /dev/nst0
0: full backup
u: update
f : file
r: precludes an interac-tive file extraction and can be detrimental to one’s health
(not to mention the disk) if not used carefully.
nst: tape(device)
dump -0u -f /tmp/data-backup.dump /dev/hda2
restore -rf /tmp/data-backup.dump
(1)Raid
Configuration file: /etc/mdadm.conf
%Raid 0, 1, 5 and 6
%Raid devices are named: /dev/md0, /dev/md1, /dev/md2, and so on
%Create and define Raid devices
#madam -C /dev/md0 -l 5 -n 3 /dev/sdb{2,3,5} -x 1 /dev/sdb6
-l : raid level
-n: sets the number of Raid disks
-x: spare device
#mkfs.ext3 /dev/md0
%disk fail
#mdam /dev/md0 -f /dev/sdb2
%change disk
%add to /dev/md0
#mdadm /dev/md0 -a /dev/sdb2
%檢查狀態
#cat /proc/mdstat
%停止raid
#mdadm -S /dev/md0
%重新啟動
#mdadm -As
-A : assemble
-s : scan
* 必須先寫入/etc/mdadm.conf 才能啟動[#mdadm --detail --scan > /etc/mdadm.conf]
- Aug 03 Mon 2009 23:43
[雜記]RHCE筆記整理-RH133-Unit9(1)
close
全站熱搜
留言列表
發表留言