1. 하드디스크 확인
> sudo fdsik -l
2. 파티션 생성
> sudo fdisk /dev/sdb
...Command (m for help): n
Partition type:
p primary (0 primary, 0 extended, 4 free)
e extended
Select (default p): p
Partition number (1-4, default 1):
Using default value 1
First sector (2048-1000215215, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-1000215215, default 1000215215):
Using default value 1000215215
Command (m for help): p
Disk /dev/sdb: 512.1 GB, 512110190592 bytes
255 heads, 63 sectors/track, 62260 cylinders, total 1000215216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xe8bf195f
Device Boot Start End Blocks Id System
/dev/sdb1 2048 1000215215 500106584 83 Linux
Command (m for help): w
The partition table has been altered!
3. 포맷
> sudo mkfs.ext4 /dev/sdb1
4. 마운트 하기
4.1. 마운트 및 확인
> sudo mkdir /datapath
> sudo mount -a
> df - h
....
/dev/sdb1 .. .. .. .. /datapath
5. 영구적인 마운트
5.1. uuid 확인
> sudo blkid
...
/dev/sdb1: UUID=XXX Type="ext4"
...
5.2. fstab 파일에 파티션 추가
> sudo vi /etc/fstab
> UUID=XXX /datapath ext4 defaults 0 0