Pembahasan untuk LAB 2 ini kita akan membahas lebih spesifik ke Block Storage dan Object Storage.
Sebelum nya Anda harus coba LAB 1 Terlebih dahulu
[Block Storage]
Komponen pada Cinder (Block Storage) diantaranya adalah
- Cinder API Berfungsi untuk merespon permintaan dan menempatkan permintaan tersebut dalam antrian pesan (message queue – RabbitMQ)
- Cinder Backup Berfungsi untuk membackup sebuah volume block storage ke repository penyimpanan eksternal
- Cinder Scheduler berfungsi memberikan tugas ke antrian (dalam hal ini yaitu message queue- RabbitMQ) dan menentukan provisioning volume server
- Cinder Volume berfungsi untuk mengarahkan penyimpanan sebuah instance/VMs
sebelum kita menginstall cinder untuk service block storage, kita harus buat dulu sebuah partisi LVM
Pembuatan Partisi LVM
1 2 3 4 5 6 7 8 9 10 11 12 |
pod14:~/leap42-newton-aio-master # fdisk -l Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 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 Disklabel type: dos Disk identifier: 0x0001e1a3 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 33560575 33558528 16G 83 Linux /dev/sda2 33560576 41945087 8384512 4G 82 Linux swap / Solaris /dev/sda3 41945088 62914559 20969472 10G f W95 Ext'd (LBA) |
setelah dilakukan fdisk -l ternyata kita memiliki hardisk /dev/sda, maka selanjutnya kita langsung masuk saja ke hardisk tersebut dengan cara fdisk /dev/sda.
1 2 3 4 5 6 7 8 |
pod14:~/leap42-newton-aio-master # fdisk /dev/sda Welcome to fdisk (util-linux 2.28). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): |
jika belum paham command di fdisk bisa ketikan m untuk membuka menu help, kemudian tekan n (untuk membuat partisi baru), untuk first sectornya (enter) , Last Sectornya (+5G) untuk memberikan kapasitas 5GB pada partisi yang kita buat ini.
1 2 3 4 5 6 7 |
Command (m for help): n All space for primary partitions is in use. Adding logical partition 5 First sector (41947136-62914559, default 41947136): Last sector, +sectors or +size{K,M,G,T,P} (41947136-62914559, default 62914559): +5G Created a new partition 5 of type 'Linux' and of size 5 GiB. |
kemudian kita ketik p untuk melihat semua partisi
1 2 3 4 5 6 7 8 9 10 11 12 13 |
Command (m for help): p Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 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 Disklabel type: dos Disk identifier: 0x0001e1a3 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 33560575 33558528 16G 83 Linux /dev/sda2 33560576 41945087 8384512 4G 82 Linux swap / Solaris /dev/sda3 41945088 62914559 20969472 10G f W95 Ext'd (LBA) /dev/sda5 41947136 52432895 10485760 5G 83 Linux |
ternyata partisi yang kita buat typenya Linux, padahal kita pinginnya LVM, ketikan t untuk mengubah type partisi, kemudian masukan nomornya yaitu 5 (/dev/sda5) , jika tidak hafal kodenya ketikan L, kemudian pilih 8e
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
Command (m for help): t Partition number (1-3,5, default 5): 5 Partition type (type L to list all types): L 0 Empty 24 NEC DOS 81 Minix / old Lin bf Solaris 1 FAT12 27 Hidden NTFS Win 82 Linux swap / So c1 DRDOS/sec (FAT- 2 XENIX root 39 Plan 9 83 Linux c4 DRDOS/sec (FAT- 3 XENIX usr 3c PartitionMagic 84 OS/2 hidden or c6 DRDOS/sec (FAT- 4 FAT16 <32M 40 Venix 80286 85 Linux extended c7 Syrinx 5 Extended 41 PPC PReP Boot 86 NTFS volume set da Non-FS data 6 FAT16 42 SFS 87 NTFS volume set db CP/M / CTOS / . 7 HPFS/NTFS/exFAT 4d QNX4.x 88 Linux plaintext de Dell Utility 8 AIX 4e QNX4.x 2nd part 8e Linux LVM df BootIt 9 AIX bootable 4f QNX4.x 3rd part 93 Amoeba e1 DOS access a OS/2 Boot Manag 50 OnTrack DM 94 Amoeba BBT e3 DOS R/O b W95 FAT32 51 OnTrack DM6 Aux 9f BSD/OS e4 SpeedStor c W95 FAT32 (LBA) 52 CP/M a0 IBM Thinkpad hi ea Rufus alignment e W95 FAT16 (LBA) 53 OnTrack DM6 Aux a5 FreeBSD eb BeOS fs f W95 Ext'd (LBA) 54 OnTrackDM6 a6 OpenBSD ee GPT 10 OPUS 55 EZ-Drive a7 NeXTSTEP ef EFI (FAT-12/16/ 11 Hidden FAT12 56 Golden Bow a8 Darwin UFS f0 Linux/PA-RISC b 12 Compaq diagnost 5c Priam Edisk a9 NetBSD f1 SpeedStor 14 Hidden FAT16 <3 61 SpeedStor ab Darwin boot f4 SpeedStor 16 Hidden FAT16 63 GNU HURD or Sys af HFS / HFS+ f2 DOS secondary 17 Hidden HPFS/NTF 64 Novell Netware b7 BSDI fs fb VMware VMFS 18 AST SmartSleep 65 Novell Netware b8 BSDI swap fc VMware VMKCORE 1b Hidden W95 FAT3 70 DiskSecure Mult bb Boot Wizard hid fd Linux raid auto 1c Hidden W95 FAT3 75 PC/IX bc Acronis FAT32 L fe LANstep 1e Hidden W95 FAT1 80 Old Minix be Solaris boot ff BBT Partition type (type L to list all types): 8e Changed type of partition 'Linux' to 'Linux LVM'. |
setelah itu kita verifikasi lagi, dengan command p
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
Command (m for help): p Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 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 Disklabel type: dos Disk identifier: 0x0001e1a3 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 33560575 33558528 16G 83 Linux /dev/sda2 33560576 41945087 8384512 4G 82 Linux swap / Solaris /dev/sda3 41945088 62914559 20969472 10G f W95 Ext'd (LBA) /dev/sda5 41947136 52432895 10485760 5G 8e Linux LVM |
Oke, sekarang partisi /dev/sda5 sudah menjadi Linux LVM. kemudian disave settingannya dengan command w
1 2 3 4 5 6 |
Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: Device or resource busy 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). |
karena kita membuat partisi pada system yang sedang berjalan maka kita harus mereboot os atau mengetikan partprobe
sebelumnya kita harus mengecek posisi hardisk kita berada dimana dengan cara seperti ini
1 2 |
pod14:~/leap42-newton-aio-master # lsblk | head -3 | tail -1 | cut -d" " -f1 sda |
dari hasil diatas maka posisi harisk sda berada head -3 dan tail -1, maka rubah script 06-cinder.sh untuk posisinya
- setelah itu jalanakn script 06-cinder.sh
1 |
pod14:~/leap42-newton-aio-master # ./06-cinder.sh |
pada file 06-cinder.sh terdapat beberapa komponen yang diinstall diantaranya adalah cinder-api, cinder-scheduler, qemu, lvm2 dan cinder-volume.
pastikan ketikan menjalankan script tidak ada yang error, kemudian verifikasi service dibawah ini
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 |
pod14:~/leap42-newton-aio-master # systemctl status openstack-cinder-api.service ● openstack-cinder-api.service - LSB: OpenStack Block Storage (Cinder) - api Loaded: loaded (/etc/init.d/openstack-cinder-api; bad; vendor preset: disabled) Active: active (exited) since Sel 2016-11-22 18:57:23 WIB; 37min ago Docs: man:systemd-sysv-generator(8) Process: 11493 ExecStop=/etc/init.d/openstack-cinder-api stop (code=exited, status=0/SUCCESS) Process: 11576 ExecStart=/etc/init.d/openstack-cinder-api start (code=exited, status=0/SUCCESS) Nov 22 18:57:17 pod14 systemd[1]: Starting LSB: OpenStack Block Storage (Cinder) - api... Nov 22 18:57:17 pod14 su[11605]: (to cinder) root on none Nov 22 18:57:17 pod14 su[11605]: pam_unix(su:session): session opened for user cinder by (uid=0) Nov 22 18:57:21 pod14 openstack-cinder-api[11576]: Checking for DB MigrationsOption "verbose" from group "DEFAULT" is deprecated for ...future. Nov 22 18:57:22 pod14 openstack-cinder-api[11576]: ..done Nov 22 18:57:22 pod14 su[11647]: (to cinder) root on none Nov 22 18:57:22 pod14 su[11647]: pam_unix(su:session): session opened for user cinder by (uid=0) Nov 22 18:57:23 pod14 openstack-cinder-api[11576]: Starting cinder-api..done Nov 22 18:57:23 pod14 systemd[1]: Started LSB: OpenStack Block Storage (Cinder) - api. Hint: Some lines were ellipsized, use -l to show in full. pod14:~/leap42-newton-aio-master # systemctl status openstack-cinder-scheduler.service ● openstack-cinder-scheduler.service - LSB: OpenStack Block Storage (Cinder) - scheduler Loaded: loaded (/etc/init.d/openstack-cinder-scheduler; bad; vendor preset: disabled) Active: active (exited) since Sel 2016-11-22 18:57:18 WIB; 38min ago Docs: man:systemd-sysv-generator(8) Process: 11503 ExecStop=/etc/init.d/openstack-cinder-scheduler stop (code=exited, status=0/SUCCESS) Process: 11579 ExecStart=/etc/init.d/openstack-cinder-scheduler start (code=exited, status=0/SUCCESS) Nov 22 18:57:17 pod14 systemd[1]: Starting LSB: OpenStack Block Storage (Cinder) - scheduler... Nov 22 18:57:17 pod14 su[11607]: (to cinder) root on none Nov 22 18:57:17 pod14 su[11607]: pam_unix(su:session): session opened for user cinder by (uid=0) Nov 22 18:57:18 pod14 systemd[1]: Started LSB: OpenStack Block Storage (Cinder) - scheduler. Nov 22 18:57:18 pod14 openstack-cinder-scheduler[11579]: Starting cinder-scheduler..done pod14:~/leap42-newton-aio-master # systemctl status openstack-cinder-volume.service ● openstack-cinder-volume.service - LSB: OpenStack Block Storage (Cinder) - volume Loaded: loaded (/etc/init.d/openstack-cinder-volume; bad; vendor preset: disabled) Active: active (exited) since Sel 2016-11-22 18:57:18 WIB; 38min ago Docs: man:systemd-sysv-generator(8) Process: 11506 ExecStop=/etc/init.d/openstack-cinder-volume stop (code=exited, status=0/SUCCESS) Process: 11580 ExecStart=/etc/init.d/openstack-cinder-volume start (code=exited, status=0/SUCCESS) Nov 22 18:57:17 pod14 systemd[1]: Starting LSB: OpenStack Block Storage (Cinder) - volume... Nov 22 18:57:17 pod14 su[11606]: (to cinder) root on none Nov 22 18:57:17 pod14 su[11606]: pam_unix(su:session): session opened for user cinder by (uid=0) Nov 22 18:57:18 pod14 openstack-cinder-volume[11580]: Starting cinder-volume..done Nov 22 18:57:18 pod14 systemd[1]: Started LSB: OpenStack Block Storage (Cinder) - volume. pod14:~/leap42-newton-aio-master # systemctl status tgtd.service ● tgtd.service - iSCSI target framework daemon Loaded: loaded (/usr/lib/systemd/system/tgtd.service; enabled; vendor preset: disabled) Active: active (running) since Sel 2016-11-22 18:57:17 WIB; 38min ago Docs: man:tgtd(8) Process: 11554 ExecStop=/usr/sbin/tgtadm --op delete --mode system (code=exited, status=0/SUCCESS) Process: 11549 ExecStop=/usr/sbin/tgt-admin --update ALL -c /dev/null -f (code=exited, status=0/SUCCESS) Process: 11539 ExecStop=/usr/sbin/tgt-admin --offline ALL (code=exited, status=0/SUCCESS) Process: 11535 ExecStop=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS) Process: 11567 ExecStartPost=/usr/sbin/tgt-admin -e -c ${TGTD_CONFIG} (code=exited, status=0/SUCCESS) Process: 11564 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v ready (code=exited, status=0/SUCCESS) Process: 11561 ExecStartPost=/usr/sbin/tgtadm --op update --mode sys --name State -v offline (code=exited, status=0/SUCCESS) Main PID: 11558 (tgtd) Status: "Starting event loop..." Tasks: 1 (limit: 512) CGroup: /system.slice/tgtd.service └─11558 /usr/sbin/tgtd -f Nov 22 18:57:17 pod14 systemd[1]: Starting iSCSI target framework daemon... Nov 22 18:57:17 pod14 tgtd[11558]: tgtd: work_timer_start(146) use timer_fd based scheduler Nov 22 18:57:17 pod14 tgtd[11558]: tgtd: bs_init(391) use signalfd notification Nov 22 18:57:17 pod14 systemd[1]: Started iSCSI target framework daemon. |
pastikan keempat service diatas semuanya aktif, kemudian verifikasi volume service
1 2 3 4 5 6 7 |
pod14:~/leap42-newton-aio-master # openstack volume service list +------------------+-----------+------+---------+-------+----------------------------+ | Binary | Host | Zone | Status | State | Updated At | +------------------+-----------+------+---------+-------+----------------------------+ | cinder-scheduler | pod14 | nova | enabled | up | 2016-11-22T12:37:54.000000 | | cinder-volume | pod14@lvm | nova | enabled | up | 2016-11-22T12:37:48.000000 | +------------------+-----------+------+---------+-------+----------------------------+ |
jika ada 2 service yang up maka cinder telah sukses di install
untuk mengecek physical volume dan volume group bisa dengan perintah dibawah ini
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 |
pod14:~/leap42-newton-aio-master # pvdisplay --- Physical volume --- PV Name /dev/sda5 VG Name cinder-volumes PV Size 5,00 GiB / not usable 4,00 MiB Allocatable yes PE Size 4,00 MiB Total PE 1279 Free PE 1279 Allocated PE 0 PV UUID xL75YI-F83A-says-Ojmw-g9iO-Sfrp-U7l4LF pod14:~/leap42-newton-aio-master # vgdisplay --- Volume group --- VG Name cinder-volumes System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 5 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 5,00 GiB PE Size 4,00 MiB Total PE 1279 Alloc PE / Size 0 / 0 Free PE / Size 1279 / 5,00 GiB VG UUID pyTzOD-MahT-sZHi-r9HA-iflo-ncpT-j0a5dj |
kemudian testing via Dashbaord
Project => Compute => Volumes => Create Volume
kemudian liat hasilnya seperti ini
jika pada status Available maka, pembuatan volume berhasil, ketika dicek dengan vgs maka Freenya tinggal 4GB
1 2 3 |
pod14:~/leap42-newton-aio-master # pvs PV VG Fmt Attr PSize PFree /dev/sda5 cinder-volumes lvm2 a-- 5,00g 4,00g |
- Attach vol0 ke vm01
caranya cukup mudah, masuk ke Project => Compute => Instance => pilih vm yang mau di attach volume
kemudian liat informasinya klik vm0-1 kemudian pilih overview
- Membuat instance dari Volume Source image
membuat volume dengan ukuran 1GB didalamnya terdapat image cirros
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
pod14:~/leap42-newton-aio-master # openstack volume create --image cirros --size 1 vol2 +---------------------+--------------------------------------+ | Field | Value | +---------------------+--------------------------------------+ | attachments | [] | | availability_zone | nova | | bootable | false | | consistencygroup_id | None | | created_at | 2016-11-22T13:52:22.423243 | | description | None | | encrypted | False | | id | e8d5e1be-8c0e-4587-8ec9-08fa1dab46ee | | migration_status | None | | multiattach | False | | name | vol2 | | properties | | | replication_status | disabled | | size | 1 | | snapshot_id | None | | source_volid | None | | status | creating | | type | None | | updated_at | None | | user_id | 9bd01f6019224498b54ab715a3c299a4 | +---------------------+--------------------------------------+ |
kemudian melihat jarinagn yang dimiliki dengan cara neutron net-list
1 2 3 4 5 6 7 |
pod14:~/leap42-newton-aio-master # neutron net-list +--------------------------------------+----------+------------------------------------------------------+ | id | name | subnets | +--------------------------------------+----------+------------------------------------------------------+ | d567b3a0-683f-40a4-b797-e4306cb7779e | net-int0 | 3e6598e8-7755-4a4e-8df2-51972ed12b43 192.168.10.0/24 | | daad545d-dbd3-4a85-a5e9-e957b961a53c | ext-net | de73a628-d200-45c5-83d3-3a65edeff442 10.88.88.0/24 | +--------------------------------------+----------+------------------------------------------------------+ |
kemudian membuat sebuah instance dengan nama vm1 dengan flavor m1.tiny kemudian hardisknya volume vol2 dan networknya terhubung dengan net-int0
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 |
pod14:~/leap42-newton-aio-master # openstack server create --flavor m1.tiny --volume vol2 --nic net-id=d567b3a0-683f-40a4-b797-e4306cb7779e vm1+--------------------------------------+----------------------------------------------------+ | Field | Value | +--------------------------------------+----------------------------------------------------+ | OS-DCF:diskConfig | MANUAL | | OS-EXT-AZ:availability_zone | | | OS-EXT-SRV-ATTR:host | None | | OS-EXT-SRV-ATTR:hypervisor_hostname | None | | OS-EXT-SRV-ATTR:instance_name | instance-00000005 | | OS-EXT-STS:power_state | NOSTATE | | OS-EXT-STS:task_state | None | | OS-EXT-STS:vm_state | building | | OS-SRV-USG:launched_at | None | | OS-SRV-USG:terminated_at | None | | accessIPv4 | | | accessIPv6 | | | addresses | | | adminPass | PKsURy835gwK | | config_drive | | | created | 2016-11-22T13:55:53Z | | flavor | m1.tiny (8667b457-8acd-4a24-a174-693587147cb9) | | hostId | | | id | c1ddbc4a-3b2e-4b21-b8c2-b08010bfa1e6 | | image | | | key_name | None | | name | vm1 | | os-extended-volumes:volumes_attached | [{u'id': u'e8d5e1be-8c0e-4587-8ec9-08fa1dab46ee'}] | | progress | 0 | | project_id | 60e599cfb83b4856b0aaf20f1153f877 | | properties | | | security_groups | [{u'name': u'default'}] | | status | BUILD | | updated | 2016-11-22T13:55:54Z | | user_id | 9bd01f6019224498b54ab715a3c299a4 | +--------------------------------------+----------------------------------------------------+ |
- Mengecek instance yang kita punya
1 2 3 4 5 6 7 8 |
pod14:~/leap42-newton-aio-master # openstack server list +--------------------------------------+-------+--------+--------------------------------------+------------+ | ID | Name | Status | Networks | Image Name | +--------------------------------------+-------+--------+--------------------------------------+------------+ | c1ddbc4a-3b2e-4b21-b8c2-b08010bfa1e6 | vm1 | ACTIVE | net-int0=192.168.10.16 | | | 6c5a8f09-2d56-4812-b2f3-e0a2ac67a44f | vm0-2 | ACTIVE | net-int0=192.168.10.13, 10.88.88.146 | cirros | | 6cad17b7-13a3-49c6-8de6-e6b54aff7baf | vm0-1 | ACTIVE | net-int0=192.168.10.18, 10.88.88.141 | cirros | +--------------------------------------+-------+--------+--------------------------------------+------------+ |
dengan itu maka, imagenya tersimpan pada sebuah block storage. ini cukup direkomendasikan.
- perbedaan instace yang pake volume sama yang tidak pakai
1 2 3 4 5 6 7 8 9 |
pod14:~/leap42-newton-aio-master # ls -lh /var/lib/nova/instances/6cad17b7-13a3-49c6-8de6-e6b54aff7baf/ total 2,6M -rw-r--r-- 1 nova qemu 20K Nov 22 20:33 console.log -rw-r--r-- 1 qemu qemu 2,6M Nov 22 20:33 disk -rw-r--r-- 1 nova nova 79 Nov 20 17:58 disk.info pod14:~/leap42-newton-aio-master # ls -lh /var/lib/nova/instances/c1ddbc4a-3b2e-4b21-b8c2-b08010bfa1e6/ total 20K -rw-r--r-- 1 qemu qemu 19K Nov 22 20:57 console.log |
dari hasil itu sudah kelihatan yang atas dia tidak pakai volume sedangkan yang bawah mengunakan volume yang dalamnya ada image cirros, yang memakai volume tidak ada disk ataupun disk.info hanya ada console.log
[Object Storage]
komponen Swift diantanya seperti dibawah ini
- Swift Account berfungsi untuk menangani daftar container dengan akun database
- Swift Container berfungsi untuk menangani daftar objek yang didalamnya ada container khusus dengan akun database
- Swift Object berfungsi untuk store, retrive dan delete objek
- Swift Proxy berfungsi untuk mengekspos API publik, menyediakan otentikasi, dan permintaan rute.
- Swift Auditor berfungsi untuk memverifikasi integrasi akun, container, objek, dan melindungi terhadap corrupt data
- Swift Replicator berfungsi untuk memastikan replikasi konsisten dan tersedia diseluruh cluster secara cepat termasuk garbage collcation
- Swift Updater berfungsi untuk mengidentifikasi dan retries gagal update
Swift atau Service Object Storage adalah suatu layanan seperti Drobox atau google drive, kita dapat menyimpan data berupa file, .iso dan lain”
sebelum kita menginstall swift untuk service object storage, kita harus buat dulu sebuah partisi linux
Pembuatan Partisi Linux
masuk ke partisi dengan cara fdisk /dev/sda kemudian ketikan p untuk melihat semua partisi
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
pod14:~/leap42-newton-aio-master # fdisk /dev/sda Welcome to fdisk (util-linux 2.28). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 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 Disklabel type: dos Disk identifier: 0x0001e1a3 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 33560575 33558528 16G 83 Linux /dev/sda2 33560576 41945087 8384512 4G 82 Linux swap / Solaris /dev/sda3 41945088 62914559 20969472 10G f W95 Ext'd (LBA) /dev/sda5 41947136 52432895 10485760 5G 8e Linux LVM |
kita akan membuat 3 partisi dengan masing-masing 1 GB, metode sama seperti tadi waktu create partisi di block storage
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
Command (m for help): n All space for primary partitions is in use. Adding logical partition 6 First sector (52434944-62914559, default 52434944): Last sector, +sectors or +size{K,M,G,T,P} (52434944-62914559, default 62914559): +1G Created a new partition 6 of type 'Linux' and of size 1 GiB. Command (m for help): n All space for primary partitions is in use. Adding logical partition 7 First sector (54534144-62914559, default 54534144): Last sector, +sectors or +size{K,M,G,T,P} (54534144-62914559, default 62914559): +1G Created a new partition 7 of type 'Linux' and of size 1 GiB. Command (m for help): n All space for primary partitions is in use. Adding logical partition 8 First sector (56633344-62914559, default 56633344): Last sector, +sectors or +size{K,M,G,T,P} (56633344-62914559, default 62914559): +1G Created a new partition 8 of type 'Linux' and of size 1 GiB. |
kemudia melihat total partisi dengan menekat tombol p
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
Command (m for help): p Disk /dev/sda: 30 GiB, 32212254720 bytes, 62914560 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 Disklabel type: dos Disk identifier: 0x0001e1a3 Device Boot Start End Sectors Size Id Type /dev/sda1 * 2048 33560575 33558528 16G 83 Linux /dev/sda2 33560576 41945087 8384512 4G 82 Linux swap / Solaris /dev/sda3 41945088 62914559 20969472 10G f W95 Ext'd (LBA) /dev/sda5 41947136 52432895 10485760 5G 8e Linux LVM /dev/sda6 52434944 54532095 2097152 1G 83 Linux /dev/sda7 54534144 56631295 2097152 1G 83 Linux /dev/sda8 56633344 58730495 2097152 1G 83 Linux |
kemudian tekan tombol w untuk menyimpan hasil konfigurasi partisi
1 2 3 4 5 6 |
Command (m for help): w The partition table has been altered. Calling ioctl() to re-read partition table. Re-reading the partition table failed.: Device or resource busy 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). |
akan muncul error, tapi tidak apa-apa nanti kita jalankan partprobe.
1 |
pod14:~/leap42-newton-aio-master # partprobe |
sebelumnya kita harus mengecek posisi hardisk kita berada dimana dengan cara seperti ini
1 2 |
pod14:~/leap42-newton-aio-master # lsblk | head -3 | tail -1 | cut -d" " -f1 sda |
dari hasil diatas maka posisi harisk sda berada head -3 dan tail -1, maka rubah script 07-swift.sh untuk posisinya
- setelah itu jalanakn script 07-swift.sh
1 |
pod14:~/leap42-newton-aio-master # ./07-swift.sh |
setelah selesai install swift maka pastikan semua service pada swift sudah jalan
kemudian cek status swiftnya
1 2 3 4 5 6 7 8 9 10 11 12 13 |
pod14:~/leap42-newton-aio-master # swift stat Account: AUTH_60e599cfb83b4856b0aaf20f1153f877 Containers: 1 Objects: 3 Bytes: 942 Containers in policy "policy-0": 1 Objects in policy "policy-0": 3 Bytes in policy "policy-0": 942 X-Account-Project-Domain-Id: default X-Timestamp: 1479547625.57986 X-Trans-Id: txa18e467a89aa4428ad9a5-0058345ef4 Content-Type: text/plain; charset=utf-8 Accept-Ranges: bytes |
jika ingin menyimpan data bisa ke Project => Object Store => Container => kemudian klik +Container => masukan nama container
container disini itu sebenarnya hanya sebuah folder , kemudian nanti ada file sebagai objeknya.
disitu contohnya saya membuat sebuah folder namanya rcn, kemuian dialamnya saya upload file skripsi.
nantinya file skripsi ini akan di replikasi ke 3 partisi yang sudah kita buat tadi.
Oke sekian dulu untuk tutorial LAB2 ini semoga bermanfaat
wassalamualaikum…..
System Engineer
Komentar