리눅스 파일시스템 full 스크립트

Jmnote (토론 | 기여)님의 2014년 8월 20일 (수) 01:48 판
리눅스 파일시스템 full 만들기 스크립트
리눅스 파일시스템 full 재현 스크립트

1 스크립트

while true
do
fallocate -l 1G tempfile_$(uuidgen)
fallocate -l 1M tempfile_$(uuidgen)
fallocate -l 1K tempfile_$(uuidgen)
echo hello > tempfile_$(uuidgen)
done

2 실행예시

[root@jmnote ~]# while true
> do
> fallocate -l 1G tempfile_$(uuidgen)
> fallocate -l 1M tempfile_$(uuidgen)
> fallocate -l 1K tempfile_$(uuidgen)
> echo hello > tempfile_$(uuidgen)
> done
... (생략)
fallocate: tempfile_9c340b09-3469-4475-b0be-f13383b8c3bd: fallocate failed: No space left on device
fallocate: tempfile_ff124806-3eba-4c45-8d86-96db29783705: fallocate failed: No space left on device
fallocate: tempfile_52c8fd3a-40d9-4150-8f39-7d9b22c213fa: fallocate failed: No space left on device
-bash: echo: write error: No space left on device
fallocate: tempfile_7be0ff9d-8abb-495a-b53c-b5818a605163: fallocate failed: No space left on device
fallocate: tempfile_bc041ae8-5d2f-46f9-9a8f-c154969ab216: fallocate failed: No space left on device
fallocate: tempfile_1ba5b828-08ba-40d7-88a4-9202cc1a4936: fallocate failed: No space left on device
-bash: echo: write error: No space left on device
^C
[root@jmnote ~]# df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/mapper/VolGroup-lv_root
                      16102344  16102288         0 100% /
tmpfs                   508240         0    508240   0% /dev/shm
/dev/xvda1              495844    495844         0 100% /boot

3 같이 보기

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}