文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 ====== KNOPPIX ====== ===== デバイス間のコピー ===== <WRAP prewrap 100%> <code> $ dd if=/dev/sdb of=/dev/sda bs=16M conv=sync,noerror status=progress </code> </WRAP> <WRAP prewrap 100% #result> <code> 60129542144 bytes (56 GB, 53 GiB) copied, 748 s, 79.4 MB/s </code> </WRAP> ===== ディスクイメージを無圧縮バックアップ ===== <code> $ dd if=/dev/sda1 if=/mnt/sdb1/sda1.img bs=16M conv=sync,noerror status=progress </code> <WRAP result> <code> 436207616 bytes (436 MB, 416 MiB) copied, 4 s, 109 MB/s </code> </WRAP> ===== ディスクイメージを圧縮バックアップ ===== <code> $ dd if=/dev/sda1 bs=16M conv=sync,noerror status=progress | bzip2 --best > sda1.img.bz2 </code> <WRAP result> <code> 335544320 bytes (336 MB, 320 MiB) copied, 4 s, 76.2 MB/s </code> </WRAP> ===== ディスクイメージをネットワーク転送 ===== バックアップ(bzip圧縮して転送) <code> $ dd if=/dev/sda bs=16M conv=sync,noerror status=progress | bzip2 --best | ssh tomoyan@192.168.1.1 -p10022 \ dd of=/home/tomoyan/backup/source_pc.img.bz2 bs=16M </code> バックアップ(無圧縮で転送) <code> $ dd if=/dev/sda bs=16M conv=sync,noerror status=progress | ssh tomoyan@192.168.1.1 -p10022 \ dd of=/home/tomoyan/backup/source_pc.img bs=16M </code> リストア(bzip圧縮して転送) <code> $ ssh tomoyan@192.168.1.1 -p10022 "dd of=/home/tomoyan/backup/source_pc.img.bz2 bs=16M" | bzip2 -d \ dd if=/dev/sda bs=16M </code> リストア(無圧縮で転送) <code> $ ssh tomoyan@192.168.1.1 -p10022 "dd if=/home/tomoyan/backup/source_pc.img bs=16M " | \ dd of=/dev/sda bs=16M </code> リストア(bzip2 ローカル転送) <code> $ bzip2 -dc sda8.img.bz2 | dd of=/dev/sdb </code> ===== dd 進行状況を表示 ===== status=progress オプションを指定して実行する。\\ <code> $ dd if=/dev/sda of=/mnt/sdb1/sda.img bs=16M conv=sync,noerror status=progress </code> status=progress オプションを指定しなかった場合は別ターミナルで以下を実行する。\\ <code> $ sudo watch -n1 pkill -USR1 dd </code> または <code> $ sudo while true; do killall -USR1 dd; sleep 2; done </code> ===== LVM2のボリュームをマウントする方法 ===== 以下の内容は KNOPPIX 5.1.0 にて確認を行った。\\ \\ Volume Group をアクティブにする。\\ <code> $ sudo -s # vgscan Reading all physical volumes. This may take a while... Found volume group "MonsterVolGrp00" using metadata type lvm2 # vgchange -a y 2 logical volume(s) in volume group "MonsterVolGrp00" now active </code> \\ デバイスファイルを確認する。\\ <code> # lvdisplay --- Logical volume --- LV Name /dev/MonsterVolGrp00/MonsterLogVol00 VG Name MonsterVolGrp00 LV UUID xg1cQ1-nNqq-S15D-VZdf-Ti04-dHaY-x27YxH LV Write Access read/write LV Status available # open 0 LV Size 1.82 TB Current LE 59482 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:0 --- Logical volume --- LV Name /dev/MonsterVolGrp00/MonsterLogVol01 VG Name MonsterVolGrp00 LV UUID Bh587J-axcM-SC4I-h7TX-focc-jGkm-2w0FRG LV Write Access read/write LV Status available # open 0 LV Size 3.91 GB Current LE 125 Segments 1 Allocation inherit Read ahead sectors 0 Block device 254:1 </code> \\ マウントする。\\ <code> # mkdir /mnt/vol00 # mount /dev/MonsterVolGrp00/MonsterLogVol00 /mnt/vol00 # mount 〜省略〜 /dev/mapper/MonsterVolGrp00-MonsterLogVol00 on /mnt/vol00 type ext3 (rw) </code> ===== 参考文献 ===== [[http://www.knoppix.net/wiki/LVM2|LVM2 - Knoppix Documentation Wiki]]\\ [[https://qiita.com/wf9a5m75/items/6bfea7a2b8c9658ce4fc|]]\\ [[https://wiki.archlinux.jp/index.php/%E3%83%87%E3%82%A3%E3%82%B9%E3%82%AF%E3%81%AE%E3%82%AF%E3%83%AD%E3%83%BC%E3%83%B3|ディスクのクローン - ArchWiki]]\\ linux/knoppix.txt 最終更新: 2021/11/17 04:14by ともやん