Difference between revisions of "UEC: Manajemen Storage"

From OnnoWiki
Jump to navigation Jump to search
(New page: Storage Controller Storage Controller is the component of Eucalyptus that provides persistent block storage compatible with Amazon’s Elastic Block Store. euca2ools or EC2 commands can b...)
 
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
Storage Controller
+
==Storage Controller==
  
Storage Controller is the component of Eucalyptus that provides persistent block storage compatible with Amazon’s Elastic Block Store. euca2ools or EC2 commands can be used to manage these volumes. Here are a few euca commands for managing the volumes
+
Storage Controller adalah komponen Eucalyptus yang memberikan layanan persistent block storage yang compatible dengan Amazon Elastic Block Store. Perintah euca2ools atau EC2 dapat digunakan untuk manajemen volume. Berikut adalah beberapa perintah euca yang digunakan untuk manajemen volume
Interacting with Storage Controller
 
Linux Instances
 
  
Create a 10 GB volume
+
==Interaksi dengan Storage Controller==
  
uecadmin@client1:~$ euca-create-volume -s 10 -z mycloud
+
===Linux Instances===
VOLUME  vol-333C04B8    10      creating        2010-03-26T05:20:56.383Z
 
  
List the volumes
+
Membuat Volume 10 GB
  
uecadmin@client1:~$ euca-describe-volumes
+
uecadmin@client1:~$ euca-create-volume -s 10 -z mycloud
VOLUME  vol-333C04B8    10   mycloud  available    2010-03-26T05:20:56.383Z
+
VOLUME  vol-333C04B8    10       creating        2010-03-26T05:20:56.383Z
  
Attach a volume to a running instance
+
melihat daftar volume
  
uecadmin@client1:~$ euca-attach-volume -i i-41620887 -d /dev/sdb vol-333C04B8
+
uecadmin@client1:~$ euca-describe-volumes
 +
VOLUME  vol-333C04B8    10  mycloud  available    2010-03-26T05:20:56.383Z
  
The volumes status changes from “available” to “in-use” if it is attached properly as shown in the output of “euca-describe-volumes” below:
+
Menempelkan sebuah volume ke instance yang sedang berjalan
  
uecadmin@client1:~$ euca-describe-volumes
+
uecadmin@client1:~$ euca-attach-volume -i i-41620887 -d /dev/sdb vol-333C04B8
VOLUME  vol-333C04B8    10  mycloud in-use  2010-03-26T05:41:28.019Z
 
ATTACHMENT      vol-331F04B2    i-41620887     unknown,requested:/dev/sdb 2010-03-26T05:43:51.343Z
 
[sourcecode]
 
You can login to the instance through ssh and see the new volume as a newly attached block storage, which shows up in the example below as /dev/sdb:
 
  
[sourcecode]
+
Status volume akan berubah dari “available” ke “in-use” jika ditempelkan secara benar seperti terlihat pada keluarkan "euca-describe-volumes”
$ sudo fdisk -l
 
  
Disk /dev/sda: 2195 MB, 2195718144 bytes
+
uecadmin@client1:~$ euca-describe-volumes
4 heads, 32 sectors/track, 33504 cylinders
+
VOLUME  vol-333C04B8    10  mycloud in-use  2010-03-26T05:41:28.019Z
Units = cylinders of 128 * 512 = 65536 bytes
+
ATTACHMENT      vol-331F04B2    i-41620887      unknown,requested:/dev/sdb  2010-03-26T05:43:51.343Z
Disk identifier: 0x000adc1c
 
  
Device Boot      Start        End      Blocks  Id  System
+
Kita dapat login ke sebuah instance melalui ssh dan melihat apakah volume yang baru di tempel sebagai attached block storage (harddisk) yang baru, seperti tampak pada contoh di bawah sebagai /dev/sdb:
/dev/sda1              1      32769    2097152+  83  Linux
 
/dev/sda3          32769      33504      47071  82  Linux swap / Solaris
 
  
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
+
$ sudo fdisk -l
64 heads, 32 sectors/track, 10240 cylinders
 
Units = cylinders of 2048 * 512 = 1048576 bytes
 
Disk identifier: 0x00000000
 
  
Disk /dev/sdb doesn't contain a valid partition table
+
Disk /dev/sda: 2195 MB, 2195718144 bytes
 +
4 heads, 32 sectors/track, 33504 cylinders
 +
Units = cylinders of 128 * 512 = 65536 bytes
 +
Disk identifier: 0x000adc1c
 +
 +
  Device Boot      Start        End      Blocks  Id  System
 +
/dev/sda1              1      32769    2097152+  83  Linux
 +
/dev/sda3          32769      33504      47071  82  Linux swap / Solaris
 +
 +
Disk /dev/sdb: 10.7 GB, 10737418240 bytes
 +
64 heads, 32 sectors/track, 10240 cylinders
 +
Units = cylinders of 2048 * 512 = 1048576 bytes
 +
Disk identifier: 0x00000000
  
You can format /dev/sdb, mount it and use it as a persistent storage. It is better to unmount the volume before bringing down the instance, to avoid any data corruption.
+
Disk /dev/sdb belum berisi tabel partisi yang benar.
  
Detach a volume:
+
Kita dapat memformat /dev/sdb, mount dan menggunakan-nya sebagai harddisk. Akan lebih baik untuk unmount volume sebelum mematikan sebuah instance untuk menjaga agar tidak terjadi data corruption.
  
uecadmin@client1:~$ euca-detach-volume vol-333C04B8
+
Untuk melepas volume:
  
Windows Instances
+
uecadmin@client1:~$ euca-detach-volume vol-333C04B8
  
For windows instances, the procedure for creating the volume and attaching the volume would be the same.
+
==WS3 Storage Controller==
NOTE: Even while attaching to windows instances, the device has to be specified as /dev/sdb.
 
  
The only change is the way this disk is accessed. Once the disk is attached to a running windows instance, perform the following steps:
+
Walrus adalah storage service di Eucalyptus yang compatible dengan Amazon S3. Dengan menggunakan Walrus pengguna dapat menyimpan data yang permanen yang di organize sebagai bucket dan objek. WS3 adalah storage system pada level file, berbeda dengan Storage Controller yang merupakan storage system pada level block (harddisk / partisi).
  
    * Connect to windows instance via RDP
+
Untuk informasi pemula ada baiknya membaca Amazon S3 http://docs.amazonwebservices.com/AmazonS3/2006-03-01/gsg/.
    * Go to Start -> Run and type diskmgmt.msc without the quotes. Select OK. This opens the Disk Management console
 
    * Right click on the new disk at the bottom of the list and choose Initialize Disk
 
    * Confirm initialization
 
    * Right click on the volume and select “New Partition”
 
    * Accept the defaults or modify to suit your setup and proceed with formatting
 
  
After completion the disk management tool shows a healthy partition on the new drive.
+
Pilihan Walrus Controller dapat dimodifikasi melalui interface Web, pada halaman “Configuration” dibawah bagian “Walrus Configuration”.
  
To detach a volume from an instance use euca-detach-command command:
+
Untuk menggunakan Walrus dalam memanaje Image VM Eucalyptus, kita dapat menggunakan tool Amazon untuk store / register / delete dari Walrus. Beberapa tool third party juga dapat digunakan untuk berinteraksi secara langsung dengan Walrus.
  
uecadmin@client1:~$ euca-detach-volume vol-333C04B8
+
Tool pihak ketiga untuk berinteraksi dengan Walrus adalah,
  
Note that the volume has to unmounted before detaching it from the instance. Volume can be deleted using euca-delete-volume command:
+
* s3curl S3 Curl adalah tool command line yang di bungkus dengan curl.
 +
  http://open.eucalyptus.com/wiki/s3curl
  
uecadmin@client1:~$ euca-delete-volume vol-333C04B8
+
* s3cmd adalah tool yang memungkinkan akses command line ke penyimpanan yang mendukung API S3.
 +
  http://open.eucalyptus.com/wiki/s3cmd
  
WS3 Storage Controller
+
* s3fs adalah tool yang memungkinkan pengguna untuk mengakses bucket S3 sebagai direktori lokal.
 +
  http://open.eucalyptus.com/wiki/s3fs
  
Walrus is a storage service in Eucalyptus which is compatible with Amazon’s S3. Using Walrus users can store persistent data, which is organized as buckets and objects. WS3 is a file level storage system, as compared to the block level storage system of Storage Controller.
+
==Snapshots==
  
See Amazon’s S3 Getting Started Guide for more information http://docs.amazonwebservices.com/AmazonS3/2006-03-01/gsg/).
+
Volume yang dibuat mengunakan Block Storage dapat digunakan untuk membuat snapshot point-in-time dari volume, yang disimpan di WS3. Snapshot ini dapat digunakan sebagai titik awal dalam membuat volume Block Storage yang baru dan memproteksi data untuk jangka panjang. Snapshot yang sama dapat digunakan untuk membuat banyak volume sesuai dengan keinginan.
  
Walrus Controller options can be modified from the Web UI, on the “Configuration” page under “Walrus Configuration” section.
+
Snapshot dapat dibuat dengan mengunakan perintah euca-create-snapshot:
  
For using Walrus to manage Eucalyptus VM images, you can use Amazon’s tools to store/register/delete them from Walrus. Other third party tools can also be used to interact with Walrus directly.
+
uecadmin@client1:~$ euca-create-snapshot vol-333C04B8
Third party tools for interacting with Walrus
 
  
    * s3curl S3 Curl is a command line tool that is a wrapper around curl.
+
euca-describe-snapshots memberikan daftar snapshot yang tersedia
      http://open.eucalyptus.com/wiki/s3curl
 
  
    * s3cmd is a tool that allows command line access to storage that supports the S3 API.
+
uecadmin@client1:~$ euca-describe-snapshots
       http://open.eucalyptus.com/wiki/s3cmd
+
SNAPSHOT        snap-32A804A2  vol-333C04B8    completed       2010-04-15T13:48:32.01Z      100%
  
    * s3fs is a tool that allows users to access S3 buckets as local directories.
+
Volume dari snapshot ini dapat dibuat menggunakan snapshot id.
      http://open.eucalyptus.com/wiki/s3fs
 
  
Snapshots
+
uecadmin@client1:~$ euca-create-volume -s 10 --snapshot snap-32A804A2 --zone mycloud
  
The volumes that have been created on the Block Storage can be used to create point-in-time snapshots of volumes, which are stored on WS3. These snapshots can be used as the starting point for new Block Storage volumes and protect data for long-term durability. The same snapshot can be used to create many volumes as per requirement.
+
Mohon di catat bahwa sebuah volume hanya dapat dibuat setelah snapshot status adalah completed. Sama halnya, snapshot dari sebuah volume hanya dapat dibuat setelah status volume adalah created, tapi tidak pada saat tahapan creating atau pembuatan. Untuk men-delete snapshot:
  
Snapshots can be created by using euca-create-snapshot command:
+
uecadmin@client1:~$ euca-delete-snapshot snap-32A804A2
 
 
uecadmin@client1:~$ euca-create-snapshot vol-333C04B8
 
 
 
euca-describe-snapshots lists the available snapshots.
 
 
 
uecadmin@client1:~$ euca-describe-snapshots
 
SNAPSHOT        snap-32A804A2  vol-333C04B8    completed      2010-04-15T13:48:32.01Z      100%
 
 
 
Volumes from these snapshots can be created by using the snapshot id.
 
 
 
uecadmin@client1:~$ euca-create-volume -s 10 --snapshot snap-32A804A2 --zone mycloud
 
 
 
Please note that the volume can only be created after the snapshot status is completed. Similarly, snapshots from a volume can only be created after the volume status is created, but not during the creating stage. To delete a snapshot:
 
 
 
uecadmin@client1:~$ euca-delete-snapshot snap-32A804A2
 
  
  
Line 121: Line 99:
  
 
* http://cssoss.wordpress.com/2010/05/10/eucalyptus-beginner%E2%80%99s-guide-%E2%80%93-uec-edition-chapter-6-%E2%80%93-storage%C2%A0management/
 
* http://cssoss.wordpress.com/2010/05/10/eucalyptus-beginner%E2%80%99s-guide-%E2%80%93-uec-edition-chapter-6-%E2%80%93-storage%C2%A0management/
 +
* https://help.ubuntu.com/community/UEC/StorageController
 +
* http://docs.amazonwebservices.com/AmazonS3/2006-03-01/gsg/
  
 
==Pranala Menarik==
 
==Pranala Menarik==
  
* [[Ubuntu Enterprise Cloud: Eucalyptus Beginner’s Guide]] '''RECOMMENDED'''
+
* [[Ubuntu Enterprise Cloud: Panduan Untuk Pemula]] '''RECOMMENDED'''
 
* [[Ubuntu Enterprise Cloud: Instalasi UEC]]
 
* [[Ubuntu Enterprise Cloud: Instalasi UEC]]
 
* [[Cloud Computing]]
 
* [[Cloud Computing]]

Latest revision as of 19:32, 6 January 2011

Storage Controller

Storage Controller adalah komponen Eucalyptus yang memberikan layanan persistent block storage yang compatible dengan Amazon Elastic Block Store. Perintah euca2ools atau EC2 dapat digunakan untuk manajemen volume. Berikut adalah beberapa perintah euca yang digunakan untuk manajemen volume

Interaksi dengan Storage Controller

Linux Instances

Membuat Volume 10 GB

uecadmin@client1:~$ euca-create-volume -s 10 -z mycloud
VOLUME  vol-333C04B8    10       creating        2010-03-26T05:20:56.383Z

melihat daftar volume

uecadmin@client1:~$ euca-describe-volumes
VOLUME  vol-333C04B8    10   mycloud   available     2010-03-26T05:20:56.383Z

Menempelkan sebuah volume ke instance yang sedang berjalan

uecadmin@client1:~$ euca-attach-volume -i i-41620887 -d /dev/sdb vol-333C04B8

Status volume akan berubah dari “available” ke “in-use” jika ditempelkan secara benar seperti terlihat pada keluarkan "euca-describe-volumes”

uecadmin@client1:~$ euca-describe-volumes
VOLUME  vol-333C04B8    10  mycloud in-use  2010-03-26T05:41:28.019Z
ATTACHMENT      vol-331F04B2    i-41620887      unknown,requested:/dev/sdb  2010-03-26T05:43:51.343Z

Kita dapat login ke sebuah instance melalui ssh dan melihat apakah volume yang baru di tempel sebagai attached block storage (harddisk) yang baru, seperti tampak pada contoh di bawah sebagai /dev/sdb:

$ sudo fdisk -l
Disk /dev/sda: 2195 MB, 2195718144 bytes
4 heads, 32 sectors/track, 33504 cylinders
Units = cylinders of 128 * 512 = 65536 bytes
Disk identifier: 0x000adc1c

 Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1       32769     2097152+  83  Linux
/dev/sda3           32769       33504       47071   82  Linux swap / Solaris

Disk /dev/sdb: 10.7 GB, 10737418240 bytes
64 heads, 32 sectors/track, 10240 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x00000000

Disk /dev/sdb belum berisi tabel partisi yang benar.

Kita dapat memformat /dev/sdb, mount dan menggunakan-nya sebagai harddisk. Akan lebih baik untuk unmount volume sebelum mematikan sebuah instance untuk menjaga agar tidak terjadi data corruption.

Untuk melepas volume:

uecadmin@client1:~$ euca-detach-volume vol-333C04B8

WS3 Storage Controller

Walrus adalah storage service di Eucalyptus yang compatible dengan Amazon S3. Dengan menggunakan Walrus pengguna dapat menyimpan data yang permanen yang di organize sebagai bucket dan objek. WS3 adalah storage system pada level file, berbeda dengan Storage Controller yang merupakan storage system pada level block (harddisk / partisi).

Untuk informasi pemula ada baiknya membaca Amazon S3 http://docs.amazonwebservices.com/AmazonS3/2006-03-01/gsg/.

Pilihan Walrus Controller dapat dimodifikasi melalui interface Web, pada halaman “Configuration” dibawah bagian “Walrus Configuration”.

Untuk menggunakan Walrus dalam memanaje Image VM Eucalyptus, kita dapat menggunakan tool Amazon untuk store / register / delete dari Walrus. Beberapa tool third party juga dapat digunakan untuk berinteraksi secara langsung dengan Walrus.

Tool pihak ketiga untuk berinteraksi dengan Walrus adalah,

  • s3curl S3 Curl adalah tool command line yang di bungkus dengan curl.
 http://open.eucalyptus.com/wiki/s3curl
  • s3cmd adalah tool yang memungkinkan akses command line ke penyimpanan yang mendukung API S3.
 http://open.eucalyptus.com/wiki/s3cmd
  • s3fs adalah tool yang memungkinkan pengguna untuk mengakses bucket S3 sebagai direktori lokal.
 http://open.eucalyptus.com/wiki/s3fs

Snapshots

Volume yang dibuat mengunakan Block Storage dapat digunakan untuk membuat snapshot point-in-time dari volume, yang disimpan di WS3. Snapshot ini dapat digunakan sebagai titik awal dalam membuat volume Block Storage yang baru dan memproteksi data untuk jangka panjang. Snapshot yang sama dapat digunakan untuk membuat banyak volume sesuai dengan keinginan.

Snapshot dapat dibuat dengan mengunakan perintah euca-create-snapshot:

uecadmin@client1:~$ euca-create-snapshot vol-333C04B8

euca-describe-snapshots memberikan daftar snapshot yang tersedia

uecadmin@client1:~$ euca-describe-snapshots
SNAPSHOT        snap-32A804A2   vol-333C04B8    completed       2010-04-15T13:48:32.01Z      100%

Volume dari snapshot ini dapat dibuat menggunakan snapshot id.

uecadmin@client1:~$ euca-create-volume -s 10 --snapshot snap-32A804A2 --zone mycloud

Mohon di catat bahwa sebuah volume hanya dapat dibuat setelah snapshot status adalah completed. Sama halnya, snapshot dari sebuah volume hanya dapat dibuat setelah status volume adalah created, tapi tidak pada saat tahapan creating atau pembuatan. Untuk men-delete snapshot:

uecadmin@client1:~$ euca-delete-snapshot snap-32A804A2


Referensi

Pranala Menarik