Filesystem , swap, device

23
FILESYSTEM, SWAP, DEVICE ravel@sparcs

description

ravel@sparcs. Filesystem , swap, device. 1. Filesystem. In computing , a file system (often also written as filesystem ) is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. ( wikipedia ) Permits random access 추상화. - PowerPoint PPT Presentation

Transcript of Filesystem , swap, device

Page 1: Filesystem , swap, device

FILESYSTEM, SWAP, DE-VICE

ravel@sparcs

Page 2: Filesystem , swap, device

1. Filesystem

In computing, a file system (often also written as filesystem) is a method for storing and organizing computer files and the data they contain to make it easy to find and access them. (wikipedia)

Permits random access

추상화

Page 3: Filesystem , swap, device

종류

ext2/ext3

VFAT / NTFS

Iso9660/UDF

/proc

/proc/filesystems 에서 확인

Page 4: Filesystem , swap, device

mount!

#mount –t : 파일시스템 가져다 붙이기

Page 5: Filesystem , swap, device

mount!

#mount –t type device mount-point

#mount –t msdos /dev/fd0 /mnt

#mount –t iso9660 –r /dev/cdrom /mnt (read only)

Page 6: Filesystem , swap, device

mount!

#mount –a/etc/fstab 에 있는 모든 장치들을 마운트

#umount /dev/fd0#umount /mnt

#umount –f

Page 7: Filesystem , swap, device

mount! #mount

Mount errors

Page 8: Filesystem , swap, device

/etc/fstab #mount –t <type> <file system> <mount point>

이 명령이 부팅할 때 이루어짐

Page 9: Filesystem , swap, device

/etc/fstab Q : /etc/fstab 에는 어떻게 접근하나 ?

A: 커널이 먼저 / 에 /etc/fstab 를 담고있는 디바이스를 마운트

Page 10: Filesystem , swap, device

파일시스템 만들기

#mkfs –t type device

#fdformat

Page 11: Filesystem , swap, device

파일시스템 만들기

#mkfs -cchecks for bad blocks

Page 12: Filesystem , swap, device

파일시스템 검사하기

#fsck –t type device

#fsck –t ext3 /dev/hda안됩니다

Page 13: Filesystem , swap, device

파일시스템 검사하기

Boot/root floppy

Mount root as ro (?)

Page 14: Filesystem , swap, device

파일시스템 검사하기

#fsck –v정보 출력

#fsck –a모든 파일시스템 점검

Page 15: Filesystem , swap, device

2. Swap

Swap file: RAM 에 빈공간이 없을 때 메모리 구실을 하는 특수한 파일

Swap out/in : 메모리에서 하드로 / 하드에서 메모리로

Page 16: Filesystem , swap, device

스왑

$free

단위는 1024-byte block

Page 17: Filesystem , swap, device

A) 스왑파일 B) 스왑파티션 -> fdisk

스왑 만들기

Page 18: Filesystem , swap, device

$dd if=/dev/zero of=/swap bs=1024 count=32768

#mkswap device size#mkswap –c device (size)

#chmod 0600 /swap

스왑 만들기

Page 19: Filesystem , swap, device

#swapon device

Modify /etc/fstab

#swapoff device

스왑 활성화

Page 20: Filesystem , swap, device

Device file : 디바이스를 하나의 파일처럼 만들기 ( 추상화 !)

3.Device files

Page 21: Filesystem , swap, device

b/c major device number, minor device

number

Page 22: Filesystem , swap, device

Symbolic links

Page 23: Filesystem , swap, device

디바이스 파일 만들기

#mknod –m permissions name type major minor

#mknod /dev/ravelhdd b 42 0

$/dev/MAKEDEV

default permissions : umask (0644)