linux 서버를 포맷하려고 하는데 GPT 이상한것이 나타났습니다.
fdisk -l로 파티션 확인
[root@localhost ~]# fdisk -l
Disk /dev/sda: 299.5 GB, 299573968896 bytes
255 heads, 63 sectors/track, 36421 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
Disk /dev/sdb: 146.9 GB, 146905497600 bytes
255 heads, 63 sectors/track, 17860 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 83 Linux
/dev/sdb2 14 1057 8385930 82 Linux swap / Solaris
/dev/sdb3 1058 17860 134970097+ 83 Linux
[root@localhost ~]#
|
그런데 GPT가 출현했습니다.
[root@localhost ~]# fdisk -l
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1057 8385930 82 Linux swap / Solaris
/dev/sda3 1058 19457 147798000 83 Linux
Disk /dev/sdb: 999.9 GB, 999999930368 bytes
255 heads, 63 sectors/track, 121576 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
WARNING: GPT (GUID Partition Table) detected on '/dev/sdc'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdc: 999.9 GB, 999999930368 bytes
255 heads, 63 sectors/track, 121576 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdc doesn't contain a valid partition table
Disk /dev/sdd: 999.9 GB, 999999930368 bytes
255 heads, 63 sectors/track, 121576 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
|
GPT는 fdisk로 못한다고 합니다. parted라는 이상한 것으로 해야 한답니다.
2T가 안되기에 제거하고 싶습니다.
꼼수가 하나 있네요^^
# mkfs.ext3 /dev/sde
mke2fs 1.39 (29-May-2006)
/dev/sde is entire device, not just one partition!
Proceed anyway? (y,n) y
기타 참고 자료
GPT 파티션 방법
# parted /dev/sdb
(Parted) mklabel gpt
Warning: The existing disk label on /dev/sdb will be destroyed and all data on this disk will be lost. Do you want to continue? (Yea/No)
라벨을 만들면 디스크에 있는 내용이 손실 된다는 내용입니다.
New disk label type ? (gpt) 엔터를 입력합니다. 기본으로 gpt로 나와 있습니다. (위 에서 mklabel gpt라고 입력)
이렇게 입력을 하면 GPT 라벨이 생성이 됩니다.
이제 파티션을 만들어 보겟습니다.
(parted) mkpart
Partition name ? 파티션 이름입니다. 필수 입력이 아닙니다.
File system type ? 파일 시스템 종류 입니다. 기본 값으로 넘어갑니다.
Start ? 파티션을 시작할 위치 입니다. 첫 파티션인 경우에는 0 그 이후 파티션인 경우에는 처음 파티션의 마지막 이후 부분이 나옵니다. 특별한 경우가 아니면 초기 값을 사용합니다.
End ? 용량을 적거나 또는 마지막 위치를 적어 줍니다. 편하게 nnGB 등으로 용량을 적어 줍니다.
이제 파티션이 만들어 졌습니다. quit를 입력하고 빠져 나가면 디스크에 파티션이 적용 됩니다.
이제 mkfs 로 파티션을 포멧을 해줍니다.
GPT 관련 추가 자료
(출처: http://jai0130.tistory.com/165)
* gpt 란?
http://www.cep.kr/blog/47
기본적으로 linux partition은 msdos label을 갖고 사용한다. 그래서 이것은 2TB 이상을 넘겨서 사용할수가 없다. (64bit OS라도) 물론 이것은 linux (i386, x86_64에서 말하는것임.)
즉, fdisk는 2TB 이상의 cylinder를 컨트롤 할수가 없다는 뜻이다.
그래서 2TB 이상을 사용하기위해서는 GNU parted를 사용해야 한다.
=> 3T 런을 다 쓸필요없이 2T 만 쓰겠다면 fdisk 로 나눠 써도 됨.
* parted 사용법
# parted /dev/sdc
(parted) print
Error: Unable to open /dev/sdc - unrecognised disk label.
(parted) mklabel gpt
(parted) p
Model: IFT A16F-R2431 (scsi)
Disk /dev/sdc: 3000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mkpart primary 0 500
(parted) mkpart primary 500 10000
(parted) mkpart primary 10000 100% <- 100% 라고 쓰면 끝까지 잡아준다.
(parted) p
Model: IFT A16F-R2431 (scsi)
Disk /dev/sdc: 3000GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
1 17.4kB 500MB 500MB primary
2 500MB 10.0GB 9500MB primary
3 10.0GB 3000GB 2990GB primary
* sdc 에 파티션을 여러개 만들어도 fdisk 에서는 sdc1 만 보인다.
|