강좌
클라우드/리눅스에 관한 강좌입니다.
클라우드 분류

네이버클라우드 실무사용법010 : Storage 사용하기 위한 설정

작성자 정보

  • 관리자 작성
  • 작성일

컨텐츠 정보

본문

실습. 스토리지 사용하기 위한 설정

 

1.디스크 장착확인



먼저 앞의 Storage를 생성하고 나면 다음과 같이 해당 서버에서 lsblk명령어로 장착되어 있는 3개의 스토리지를 확인할 수 있다.

 

[root@ss-test-linux01 log]# lsblk

NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

xvda    202:0    0  50G  0 disk

├─xvda1 202:1    0   1G  0 part /boot

└─xvda2 202:2    0  49G  0 part /

xvdb    202:16   0  10G  0 disk

xvdc    202:32   0  10G  0 disk

xvdd    202:48   0  10G  0 disk

[root@ss-test-linux01 log]#

 


2.마운트포인트 생성


[root@ss-test-linux01 log]# mkdir /disk1

 


3.파티션 작업


[root@ss-test-linux01 log]# fdisk /dev/xvdb

 

Welcome to fdisk (util-linux 2.32.1).

Changes will remain in memory only, until you decide to write them.

Be careful before using the write command.

 

Device does not contain a recognized partition table.

Created a new DOS disklabel with disk identifier 0x0ee5a53a.

 

Command (m for help): n

Partition type

   p   primary (0 primary, 0 extended, 4 free)

   e   extended (container for logical partitions)

Select (default p): p

Partition number (1-4, default 1):1

First sector (2048-20971519, default 2048):

Last sector, +sectors or +size{K,M,G,T,P} (2048-20971519, default 20971519):

 

Created a new partition 1 of type 'Linux' and of size 10 GiB.

 

Command (m for help): w

The partition table has been altered.

Calling ioctl() to re-read partition table.

Syncing disks.

 

[root@ss-test-linux01 log]#


 

위와 같이 파티션작업을 하고 나면 lsblk로 확인해 보면 다음과 같이 파티셔닝 된 것을 확인할 수 있다.


 

[root@ss-test-linux01 log]# lsblk

NAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

xvda    202:0    0  50G  0 disk

├─xvda1 202:1    0   1G  0 part /boot

└─xvda2 202:2    0  49G  0 part /

xvdb    202:16   0  10G  0 disk

└─xvdb1 202:17   0  10G  0 part

xvdc    202:32   0  10G  0 disk

xvdd    202:48   0  10G  0 disk

[root@ss-test-linux01 log]#

 

4. 파일시스템 생성(포맷)

[root@ss-test-linux01 log]# mkfs.ext4 /dev/xvdb1

mke2fs 1.45.6 (20-Mar-2020)

Creating filesystem with 2621184 4k blocks and 655360 inodes

Filesystem UUID: 7c361dc3-e3b0-419f-bc20-62f8988340c5

Superblock backups stored on blocks:

        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632

 

Allocating group tables: done

Writing inode tables: done

Creating journal (16384 blocks): done

Writing superblocks and filesystem accounting information: done

 

[root@ss-test-linux01 log]#

 


5. 마운트하고 확인하기


[root@ss-test-linux01 log]# mount /dev/xvdb1 /disk1

[root@ss-test-linux01 log]#

[root@ss-test-linux01 log]# df

Filesystem     1K-blocks    Used Available Use% Mounted on

devtmpfs         1881300       0   1881300   0% /dev

tmpfs            1899800       0   1899800   0% /dev/shm

tmpfs            1899800    8684   1891116   1% /run

tmpfs            1899800       0   1899800   0% /sys/fs/cgroup

/dev/xvda2      51354116 3649056  47705060   8% /

/dev/xvda1       1038336  257140    781196  25% /boot

tmpfs             379960       0    379960   0% /run/user/0

/dev/xvdb1      10254612   36888   9677104   1% /disk1

[root@ss-test-linux01 log]#

 

 

 

이제 부터는 /disk1을 맘껏 사용할 수 있다.

 

관련자료

댓글 0
등록된 댓글이 없습니다.

공지사항


뉴스광장


  • 현재 회원수 :  60,035 명
  • 현재 강좌수 :  35,791 개
  • 현재 접속자 :  164 명