- toc {:toc}
File-System Mounting
-
ํ์ผ ์์คํ ์ ํ๋ก์ธ์ค์ ์ฌ์ฉ๋๊ธฐ ์ ์ mount๋์ด์ผ ํ๋ค.
- Storage name, mount point(๊ฒฝ๋ก) ๊ฐ ์ค์ ๋๋ค.
-
Root partition์ OS ํฌํจํ๋ค.
- boot time์ mount ๋๋ค.
- ๋ค๋ฅธ partition์ ์๋, ์๋์ผ๋ก ์ถ๊ฐ ๊ฐ๋ฅ
Virtual File Systems on Unix
- Virtual File System : ํ์ผ ์์คํ ๊ตฌํ์ ๊ฐ์ฒด ์งํฅ์ ๋ฐฉ์ ์ ๊ณต
- ๋คํ์ฑ์ ์ด์ฉํด ํ์ผ ์์คํ
๊ตฌํ
- ๋ค์ํ ํ์ ์ ํ์ผ ์์คํ ์ ๋ํด ๊ฐ์ ์์คํ ์ฝ ์ธํฐํ์ด์ค ์ฌ์ฉ ํ์ฉ
- ๋คํธ์ํฌ๋ฅผ ํตํด ๊ณ ์ ํ๊ฒ ํ์ผ์ ํํํ๋ ๋งค์ปค๋์ฆ ์ ๊ณต
- EX) Linux
- inode object - ๊ฐ๋ณ์ ํ์ผ์ ๋ํ๋ธ๋ค.
- file object - ์ด๋ฆฐ ํ์ผ์ ๋ํ๋ธ๋ค.
- superblock object - ์ ์ฒด ํ์ผ ์์คํ ์ ๋ํ๋ธ๋ค.
- dentry object - ๊ฐ๋ณ ๋๋ ํ ๋ฆฌ entry๋ฅผ ๋ํ๋ธ๋ค.
Remote File Systems
๋คํธ์ํฌ๋ฅผ ๊ฑฐ์ณ ํ์ผ ๊ณต์
- FTP(File Transfer Protocol) : ์๋์ผ๋ก ๊ฐ ํ์ผ์ ๊ณต์ ํ๋ค.
- DFS(Distributed file system) : ์ฌ๋ฌ ํ์ผ ์์คํ ์์ ๋๊ธฐ์ ์ผ๋ก ๊ณต์ . cluster์์ ๋ง์ด ์ฌ์ฉํ๋ค.
- WWW(World Wide Web) : ๋งํฌ๋ก ๋ค์ด๋ก๋, ์ ๋ก๋๋ฅผ ํ๋ค.
Network File System(NFS)
- ํด๋ผ์ด์ธํธ-์๋ฒ ๋คํธ์ํฌ ํ์ผ ์์คํ ์ผ๋ก ๋๋ฆฌ ์ฌ์ฉ๋๊ณ ๊ตฌํ๋์ด ์๋ค.
- NFS ์๋ฒ๋ก ๋์ํ๋ ์ฅ๋น์ ํด๋ผ์ด์ธํธ๊ฐ ์ ์ํ์ฌ ์์ ์ ๋์คํฌ์ฒ๋ผ ์ฌ์ฉํ ์ ์๋ค.
- TCP, UDP/IP ํ๋กํ ์ฝ์ ์ฌ์ฉํ ์ ์๋ค.
- RPC(Remote Procedure Call) : ์๋ฒ ํจ์๋ฅผ RPC ํ๋กํ ์ฝ์ ์ฌ์ฉํด ๊ฐ์ ธ์ฌ ์ ์๋ค.
- ํฌ๋ช ํ ๋ฐฉ์์ผ๋ก ํ์ผ ์์คํ ์ ๊ณต์ ํ ์ ์๊ฒ ํ๋ค.
- remote ๋๋ ํ ๋ฆฌ๊ฐ local ํ์ผ ์์คํ
๋๋ ํ ๋ฆฌ์ mount ๋์ด ์ฌ์ฉ๋ ์ ์๋ค.
- Local์์ remote ๋๋ ํ ๋ฆฌ๊ฐ ํ์๋๋๋ฐ ์ค์ ๋ก๋ ์๋ฒ์ ์์ผ๋ ์ ๊ทผํด ์ฌ์ฉ ๊ฐ๋ฅ
NFS Mount Protocol
- Mount operation โ (mount๋๋ remote ๋๋ ํ ๋ฆฌ ์ด๋ฆ, ๋๋ ํ ๋ฆฌ๋ฅผ ์ ์ฅํ๋ ์๋ฒ ์ด๋ฆ)์ ํฌํจ
- RPC์ mount request๋ ์ฐ๊ฒฐ๋๋ค.
- Export list : mount ๊ฐ๋ฅํ ๊ธฐ๊ธฐ์ ์ด๋ฆ์ ๋ํด ๋ช ์
- Export list์ ์ถ๊ฐ๋์ด ์๋ ๊ฒฝ์ฐ ์๋ฒ๋ mount๋ ๋๋ ํ ๋ฆฌ๋ฅผ ์๋ณํ๋ file system identifier, inode number๋ฅผ ๊ฐ์ง file handler๋ฅผ ๋ฐํํ๋ค. โ ์ถ๊ฐ์ ์ธ ์ ๊ทผ์ ์ค๋ค.
- Mount operation์ ์๋ฒ ์ธก์ ์ํฅ์ ์ฃผ์ง ์๋๋ค.
NFS Protocol
- Remote file ์กฐ์์ ์ํด RPC ์ ๊ณต
- ๋๋ ํ ๋ฆฌ์์ ํ์ผ ์ฐพ๊ธฐ
- ๋๋ ํ ๋ฆฌ entry ์ฝ๊ธฐ
- ๋งํฌ, ๋๋ ํ ๋ฆฌ ์กฐ์
- ํ์ผ ์์ฑ ์ ๊ทผ
- ์ฝ๊ณ ์ฐ๊ธฐ
- NFS ์๋ฒ๋ ๋ฐ๋ก ์ ์ฅํ์ง ์๊ณ ํ์ํ ๋๋ง๋ค ์ฝ์ด ์ฒ๋ฆฌํ๋ค. โ ๊ฐ ์์ฒญ์ argment ์ ๋ถ๋ฅผ ์ ๊ณต
- ์์ ๋ ๋ฐ์ดํฐ๋ ๊ฒฐ๊ณผ๊ฐ ํด๋ผ์ด์ธํธ์ ๋ฐํ๋๊ธฐ ์ ์ ์๋ฒ ๋์คํฌ์ ๋ฐ๋ก ์ ์ฉ๋์ด์ผ ํ๋ค.
- NFS protocol์ ๋์์ฑ ์ ์ด ๋งค์ปค๋์ฆ์ ์ ๊ณตํ์ง ์๋๋ค.
NFS Path-Name Translation
- Component ์ด๋ฆ์ผ๋ก ๊ฒฝ๋ก ๋๋๊ณ ์ด๋ฆ ๋ฐ ๋๋ ํ ๋ฆฌ vnode ์์ ๋ํด ๋ณ๋ NFC lookup ํธ์ถ์ ํด์ผํ๋ค.
- ์ด๋ฐ ์ด๋ฆ, ๊ฒฝ๋ก๋ฅผ ํด๋ผ์ด์ธํธ ์ธก์์ cache๋ก ์ ์ฅํ๋ฉด ๋นจ๋ผ์ง ๊ฒ.
NFS Remote Operations
-
System call๊ณผ NFS RPC ํ๋กํ ์ฝ์ ๊ฑฐ์ ์ผ๋์ผ ๋์๊ด๊ณ
-
์ฑ๋ฅ ๋ชฉ์ ์ผ๋ก buffering, caching ์ฌ์ฉ
- File-blocks cache : ํ์ผ์ด ์ด๋ ธ์ ๋ ์ปค๋์ด ์๋ฒ์์ cached ์์ฑ์ ๊ฐ์ ธ์ฌ์ง ์ฌ๊ฒ์ฆํ ์ง ํ์ธ(์์ ์ฌ๋ถ ํ์ธํด์ผ ํ๊ธฐ ๋๋ฌธ)
- File-attribute cache : ์๋ฒ๋ก๋ถํฐ ์๋ก์ด ์์ฑ์ด ๋์ฐฉํ ๋๋ง๋ค ์ ๋ฐ์ดํธ ๋๋ค.
-
์๋ฒ์ ๋ฐ์ดํฐ๊ฐ ๋์คํฌ์ ์จ์ก๋ค๋ ํ์ธ ์ ์ ํด๋ผ์ด์ธํธ๋ฅผ ํด์ ํ๋ฉด ์๋๋ค.