Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.
Nie wiedziałem gdzie pisać, to wpisałem tutaj.
Cel: backup RAID 1 (2dyski) + LVM
Powód: czasem mieszam coś w systemie na tyle że nie wstaje ( tudzież miałem po dist-upgrade tak że nie wstał)
Chciałem mieć RAID 1, który wiem jak działa. Znalazłem do tego tutorial do RAID 1 + LVM ( na youtube ).
Zainstalowałem system (debian testing 2.6.38-2-amd64) zgodnie z tym tutorialem. Poczytałem jak LVM działa, ale wszystko to jest dla mnie jakimś spaghetti teraz.
Wcześniej backup robiłem z poziomu sysrescuecd + partimage. Teraz nie bardzo wiem jak to zrobić ? Czy zbackupować jeden dysk fizyczny i przy przywracaniu przywrócić na oba dyski ?
Proszę o rady
# cat /proc/mdstat Personalities : [raid1] md1 : active raid1 sda7[0] sdb7[1] 976016248 blocks super 1.2 [2/2] [UU] md0 : active (auto-read-only) raid1 sda1[0] sdb1[1] 96244 blocks super 1.2 [2/2] [UU] unused devices: <none>
# vgdisplay --- Volume group --- VG Name vg_tmp System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 2 VG Access read/write VG Status resizable MAX LV 0 Cur LV 1 Open LV 1 Max PV 0 Cur PV 2 Act PV 2 VG Size 280,00 MiB PE Size 4,00 MiB Total PE 70 Alloc PE / Size 70 / 280,00 MiB Free PE / Size 0 / 0 VG UUID KlzKFz-BGxx-xrwB-NXxZ-5WWs-lWFg-tCkHoP --- Volume group --- VG Name vg_main System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 6 VG Access read/write VG Status resizable MAX LV 0 Cur LV 5 Open LV 5 Max PV 0 Cur PV 1 Act PV 1 VG Size 930,80 GiB PE Size 4,00 MiB Total PE 238284 Alloc PE / Size 238284 / 930,80 GiB Free PE / Size 0 / 0 VG UUID fFbVHH-GDio-BPNz-dd95-k4Lu-bgL8-Ag4R4O
# lvdisplay --- Logical volume --- LV Name /dev/vg_tmp/tmp VG Name vg_tmp LV UUID 6XpBPI-Xks1-veFW-O7e6-3tbi-imdW-4BR7Uv LV Write Access read/write LV Status available # open 1 LV Size 280,00 MiB Current LE 70 Segments 2 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Logical volume --- LV Name /dev/vg_main/root VG Name vg_main LV UUID JeJBx3-rTcn-YQT0-Efxo-iT9m-d7RV-sqbyMo LV Write Access read/write LV Status available # open 1 LV Size 1,39 GiB Current LE 357 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 --- Logical volume --- LV Name /dev/vg_main/usr VG Name vg_main LV UUID AxwBKE-woNG-tipV-eUDz-0UAA-0m91-wbv47j LV Write Access read/write LV Status available # open 1 LV Size 9,31 GiB Current LE 2384 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:2 --- Logical volume --- LV Name /dev/vg_main/var VG Name vg_main LV UUID 3vN5Dd-hqfr-2R6Q-6HOp-eBI7-I0at-eVtSfW LV Write Access read/write LV Status available # open 1 LV Size 7,45 GiB Current LE 1907 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:3 --- Logical volume --- LV Name /dev/vg_main/home VG Name vg_main LV UUID U5vlHy-dx6W-2rgO-Fmdo-Qpgn-CHr7-XW6hKn LV Write Access read/write LV Status available # open 1 LV Size 46,56 GiB Current LE 11920 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:4 --- Logical volume --- LV Name /dev/vg_main/magazyn VG Name vg_main LV UUID xX2kO1-URYY-7cyE-oS0F-SJ9T-aqi0-zLQeO2 LV Write Access read/write LV Status available # open 1 LV Size 866,08 GiB Current LE 221716 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:5
Offline
To jaki masz level RAID nie ma zadnego znaczenia poniewaz backup robisz na innym poziomie.
http://tldp.org/HOWTO/LVM-HOWTO/snapshots_backup.html
http://www.howtoforge.com/linux_lvm_snapshots
Czyli trzaskasz sobie snapshoty kolejnych volumenow montujesz do jakiegos katalogu, pakujesz i wrzucasz gdzies obok i po sprawie.
Offline
Dzięki za odpowiedź, zrobię zgodnie z tutorialem
Offline
Time (s) | Query |
---|---|
0.00016 | SET CHARSET latin2 |
0.00005 | SET NAMES latin2 |
0.00158 | SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='18.224.31.90' WHERE u.id=1 |
0.00059 | REPLACE INTO punbb_online (user_id, ident, logged) VALUES(1, '18.224.31.90', 1733010599) |
0.00041 | SELECT * FROM punbb_online WHERE logged<1733010299 |
0.00068 | DELETE FROM punbb_online WHERE ident='66.249.66.6' |
0.00057 | SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=18786 AND t.moved_to IS NULL |
0.00005 | SELECT search_for, replace_with FROM punbb_censoring |
0.00073 | SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=18786 ORDER BY p.id LIMIT 0,25 |
0.00078 | UPDATE punbb_topics SET num_views=num_views+1 WHERE id=18786 |
Total query time: 0.0056 s |