Block Volume 생성
Block 볼륨을 생성합니다.
인스턴스에 Block Volume Attache
인스턴스에 생성한 Block Volume을 부착합니다.
iSCSI Commands
Connect 명령어를 통해서 연결 합니다.
sudo iscsiadm -m node -o new -T ~~
sudo iscsiadm -m node -o update -T ~~
sudo iscsiadm -m node -T iqn ~~
#확인
ls -l /dev/oracleoci/oraclevd*
lrwxrwxrwx. 1 root root 6 Nov 27 03:17 /dev/oracleoci/oraclevda -> ../sda
lrwxrwxrwx. 1 root root 7 Nov 27 03:16 /dev/oracleoci/oraclevda1 -> ../sda1
lrwxrwxrwx. 1 root root 7 Nov 27 03:16 /dev/oracleoci/oraclevda2 -> ../sda2
lrwxrwxrwx. 1 root root 7 Nov 27 03:16 /dev/oracleoci/oraclevda3 -> ../sda3
lrwxrwxrwx. 1 root root 6 Nov 27 04:26 /dev/oracleoci/oraclevdb -> ../sdb
#파일시스템
sudo mkfs -t ext4 /dev/oracleoci/oraclevdb
# 마운트
sudo mkdir /mnt/disk1
sudo mount /dev/oracleoci/oraclevdb /mnt/disk1
[root@webserver1 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
devtmpfs 423M 0 423M 0% /dev
tmpfs 469M 0 469M 0% /dev/shm
tmpfs 469M 19M 450M 4% /run
tmpfs 469M 0 469M 0% /sys/fs/cgroup
/dev/mapper/ocivolume-root 36G 8.2G 28G 23% /
/dev/mapper/ocivolume-oled 10G 198M 9.8G 2% /var/oled
/dev/sda2 1014M 608M 407M 60% /boot
/dev/sda1 100M 5.1M 95M 6% /boot/efi
tmpfs 94M 0 94M 0% /run/user/0
tmpfs 94M 0 94M 0% /run/user/1000
tmpfs 94M 0 94M 0% /run/user/987
/dev/sdb 49G 24K 47G 1% /mnt/disk1
영구 마운트
ls -l /dev/oracleoci/oraclevd*
#Find the SCSI ID for the newly attached volume
sudo ls -l /dev/disk/by-id
/dev/disk/by-id/scsi-3606ca174d8444123a549764ce1085fb5
vim /etc/fstab
/dev/disk/by-id/scsi-3606ca174d8444123a549764ce1085fb5 /mnt/disk1 ext4 _netdev,nofail 0 0
Following are descriptions of these field values:
- Device: Specified using the SCSI ID:
- /dev/disk/by-id/scsi-3606ca174d8444123a549764ce1085fb5
- Mount point: The mount point created in the previous step: /mnt/volume1
- Type: The type of file system: ext4 in this example.
- Options:
- _netdev – Configures the mount process to initiate before the volumes are mounted.
- nofail – If the device does not exist, no errors are reported. This is a good option to use when an instance is used to create a custom image. Future instances created with that image will not include the block volume and might fail to boot without this option.
- Dump: The value 0 means do not use the obsolete dump utility.
- fsck: The value 0 means do not run fsck.
sudo mount -a
mount | grep /mnt
'CSP (Cloud Service Provider) > OCI' 카테고리의 다른 글
[OCI] 대시보드 확인 (0) | 2024.01.14 |
---|---|
OCI firewalld (0) | 2023.12.31 |
댓글