출처 : 어드민플레이
1. fdisk에서 2TB 이상의 파티션을 지원하지 못하므로, 2TB 이상 파티션을 구성하기 위해서는 다음과 같은 방법에 따라 작업을 해줘야 한다.
2. 우선 fdisk를 이용해 현재 전체 하드 용량을 체크한다.
[root@storage ~]# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
255 heads, 63 sectors/track, 9729 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 1033 8193150 83 Linux
/dev/sda3 1034 1288 2048287+ 83 Linux
/dev/sda4 1289 9729 67802332+ 5 Extended
/dev/sda5 1289 2308 8193118+ 83 Linux
/dev/sda6 2309 2569 2096451 82 Linux swap / Solaris
/dev/sda7 2570 2696 1020096 83 Linux
/dev/sda8 2697 9729 56492541 83 Linux
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1033 8193150 83 Linux
/dev/sda3 1034 1288 2048287+ 83 Linux
/dev/sda4 1289 9729 67802332+ 5 Extended
/dev/sda5 1289 2308 8193118+ 83 Linux
/dev/sda6 2309 2569 2096451 82 Linux swap / Solaris
/dev/sda7 2570 2696 1020096 83 Linux
/dev/sda8 2697 9729 56492541 83 Linux
Disk /dev/sdb: 2993.9 GB, 2993996955648 bytes
255 heads, 63 sectors/track, 363999 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
3. parted 명령으로 파티셔닝 한다.
[root@storage ~]# part
parted partprobe partx
[root@storage ~]# parted /dev/sdb --> 파티셔닝 할 스토리지 지정.
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(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?
Yes/No? yes
New disk label type? [gpt]? gpt
(parted) print --> 하드 정보 확인.
255 heads, 63 sectors/track, 363999 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
3. parted 명령으로 파티셔닝 한다.
[root@storage ~]# part
parted partprobe partx
[root@storage ~]# parted /dev/sdb --> 파티셔닝 할 스토리지 지정.
GNU Parted 1.8.1
Using /dev/sdb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(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?
Yes/No? yes
New disk label type? [gpt]? gpt
(parted) print --> 하드 정보 확인.
Model: INTEL SRCSATAWB (scsi)
Disk /dev/sdb: 2994GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk /dev/sdb: 2994GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) gpt
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] prints general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partititon NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [free|NUMBER|all] display the partition table, a partition, or all devices
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version displays the current version of GNU Parted and copyright information
(parted) mkpart
check NUMBER do a simple check on the file system
cp [FROM-DEVICE] FROM-NUMBER TO-NUMBER copy file system to another partition
help [COMMAND] prints general help, or help on COMMAND
mklabel,mktable LABEL-TYPE create a new disklabel (partition table)
mkfs NUMBER FS-TYPE make a FS-TYPE file system on partititon NUMBER
mkpart PART-TYPE [FS-TYPE] START END make a partition
mkpartfs PART-TYPE FS-TYPE START END make a partition with a file system
move NUMBER START END move partition NUMBER
name NUMBER NAME name partition NUMBER as NAME
print [free|NUMBER|all] display the partition table, a partition, or all devices
quit exit program
rescue START END rescue a lost partition near START and END
resize NUMBER START END resize partition NUMBER and its file system
rm NUMBER delete partition NUMBER
select DEVICE choose the device to edit
set NUMBER FLAG STATE change the FLAG on partition NUMBER
toggle [NUMBER [FLAG]] toggle the state of FLAG on partition NUMBER
unit UNIT set the default unit to UNIT
version displays the current version of GNU Parted and copyright information
(parted) mkpart
Partition name? []? --> 엔터
File system type? [ext2]? --> 엔터
Start? 0 --> 시작점을 지정해 준다. 0으로 지정.
End? 3.0TB --> 용량을 확인한 뒤 마지막 지점을 지정한다.(2994GB=3.0TB)
(parted) q --> 빠져나가기.
Information: Don't forget to update /etc/fstab, if necessary.
4. 정상적으로 잡혀있는지 /proc/partitions 로 확인한다.
File system type? [ext2]? --> 엔터
Start? 0 --> 시작점을 지정해 준다. 0으로 지정.
End? 3.0TB --> 용량을 확인한 뒤 마지막 지점을 지정한다.(2994GB=3.0TB)
(parted) q --> 빠져나가기.
Information: Don't forget to update /etc/fstab, if necessary.
4. 정상적으로 잡혀있는지 /proc/partitions 로 확인한다.
[root@storage ~]# cat /proc/partitions
major minor #blocks name
major minor #blocks name
8 0 78150744 sda
8 1 104391 sda1
8 2 8193150 sda2
8 3 2048287 sda3
8 4 1 sda4
8 5 8193118 sda5
8 6 2096451 sda6
8 7 1020096 sda7
8 8 56492541 sda8
8 16 2923825152 sdb
8 17 2923825118 sdb1 --> 정상적임을 확인.
5. /dev/sdb1 을 ext3 방식으로 포맷.
[root@storage ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
warning: 503 blocks unused.
8 1 104391 sda1
8 2 8193150 sda2
8 3 2048287 sda3
8 4 1 sda4
8 5 8193118 sda5
8 6 2096451 sda6
8 7 1020096 sda7
8 8 56492541 sda8
8 16 2923825152 sdb
8 17 2923825118 sdb1 --> 정상적임을 확인.
5. /dev/sdb1 을 ext3 방식으로 포맷.
[root@storage ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
warning: 503 blocks unused.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
366191712 inodes, 730955776 blocks
36547813 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22307 block groups
32768 blocks per group, 32768 fragments per group
16416 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
366191712 inodes, 730955776 blocks
36547813 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
22307 block groups
32768 blocks per group, 32768 fragments per group
16416 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848, 512000000, 550731776, 644972544
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 32 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
6. 포맷 완료된 sdb1 을 마운트 한다.
[root@storage ~]# cd /
[root@storage /]# mkdir data
[root@storage /]# mount /dev/sdb1 /data
[root@storage /]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext3 1.9G 357M 1.5G 20% /
/dev/sda8 ext3 53G 181M 50G 1% /home
/dev/sda7 ext3 965M 18M 898M 2% /tmp
/dev/sda2 ext3 7.6G 1.9G 5.4G 26% /usr
/dev/sda5 ext3 7.6G 201M 7.0G 3% /var
/dev/sda1 ext3 99M 17M 77M 18% /boot
tmpfs tmpfs 1003M 0 1003M 0% /dev/shm
/dev/sdb1 ext3 2.7T 202M 2.6T 1% /data --> 정상적으로 마운트 된 것을 확인할 수 있다.
7. fdisk 로 실제 파티셔닝된 정보를 확인한다.
[root@storage /]# fdisk -l
180 days, whichever comes first. Use tune2fs -c or -i to override.
6. 포맷 완료된 sdb1 을 마운트 한다.
[root@storage ~]# cd /
[root@storage /]# mkdir data
[root@storage /]# mount /dev/sdb1 /data
[root@storage /]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda3 ext3 1.9G 357M 1.5G 20% /
/dev/sda8 ext3 53G 181M 50G 1% /home
/dev/sda7 ext3 965M 18M 898M 2% /tmp
/dev/sda2 ext3 7.6G 1.9G 5.4G 26% /usr
/dev/sda5 ext3 7.6G 201M 7.0G 3% /var
/dev/sda1 ext3 99M 17M 77M 18% /boot
tmpfs tmpfs 1003M 0 1003M 0% /dev/shm
/dev/sdb1 ext3 2.7T 202M 2.6T 1% /data --> 정상적으로 마운트 된 것을 확인할 수 있다.
7. fdisk 로 실제 파티셔닝된 정보를 확인한다.
[root@storage /]# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
255 heads, 63 sectors/track, 9729 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 1033 8193150 83 Linux
/dev/sda3 1034 1288 2048287+ 83 Linux
/dev/sda4 1289 9729 67802332+ 5 Extended
/dev/sda5 1289 2308 8193118+ 83 Linux
/dev/sda6 2309 2569 2096451 82 Linux swap / Solaris
/dev/sda7 2570 2696 1020096 83 Linux
/dev/sda8 2697 9729 56492541 83 Linux
/dev/sda1 * 1 13 104391 83 Linux
/dev/sda2 14 1033 8193150 83 Linux
/dev/sda3 1034 1288 2048287+ 83 Linux
/dev/sda4 1289 9729 67802332+ 5 Extended
/dev/sda5 1289 2308 8193118+ 83 Linux
/dev/sda6 2309 2569 2096451 82 Linux swap / Solaris
/dev/sda7 2570 2696 1020096 83 Linux
/dev/sda8 2697 9729 56492541 83 Linux
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2993.9 GB, 2993996955648 bytes
255 heads, 63 sectors/track, 363999 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 1 267350 2147483647+ ee EFI GPT --> EFI GPT 로 잡혀 있는 것을 확인할 수 있음.
/dev/sdb1 1 267350 2147483647+ ee EFI GPT --> EFI GPT 로 잡혀 있는 것을 확인할 수 있음.
댓글 없음:
댓글 쓰기