XenServer をインストールした物理マシンに外付けHDD(USB)を増設して、新規SR(Storage Repositories)を作成したときの手順を紹介します。
詳細な手順や、SRの説明は、以下のサイトを参照してください。
- XenServerに物理ハードディスクを追加してみた - yoshida_eth0の日記
- Citrix XenServer無償版 を使ってみた - tkkochanの日記
- XenServerを導入してみた: 出張デコパパ日記
まず、外付けHDDを初期化します。
赤字で示したのが外付けHDDです。
# fdisk -l
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 250.0 GB, 250059350016 bytes
256 heads, 63 sectors/track, 30282 cylinders
Units = cylinders of 16128 * 512 = 8257536 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 30283 244198583+ ee EFI GPT
Disk /dev/sdb: 120.0 GB, 120060444160 bytes
255 heads, 63 sectors/track, 14596 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 14596 117242338+ 8e Linux LVM
次に、SRを作成します。Dom0 で 以下のようにxe コマンドを実行します。
# xe sr-create type=lvm content-type=user device-config:device=/dev/sdb1 name-label="Local storage 2"以上で、新規SRの "Local storage 2"が作成できました。
これで、仮想マシンを "Local storage 2"に格納できるようになります。