[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[debian-users:54870] 第70回 東京エリア Debian勉強会資料について



お世話様です。
TAKです。

「第70回 東京エリア Debian勉強会資料」の7章「分散ファイルシステム 
CEPHをDebianで活用してみる」にてご教授願いたい事 がありましてメールしま
した。

7.6.2で「loopデバイス」での性能テストを行っておりますが、そもそもどのよ
うにしてimageを作成し、
そのimageをデバイスにマウントしてcephで認識させているのでしょうか?

以下、こちらで行った作業工程です。
-------------------------------------------------------------------
1. 使われていないループバックデバイスを探す。
# losetup -f
/dev/loop0

2. ディスクイメージを/dev/loop0にマッピング
# losetup /dev/loop0 /home/hoge/hoge.img
※hoge.imgは約256MBであらかじめddにて作成したものです
# ll /home/hoge/hoge.img
-rw-r--r-- 1 root root 268435456 Feb 15 17:36 /home/hoge/hoge.img

3. 設定できたかを確認
# losetup -a
/dev/loop0: [fb00]:8650764 (/home/hoge/hoge.img)

4. kpartxでloop0上のパーティションを確認
# kpartx -l /dev/loop0

5. パーティションテーブル確認
# fdisk -lu /dev/loop0

Disk /dev/loop0: 268 MB, 268435456 bytes
255 heads, 63 sectors/track, 32 cylinders, total 524288 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Disk /dev/loop0 doesn't contain a valid partition table

6. パーティションテーブル作成
# fdisk /dev/loop0
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-32, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-32, default 32):
Using default value 32

Command (m for help): p

Disk /dev/loop0: 268 MB, 268435456 bytes
255 heads, 63 sectors/track, 32 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xf0ecc91a

Device Boot Start End Blocks Id System
/dev/loop0p1 1 32 257008+ 83 Linux
valid partition table

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 22: Invalid
argument.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe(8) or kpartx(8)
Syncing disks.

7. パーティションテーブルから、パーティションのデバイスファイルを作成。
# kpartx -a /dev/loop0

8. デバイスファイル確認
# ls /dev/mapper/
control loop0p1

9. 問題点1
# mkfs.btrfs /dev/mapper/loop0p1

WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
WARNING! - see http://btrfs.wiki.kernel.org before using

device /dev/mapper/loop0p1 is too small (must be at least 256 MB)

10. 問題点2 マウント
# mount -t btrfs /dev/mapper/loop0p1 /mnt/btrfs
mount: /dev/mapper/loop0p1: can't read superblock
-------------------------------------------------------------------

上記の手順で進めていましたが、そもそも間違った手順なのでしょうか?

勉強会の資料を基に同じような環境構築検証をされた方がいらっしいましたら
ご教授いただけたらと思います。

よろしくお願いします。

TAK