다음과 같은 방법에 따라 작업을 해줘야 합니다.
2. fdisk 명령으로 전체 하드 용량을 확인한다.
[root@localhost ~]# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
.. 중간 출력부분 생략 ..
Disk /dev/sdb: 3499.9 GB, 3499925438464 bytes
255 heads, 63 sectors/track, 425508 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
3. parted 명령으로 파티셔닝 한다.
[root@localhost ~]# 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
(parted) print <-- 하드 정보를 확인합니다.
Model: AMCC 9650SE-8LP DISK (scsi)
Disk /dev/sdb: 3500GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Number Start End Size File system Name Flags
(parted) mkpart
Partition name? []? 엔터
File system type? [ext2]? 엔터
Start? 0 <-- Start 지점은 0으로 설정
End? 3.5TB <-- 위에서 확인된 전체 용량을 적어준다.
(parted) q
4. 실제 잡혀 있는지 /proc/partitions 를 확인한다.
[root@localhost ~]# cat /proc/partitions
major minor #blocks name
8 0 78150744 sda
8 1 80293 sda1
8 2 2096482 sda2
8 3 2096482 sda3
8 4 1 sda4
8 5 10241406 sda5
8 6 6144831 sda6
8 7 4096543 sda7
8 8 329301 sda8
8 9 53062663 sda9
8 16 3417895936 sdb
8 17 3417895902 sdb1
5. /dev/sdb1 을 ext3 방식으로 포멧한다.
[root@localhost ~]# mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
427245568 inodes, 854473975 blocks
42723698 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
26077 block groups
32768 blocks per group, 32768 fragments per group
16384 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
This filesystem will be automatically checked every 20 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
6. 포멧 완료된 sdb1 을 마운트 한다.
[root@localhost /]# mkdir data
[root@localhost /]# mount /dev/sdb1 /data
[root@localhost /]# df -Th
Filesystem Type Size Used Avail Use% Mounted on
/dev/sda2 ext3 2.0G 496M 1.4G 27% /
/dev/sda1 ext3 76M 15M 58M 21% /boot
tmpfs tmpfs 2.0G 0 2.0G 0% /dev/shm
/dev/sda9 ext3 50G 180M 47G 1% /home
/dev/sda8 ext3 312M 11M 286M 4% /tmp
/dev/sda7 ext3 3.8G 1.8G 1.9G 48% /usr
/dev/sda5 ext3 9.5G 253M 8.8G 3% /usr/local
/dev/sda6 ext3 5.7G 580M 4.9G 11% /var
/dev/sdb1 ext3 3.2T 199M 3.0T 1% /data <-- 3.2T 정상적으로 마운트가 된 것을 확인할 수 있다.
7. fdisk 로 실제 파티셔닝된 정보를 확인한다.
[root@localhost /]# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 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 10 80293+ 83 Linux
/dev/sda2 11 271 2096482+ 83 Linux
/dev/sda3 272 532 2096482+ 82 Linux swap / Solaris
/dev/sda4 533 9729 73874902+ 5 Extended
/dev/sda5 533 1807 10241406 83 Linux
/dev/sda6 1808 2572 6144831 83 Linux
/dev/sda7 2573 3082 4096543+ 83 Linux
/dev/sda8 3083 3123 329301 83 Linux
/dev/sda9 3124 9729 53062663+ 83 Linux
WARNING: gpt (GUID Partition Table) detected on '/dev/sdb'! The util fdisk doesn't support gpt. Use GNU Parted.
Disk /dev/sdb: 3499.9 GB, 3499925438464 bytes
255 heads, 63 sectors/track, 425508 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로 잡혀 있는 것을 확인할 수 있음