본문 바로가기
IT 지식정리/운영체제

[리눅스] Linux에서 마운트를 하였을 때, 파일시스템의 변화 2014. 12. 8.

by G. Hong 2017. 11. 4.
728x90
반응형

리눅스에서 아래 2개의 폴더가 있다고 가정합니다.

/mnt

/mnt/share

이때 /mnt에 device를 mount하였을 때,

/mnt/share에는 어떤 변화가 있을 까요??

저도 이게 궁금하여서 직접 test를 해보았습니다.

 

/mnt에 /share2라는 서브디렉토리를 생성하였습니다.

# ls -al /mnt

total 12

drwxr-xr-x.  3 root root 4096 Jan  9 16:17 .

dr-xr-xr-x. 28 root root 4096 Jan  3 02:04 ..

drwxr-xr-x.  2 root root 4096 Jan  9 16:17 share2

 

mount를 위해서 /test파일에 iso파일들을 저장하였습니다.

# ls -al /test

total 660

drwxr-xr-x.  5 root root   4096 Jan  9 16:16 .

dr-xr-xr-x. 28 root root   4096 Jan  3 02:04 ..

-rw-r--r--.  1 root root 327680 Jan  9 16:16 hi.iso

-rw-r--r--.  1 root root 327680 Jan  9 16:16 what.iso

/mnt에 device를 mount를 하면 서브디렉토리에는 mount가 되지 않습니다.

# mount -o loop /test/hi.iso /mnt

# mount -o loop /test/what.iso /mnt/share2

mount: mount point /mnt/share2 does not exist

 

/mnt에서 /share2는 사라지고 iso의 내용들만 나타나게 됩니다.

# ls -al /mnt

total 14

dr-xr-xr-x.  6 root root 2048 Dec  8  2014 .

dr-xr-xr-x. 28 root root 4096 Jan  3 02:04 ..

dr-xr-xr-x.  2 root root 2048 Dec  8  2014 hi1

dr-xr-xr-x.  2 root root 2048 Dec  8  2014 hi2

dr-xr-xr-x.  2 root root 2048 Dec  8  2014 hi3

dr-xr-xr-x.  2 root root 2048 Dec  8  2014 hi4

 

linux에서 iso mount와 관련된 내용은 아래 포스팅을 참고해 주세요.

2017/11/04 - [IT 지식정리/운영체제] - Linux에서 iso 파일 마운트(mount) 하기 2014. 12. 8.


728x90
반응형