Disk

Disk 접근 방법

VPS 처음 만드실 때 다음과 같은 OS 템플릿을 기반으로 생성하셨다면 할당된 추가 디스크 공간은 /dev/vdb 에 있습니다.

  • CentOS 6

직접 디바이스를 format 및 mount 하셔야 합니다. 아래의 예제는 /dev/vdb 장치를 /data 디렉토리에 ext4 파일 시스템으로 포맷 후 mount 하는 예제입니다.

$ mkfs.ext4 /dev/vdb
mke2fs 1.41.12 (17-May-2010)
/dev/vdb is entire device, not just one partition!
Proceed anyway? (y,n) y
Discarding device blocks: done
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
1310720 inodes, 5242880 blocks
262144 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
160 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000

Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 36 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

$ mkdir /data
$ mount /dev/vdb /data
$ df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/sda1       7.8G  1.8G  5.6G  25% /
tmpfs           246M     0  246M   0% /dev/shm
/dev/vdb         20G   44M   19G   1% /data