
Ubuntu日本語フォーラム

ログインしていません。
お世話になっております。
皆様のお知恵を拝借できればと思います。
よろしくお願い致します。
dumpコマンドを使いHDDのdumpをUSBメモリに入れたいのです
下記が行った作業になります。
df -hの内容
ファイルシステム サイズ 使用 残り 使用% マウント位置
/dev/sda1 71G 5.1G 62G 8% / <--------ここをdumpで取得したい
none 998M 308K 998M 1% /dev
none 1002M 1.3M 1001M 1% /dev/shm
none 1002M 544K 1001M 1% /var/run
none 1002M 0 1002M 0% /var/lock
none 1002M 0 1002M 0% /lib/init/rw
none 71G 5.1G 62G 8% /var/lib/ureadahead/debugfs
/dev/sdb1 1.9G 8.9M 1.9G 1% /media/B4D0-5310
/dev/sdc1 15G 1006M 14G 7% /media/6C93-A7EB <--------ここにdumpFileを入れたい
----------以下dumpのlog----------
root@hoge-desktop:/media/6C93-A7EB/dump_dir# dump -0uf dump.20110120 /dev/sda1
DUMP: Date of this level 0 dump: Thu Jan 20 11:03:28 2011
DUMP: Dumping /dev/sda1 (/) to dump.20110120
DUMP: Label: none
DUMP: Writing 10 Kilobyte records
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 5220311 blocks.
DUMP: Volume 1 started with block 1 at: Thu Jan 20 11:03:29 2011
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: 48.89% done at 8507 kB/s, finished in 0:05
DUMP: write error 4194320 blocks into volume 1: File too large
DUMP: Do you want to rewrite this volume?: ("yes" or "no") n
********************↑↑↑↑↑↑↑↑↑↑
ここで再度書き込みを聞いてくるのでNOとした
DUMP: Do you want to start the next tape?: ("yes" or "no") y
********************↑↑↑↑↑↑↑↑↑↑
ここで何故か次のテープと聞いてきている?テープデバイス専用?
とりあえずYesとした
DUMP: Closing dump.20110120
DUMP: Volume 1 completed at: Thu Jan 20 11:12:48 2011
DUMP: Volume 1 4194330 blocks (4096.03MB)
DUMP: Volume 1 took 0:09:19
DUMP: Volume 1 transfer rate: 7503 kB/s
********************↑↑↑↑↑↑↑↑↑↑
ここで一旦Volume 1のdumpが終わったように見える
DUMP: Change Volumes: Mount volume #2
DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") y
********************↑↑↑↑↑↑↑↑↑↑
新しいデバイスのマウントがOKか聞いているがUSBメモリの容量は十分なのでYesとした
DUMP: Volume 2 started with block 4194301 at: Thu Jan 20 11:13:16 2011
DUMP: Volume 2 begins with blocks from inode 1704034
DUMP: 84.04% done at 14823 kB/s, finished in 0:01
DUMP: Closing dump.20110120
DUMP: Volume 2 completed at: Thu Jan 20 11:15:32 2011
DUMP: Volume 2 1029760 blocks (1005.62MB)
DUMP: Volume 2 took 0:02:16
DUMP: Volume 2 transfer rate: 7571 kB/s
DUMP: 5224060 blocks (5101.62MB) on 2 volume(s)
DUMP: finished in 641 seconds, throughput 8149 kBytes/sec
DUMP: Date of this level 0 dump: Thu Jan 20 11:03:28 2011
DUMP: Date this dump completed: Thu Jan 20 11:15:32 2011
DUMP: Average transfer rate: 7537 kB/s
DUMP: DUMP IS DONE
********************↑↑↑↑↑↑↑↑↑↑
一応正常に終了した模様
root@hoge-desktop:/media/6C93-A7EB/dump_dir#
ls -lの内容
-rwxr-xr-x 1 hoge hoge 1054474240 2011-01-20 11:15 dump.20110120
作成されたFileサイズを見ると、おおよそではあるがVolume1のblocksとVolume2のblocksの合計になる。
果たしてdumpファイルは正常に作成されているのでしょうか?
リストアするにもテストできないのでどうしたものか迷っています。
なにかアドバイスを頂けると幸いです。
お気づきの点等ありましたらよろしくお願い致します。
オフライン
FAT32 ですか?
FAT32の最大ファイルサイズは4GBまでです。バックアップ先にFATもUSBメモリも適していません。
dump でマルチボリュームオプションがありますので活用してください。
バックアップのチェックはrestoreの -t オプションでできます。
それぞれ詳しくはmanファイルを参照ください
オフライン
WindowsXPSP3でフォーマットしてましてFAT32でした。
本当に初歩的な質問に終始してしまいまして申し訳ないのですが
USBメモリのフォーマット方法がわかりません。
USBメモリをPC本体に接続するとオートでマウントされ右クリックでフォーマットを選択すると
タイプ
・全てのシステムで互換(FAT)
・Linux互換(ext2)
・Linux互換(ext4)
・暗号化/Linux互換(FAT)
と4種類出てきましたのでFAT以外の選択肢で実行してもエラーとなってしまいます。
Error createing file system:helper exited with exit code 1:
given file system label exceeds 16 characters
となってしまいます。
ディスク・ユーティリティを使用して
ドライブをフォーマット(D)
を使用してのフォーマットも
/dev/sdc is mounted
とエラーが出てしまいます。何が原因でフォーマット出来ないのかがわかりません。
度々で申し訳ございませんが、再度ご教授頂けたら幸いです。
よろしくお願い致します。
オフライン
そのディスクユーティリティから「安全に取り外す」を行なってからフォーマットしてみてください。
オフライン
× そのディスクユーティリティから「安全に取り外す」を行なってからフォーマットしてみてください。
○ そのディスクユーティリティから「ボリュームをアンマウント」を行なってからフォーマットしてみてください。
# うーん今日はダメだなあorz
オフライン
>yama様
度々のご回答ありがとうございます。無事USBメモリのフォーマットが行えました。
そこでdumpを再度実行してみました。
結果は以下のlogですがやはり、途中、途中で
「Is the new volume mounted and ready to go?: ("yes" or "no") 」
が出てきます。
USBメモリはext4でフォーマットしています。
これは、通常外部ストレージを使うと出てくるものなのでしょうか?
ちなみにバックアップ先を本体のHDDにした場合
dump -0uf /usr/local/20110120.dump /dev/sda1
とした場合は上記のような問いは発生しませんでした。
これは、仕様と考えて良い物なのでしょうか?
dump処理自体は正常に終了しているように見受けられますが
restore -t 20110120.dump
を実行すると
restore: /dev/tape: No such file or directory
と出てしまいます。
(これは本体のHDDにとったdumpファイルも同様でした。どちらも失敗?)
何から何まで質問ばかりで申し訳ございません。
自分でも調べつつ行っているのですがなかなか答えにたどり着けませんで、お知恵を拝借できればと存じます。
root@hoge-desktop:/# dump -0uf /media/B4D0-5310/20110120.dump /dev/sda1
DUMP: Date of this level 0 dump: Thu Jan 20 16:02:40 2011
DUMP: Dumping /dev/sda1 (/) to /media/B4D0-5310/20110120.dump
DUMP: Label: none
DUMP: Writing 10 Kilobyte records
DUMP: mapping (Pass I) [regular files]
DUMP: mapping (Pass II) [directories]
DUMP: estimated 10455299 blocks.
DUMP: Volume 1 started with block 1 at: Thu Jan 20 16:02:41 2011
DUMP: dumping (Pass III) [directories]
DUMP: dumping (Pass IV) [regular files]
DUMP: 15.89% done at 5539 kB/s, finished in 0:26
DUMP: End of tape detected
DUMP: Closing /media/B4D0-5310/20110120.dump
DUMP: Volume 1 completed at: Thu Jan 20 16:08:59 2011
DUMP: Volume 1 1932190 blocks (1886.90MB)
DUMP: Volume 1 took 0:06:18
DUMP: Volume 1 transfer rate: 5111 kB/s
DUMP: Change Volumes: Mount volume #2
DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") y
DUMP: Volume 2 started with block 1932161 at: Thu Jan 20 16:12:54 2011
DUMP: Volume 2 begins with blocks from inode 1058243
DUMP: 18.48% done at 39 kB/s, finished in 0:27
DUMP: 35.00% done at 5737 kB/s, finished in 0:21
DUMP: End of tape detected
DUMP: Closing /media/B4D0-5310/20110120.dump
DUMP: Volume 2 completed at: Thu Jan 20 16:19:00 2011
DUMP: Volume 2 1932189 blocks (1886.90MB)
DUMP: Volume 2 took 0:06:06
DUMP: Volume 2 transfer rate: 5279 kB/s
DUMP: Change Volumes: Mount volume #3
DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") y
DUMP: Volume 3 started with block 3864320 at: Thu Jan 20 16:21:03 2011
DUMP: Volume 3 begins with blocks from inode 1441811
DUMP: 43.90% done at 6475 kB/s, finished in 0:18
DUMP: End of tape detected
DUMP: Closing /media/B4D0-5310/20110120.dump
DUMP: Volume 3 completed at: Thu Jan 20 16:27:06 2011
DUMP: Volume 3 1932189 blocks (1886.90MB)
DUMP: Volume 3 took 0:06:03
DUMP: Volume 3 transfer rate: 5322 kB/s
DUMP: Change Volumes: Mount volume #4
DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") y
DUMP: Volume 4 started with block 5796479 at: Thu Jan 20 16:55:34 2011
DUMP: Volume 4 begins with blocks from inode 1441811
DUMP: 55.44% done at 39 kB/s, finished in 0:14
DUMP: 72.04% done at 5764 kB/s, finished in 0:09
DUMP: End of tape detected
DUMP: Closing /media/B4D0-5310/20110120.dump
DUMP: Volume 4 completed at: Thu Jan 20 17:01:37 2011
DUMP: Volume 4 1932189 blocks (1886.90MB)
DUMP: Volume 4 took 0:06:03
DUMP: Volume 4 transfer rate: 5322 kB/s
DUMP: Change Volumes: Mount volume #5
DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") y
DUMP: Volume 5 started with block 7728638 at: Thu Jan 20 17:01:47 2011
DUMP: Volume 5 begins with blocks from inode 1441811
DUMP: 86.83% done at 5920 kB/s, finished in 0:04
DUMP: End of tape detected
DUMP: Closing /media/B4D0-5310/20110120.dump
DUMP: Volume 5 completed at: Thu Jan 20 17:07:47 2011
DUMP: Volume 5 1932189 blocks (1886.90MB)
DUMP: Volume 5 took 0:06:00
DUMP: Volume 5 transfer rate: 5367 kB/s
DUMP: Change Volumes: Mount volume #6
DUMP: Is the new volume mounted and ready to go?: ("yes" or "no") y
DUMP: Volume 6 started with block 9660797 at: Thu Jan 20 17:09:09 2011
DUMP: Volume 6 begins with blocks from inode 2627523
DUMP: 97.96% done at 6758 kB/s, finished in 0:00
DUMP: Closing /media/B4D0-5310/20110120.dump
DUMP: Volume 6 completed at: Thu Jan 20 17:11:43 2011
DUMP: Volume 6 798254 blocks (779.54MB)
DUMP: Volume 6 took 0:02:34
DUMP: Volume 6 transfer rate: 5183 kB/s
DUMP: 10459050 blocks (10213.92MB) on 6 volume(s)
DUMP: finished in 1958 seconds, throughput 5341 kBytes/sec
DUMP: Date of this level 0 dump: Thu Jan 20 16:02:40 2011
DUMP: Date this dump completed: Thu Jan 20 17:11:43 2011
DUMP: Average transfer rate: 5264 kB/s
DUMP: DUMP IS DONE
root@hoge-desktop:/#
オフライン
dump がUSBメモリのサイズをうまく取得できていないため、デフォルト?のサイズで分割してしまっているようです。
dumpの B オプションでレコードサイズを与えてやれば分割しなくなるかと。
オフライン
>yama様
度々のご教授恐れ入ります。
Bオプションを設定したところ
Please choose a blocksize <= 1024kB
と出てきました。
最大値が1024kBとなると、どうしてもファイル一個には出来ません。
内臓のHDDとUSBメモリとで何かを区別しているのでしょうか?
念のため
dump -b 1024 -0uf /usr/local/20110120.dump /dev/sda1
を実行しましたが
やはり途中途中で
Is the new volume mounted and ready to go?
が出てきてしまいます。
こうなってしまうと、一度内臓HDDにdumpをとりそれをUSBメモリに移し変えるしか方法は無いのでしょうか?
オフライン
小文字のbではなく大文字の B オプションです。
man dump して熟読されることをお勧めします。
オフライン
申し訳ありません。
こちらを読み返していて気が付いて、再度試行中です。
初歩的なミスでご面倒をおかけして申し訳ございません。
オフライン
Linuxを触り始めて一ヶ月と少し、オプションの大文字、小文字での動作の違いも分からない若輩者の私に
ご親切にご教授くださり誠にありがとうございます。
このdumpに関してかれこれ2週間ほどやっているのですが今現在も成功しておりません。
yama様のご指摘通りdでなくBでやりましたが、同じ結果となってしまいました。
manコマンドにてdumpの説明を見ましても、なぜ希望と違う動作をするのかが分かりません。
再度調べ直し、挑戦したいと思います。
yama様には大変ご迷惑をお掛けして申し訳ございませんでした。
オフライン
dump -0uf USBメモリ -B 14000000 /dev/sda1
ですね、これでいかがでしょう。
オフライン
ふと、バックアップする先のデバイスが間違えていませんか?
デバイスの情報が以下として、
/dev/sdb1 1.9G 8.9M 1.9G 1% /media/B4D0-5310
/dev/sdc1 15G 1006M 14G 7% /media/6C93-A7EB
先の駄目だといっていたコマンドでは、
dump -0uf /media/B4D0-5310/20110120.dump /dev/sda1
と、狭い方のパーティションを指定しています。今回も、その狭い方をしていしてしまっていませんか?そのため、本当に「デバイスが満杯になった」のではないでしょうか。
この辺は、ログを確認すれば結構簡単にわかるか部分なので、最終的な現象が同じでも「同じだなぁ」と判断せずに、目を通すことをお勧めします(か、自身で良くわからない場合は、掲載すると、だれか見てくれるかも。)
※DUMP: End of tape detected.と出ていたら、デバイス(HDDだと、Disk Full?)が満杯のことなのかも。
オフライン