# 내 모든 서버들이 8GB짜리 빈 파일을 가지고 있는 이유

> Clean Markdown view of GeekNews topic #3967. Use the original source for factual precision when an external source URL is present.

## Metadata

- GeekNews HTML: [https://news.hada.io/topic?id=3967](https://news.hada.io/topic?id=3967)
- GeekNews Markdown: [https://news.hada.io/topic/3967.md](https://news.hada.io/topic/3967.md)
- Type: news
- Author: [xguru](https://news.hada.io/@xguru)
- Published: 2021-03-27T10:37:30+09:00
- Updated: 2021-03-27T10:37:30+09:00
- Original source: [brianschrader.com](https://brianschrader.com/archive/why-all-my-servers-have-an-8gb-empty-file/)
- Points: 10
- Comments: 2

## Topic Body

- 서버의 하드 디스크가 꽉 차서 생기는 오류가 발생했을때 급하게 공간을 만들어 주기 위한 예방책

- dd 등 명령을 이용해서 빈 8GB 파일을 만들어서 자리를 차지하게 만들어두고 필요시 삭제

$ dd if=/dev/zero of=8g.img bs=1 count=1 seek=$((8*1024*1024*1024))

## Comments



### Comment 4720

- Author: tribela
- Created: 2021-03-28T04:26:40+09:00
- Points: 5

굳이 dd 명령으로 의미 없는 데이터 쓰기를 할 필요가 없습니다. fallocate 명령을 사용하면 용량만 할당할 수 있습니다.

### Comment 4749

- Author: tkwlsrl
- Created: 2021-03-31T18:14:56+09:00
- Points: 1
- Parent comment: 4720
- Depth: 1

음. 좋은 방법이네요 ^_^

disk가 꽉차면 자동으로 삭제되면 좋겠지만..

그러면 또 그만큼 차겠죠? ㅎ
