더북(TheBook)

6. vi 에디터를 이용해 /etc/fstab을 열어 다음과 같이 마운트 정보를 입력합니다.

root@ubuntu:~# vi /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point>    <type>  <options>     <dump>  <pass>
# / was on /dev/sda1 during installation
UUID=8ee026bc-2e9a-4c0b-8676-14a8014fd432 /              ext4  
errors=remount-ro 0 1
UUID=92ae390b-2e8a-434c-be6c-26ea587d957e /opt/stack  ext4  defaults 0 0
...


7. 이번에는 마운트할 디렉터리를 생성해 보겠습니다. /opt 디렉터리로 이동해 stack 디렉터리 이름을 다른 이름으로 변경합니다. 여기서는 stack1로 변경했습니다. 그리고 다시 stack 디렉터리를 생성합니다.

root@ubuntu:~# cd /opt
root@ubuntu:/opt# ll
total 12
drwxr-xr-x 3 root root 4096 May 5 18:13 ./
drwxr-xr-x 23 root root 4096 May 5 16:18 ../
drwxr-xr-x 13 stack root 4096 May 5 18:46 stack/
root@ubuntu:/opt# mv stack/ stack1/
root@ubuntu:/opt# mkdir stack
root@ubuntu:/opt# ll
total 12
drwxr-xr-x 3 root root 4096 May 5 18:13 ./
drwxr-xr-x 23 root root 4096 May 5 16:18 ../
drwxr-xr-x 13 root root 4096 May 5 18:46 stack/
drwxr-xr-x 13 stack root 4096 May 5 18:45 stack1/
신간 소식 구독하기
뉴스레터에 가입하시고 이메일로 신간 소식을 받아 보세요.