Disk partitioning

[root @ localhost ~] # fdisk / dev / sda ( disk partition / dev / sda)
Welcome to the fdisk (util-linux 2.23.2).

Change will stay in memory until you decide to write the changes to disk.
Please think twice before using the write command.

Command (input m to get help): p (display partitions on the current disk)

Disk /dev/sda:21.5 GB, 21474836480 bytes, 41943040 sectors
Units = sectors of 1 * 512 = 512 bytes
sector size (logical / physical): 512 byte / 512 byte
I / O size (minimum / best): 512 byte / 512 byte
disk label type: DOS
disk identifier: 0x00028e50

The Start End Blocks Id apparatus the System the Boot
/ dev / sda1 the Linux * 2048 2099199 1048576 83
/ dev / sda2 2.0992 million 41,943,039 19.92192 million 8E the Linux the LVM
(can have up to four primary partitions, an extended partition may have a plurality of logical partitions)
(partition extended also a primary partition)
partition 1
primary partition 2
primary partition 3
primary partition 4 (this can be extended partition) (with extended partition, logical partition can have)
the logical partition 5
logical partition 6
. . . .
Command (input m to get help): n (Create a new partition)
the Partition type:
P Primary (2 Primary, 0 Extended, 2 Free) (main branch)
E Extended (extended partition)
the Select (default P): P (here the default is the primary partition)
partition number (3,4, default 3): 3 (the default is 3)
no sectors the Available as Free (no disk space)
command (input m to get help): d (delete a partition)
partition number (1 2, the default 2): 2
partition 2 has been deleted
command (input m to get help): T (modified partition type)
the partition number (1, 2 by default): 2
Hex Code (Code list all input L): L (show all partition types)

Empty 0 24 NEC DOS 81 Minix / BF Old the Solaris Linu
. 1 27 hidden FAT12 NTFS Win 82 Linux exchange / So C1 DRDOS / sec (FAT-
2 XENIX the root Plan. 9 83 39 C4 DRDOS the Linux / sec (FAT-
. 3 XENIX. 3C usr PartitionMagic 84 OS / 2 hidden C: C6 DRDOS / sec (FAT-
. 4 the FAT16 <32M 40 85 80286 Venix the Linux extended Syrinx C7
. 5 extended 41 PPC PReP Boot 86 NTFS volume set da non-file system data
6 FAT16 42 SFS 87 NTFS volume set the CP DB / M / CTOS /.
. 7 the HPFS / the NTFS / 4D QNX4.x the exFAT the Linux plain text 88 de Dell tool
8 AIX 4e QNX4.x part 2 DF BootIt the LVM the Linux 8E
. 9 to start the AIX 3 4f QNX4.x part 93 Amoeba e1 DOS access
a OS / 2 boot manager 50 OnTrack the DM 94 Amoeba BBT E3 the DOS R & lt / O
B W95 the FAT32 51 is OnTrack DM6 Aux 9F the BSD / the OS E4 SpeedStor
C W95 the FAT32 (the LBA) 52 is the CP / M A0 the IBM Thinkpad Hugh eb BeOS fs
E W95 the FAT16 (the LBA) 53 is OnTrack DM6 Aux A5 the FreeBSD EE the GPT
F W95 extension (the LBA) 54 is OnTrackDM6 A6 the OpenBSD EF the EFI (the FAT-12 is / 16/
10 the OPUS 55 the EZ-Drive A7 the NeXTSTEP F0 the Linux / PA-RISC
. 11 Hidden FAT12 56 is Golden Bow A8 the Darwin a UFS F1 SpeedStor
12 is the Compaq diagnostic 5C of Priam Edisk A9 the NetBSD F4 SpeedStor
14 hidden FAT16 <3 61 SpeedStor ab Darwin start f2 DOS secondary
16 hidden FAT16 63 GNU HURD or Sys af HFS / HFS + fb VMware VMFS
17 hidden HPFS / NTF 64-Novell Netware B7 BSDI FS fc VMware vmkcore
18 AST intelligent sleep 65 Novell Netware b8 BSDI swap fd Linux raid auto
1b hidden W95 FAT3 70 DiskSecure multi Kai bb Boot Wizard hidden Fe LANstep
1C hidden W95 FAT3 75 PC / IX be Solaris BBT start FF
1E hidden W95 FAT1 80 old Minix
Hex Code (Code list all input L):
w (save and exit)
q (exit without saving)
[root @ localhost ~] # CAT / proc / Partitions (view the partition table)
Major Minor #blocks name

Fd0. 4 0 2
. 8 0 20971520 SDA
. 8. 1 1048576 sda1
. 8 sda2 2 19.92192 million
. 11 SR0 4481024 0
253 0 0 17,821,696 DM-
253 DM-2097152. 1. 1
[the root @ localhost ~] # partx -a / dev / SDA (disk read partition information)

Guess you like

Origin blog.51cto.com/14531315/2444369