-
파티션 관리 및 설정 현황을 확인
-
새로운 파티션 생성, 기존 파티션 삭제, 파티션 타입 결정 등을 위해 사용.
-
path : /sbin/fdisk
-
fdisk [옵션] <disk>
-
fdisk -l <disk> : 파티션 테이블 리스트
-
fdisk <disk> : 파티션 변경
-
[root@home ~]# fdisk -l
Disk /dev/xvda: 21.5 GB, 21474836480 bytes, 41943040 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 label type: dos
Disk identifier: 0x000b2185
Device Boot Start End Blocks Id System
/dev/xvda1 * 2048 1953791 975872 83 Linux
/dev/xvda2 1953792 41943039 19994624 8e Linux LVM
Disk /dev/mapper/centos-root: 18.5 GB, 18471714816 bytes, 36077568 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 /dev/mapper/centos-swap: 2000 MB, 2000683008 bytes, 3907584 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 /dev/xvdb: 107.4 GB, 107374182400 bytes, 209715200 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 /dev/xvdc: 107.4 GB, 107374182400 bytes, 209715200 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
[root@home ~]# fdisk /dev/xvdb
Welcome to fdisk (util-linux 2.23.2).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table
Building a new DOS disklabel with disk identifier 0x4886820f.
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): 1
First sector (2048-209715199, default 2048):
Using default value 2048
Last sector, +sectors or +size{K,M,G} (2048-209715199, default 209715199):
Using default value 209715199
Partition 1 of type Linux and of size 100 GiB is set
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
'Linux > 기본 명령어' 카테고리의 다른 글
#fstab (파일시스템 테이블) (0) | 2019.07.25 |
---|---|
#mkfs (0) | 2019.07.25 |
#du (disk usage) (0) | 2019.07.25 |
#df (disk free) (0) | 2019.07.25 |
SSH란 (0) | 2019.07.25 |