2014년 4월 10일 목요일

[Ubuntu] 하드디스크 새로 추가, 제거, 포맷


gparted를 받아서 설치하면 됩니다.
gparted는
GParted is a GTK+ front-end to GNU Parted and the official GNOME Partition Editor application besides Disks.
It is used for creating, deleting, resizing, moving, checking and copying partitions, and the file systems on them. This is useful for creating space for new operating systems (works with Windows Vista / 7 System & Data partitions), reorganizing disk usage, copying data residing on hard disks and mirroring one partition with another (disk imaging).
이라고 합니다. 즉 GUI로 구현한 디스크 파티션 프로그램입니다.
$ sudo apt-get install gparted


you must specify the filesystem type
had trouble writing out superblocks.
등의 문제를 모두 해결해줍니다.

저는 sdb1을 추가해주려고 했습니다.
1. 오른쪽 상단에서 sdb를 선택
2. 장치(Device) -> 새 파티션 테이블 만들기
3. 아래에서 /dev/sdb 우클릭, 다음으로 포맷 -> ext4
4. 위 메뉴에서 초록색? v(체크표시) 클릭
-> 진행 됩니다.

그리고
$ sudo mkdir /data
# 여기서 data는 마운트할 디렉토리
$ sudo vi /etc/fstab
에서 마지막줄에
/dev/sdb1    /data    ext4    defaults    0    1
를 추가해주고 :wq (vi 종료)
# 파티션 자동 마운트를 위해 fstab에 저 한 줄을 추가해준 것입니다.
$ sudo mount -a
# fstab에 설정된 모든 파일시스템을 마운트합니다.
$ df -hT
# 파일시스템 및 디스크 용량 확인


reference
[1] http://liveegg.blogspot.kr/2013/03/blog-post.html
[2] http://nearbyacademy.tistory.com/55