(인스턴스실행) 5. 블록 스토리지
페이지 정보
작성자 jkchoi 작성일 24-06-28 16:06 조회 842 댓글 0본문
볼륨생성
1. 데모 자격 증명을 소싱하여 관리가 아닌 프로젝트로서 다음 단계를 수행합니다.
$ . demo-openrc
2. 1GB 볼륨을 생성
$ openstack volume create --size 1 volume1
+----------------------+-----------------------------------------------+
| Field | Value |
+----------------------+-----------------------------------------------+
| attachments | [] |
| availability_zone | nova |
| bootable | false |
| consistencygroup_id | None |
| created_at | 2016-03-08T14:30:48.391027 |
| description | None |
| encrypted | False |
| id | a1e8be72-a395-4a6f-8e07-856a57c39524 |
| multiattach | False |
| name | volume1 |
| properties | |
| replication_status | disabled |
| size | 1 |
| snapshot_id | None |
| source_volid | None |
| status | creating |
| type | None |
| updated_at | None |
| user_id | 684286a9079845359882afc3aa5011fb |
+----------------------+------------------------------------------------+
3. 잠시 후 상태가 creating 에서 available로 바뀝니다.
$ openstack volume list
+----------------------------------------------+----------------+-----------+------+--------------+
| ID | Display Name | Status | Size | Attached to |
+----------------------------------------------+----------------+-----------+------+--------------+
| a1e8be72-a395-4a6f-8e07-856a57c39524 | volume1 | available | 1 | |
+----------------------------------------------+----------------+-----------+------+--------------+
인스턴스에 볼륨 연결하기
1. 인스턴스에 볼륨을 연결합니다.
$ openstack server add volume INSTANCE_NAME VOLUME_NAME
- 예시)
volume1 불륨을 provider-instance 인스턴스에 연결할 때
$ openstack server add volume provider-instance volume1
2. 볼륨 목록
$ openstack volume list
+----------------------------------------------+----------------+--------+------+-------------------------------------------------+
| ID | Display Name | Status | Size | Attached to |
+----------------------------------------------+----------------+--------+------+-------------------------------------------------+
| a1e8be72-a395-4a6f-8e07-856a57c39524 | volume1 | in-use | 1 | Attached to provider-instance on /dev/vdb |
+----------------------------------------------+----------------+--------+------+--------------------------------------------------+
3. SSH를 사용하여 인스턴스에 액세스하고 fdisk 명령을 사용하여 볼륨이 /dev/vdb 블록 저장 장치로 있는지 확인합니다.
$ sudo fdisk -l
Disk /dev/vda: 1073 MB, 1073741824 bytes
255 heads, 63 sectors/track, 130 cylinders, total 2097152 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
Device Boot Start End Blocks Id System
/dev/vda1 * 16065 2088449 1036192+ 83 Linux
Disk /dev/vdb: 1073 MB, 1073741824 bytes
16 heads, 63 sectors/track, 2080 cylinders, total 2097152 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/vdb doesn't contain a valid partition table
댓글목록 0
등록된 댓글이 없습니다.