linux:knoppix

KNOPPIX

$ dd if=/dev/sdb of=/dev/sda bs=16M conv=sync,noerror status=progress
60129542144 bytes (56 GB, 53 GiB) copied, 748 s, 79.4 MB/s
$ dd if=/dev/sda1 if=/mnt/sdb1/sda1.img bs=16M conv=sync,noerror status=progress
436207616 bytes (436 MB, 416 MiB) copied, 4 s, 109 MB/s
$ dd if=/dev/sda1 bs=16M conv=sync,noerror status=progress | bzip2 --best > sda1.img.bz2
335544320 bytes (336 MB, 320 MiB) copied, 4 s, 76.2 MB/s

バックアップ(bzip圧縮して転送)

$ 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

バックアップ(無圧縮で転送)

$ 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

リストア(bzip圧縮して転送)

$ 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

リストア(無圧縮で転送)

$ ssh tomoyan@192.168.1.1 -p10022 "dd if=/home/tomoyan/backup/source_pc.img bs=16M " | \
 dd of=/dev/sda bs=16M

リストア(bzip2 ローカル転送)

$ bzip2 -dc sda8.img.bz2 | dd of=/dev/sdb

status=progress オプションを指定して実行する。

$ dd if=/dev/sda of=/mnt/sdb1/sda.img bs=16M conv=sync,noerror status=progress

status=progress オプションを指定しなかった場合は別ターミナルで以下を実行する。

$ sudo watch -n1 pkill -USR1 dd

または

$ sudo while true; do killall -USR1 dd; sleep 2; done

 以下の内容は KNOPPIX 5.1.0 にて確認を行った。

Volume Group をアクティブにする。

$ 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


デバイスファイルを確認する。

# 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


マウントする。

# mkdir /mnt/vol00
# mount /dev/MonsterVolGrp00/MonsterLogVol00 /mnt/vol00
# mount
〜省略〜
/dev/mapper/MonsterVolGrp00-MonsterLogVol00 on /mnt/vol00 type ext3 (rw)
  • linux/knoppix.txt
  • 最終更新: 2021/11/17 04:14
  • by ともやん