New disk formatting Partition
[[Email protected] ~] # Fdisk-L # view system Disks
Disk/dev/SDB: 214.7 GB, 214748364800 bytes --- New Disk
255 heads, 63 sectors/track, 26108 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0x00000000
....
[[Email protected] ~] # Fdisk/dev/SDB # Add Disk Partitions
Device contains neither a valid DOS partition table, Nor Sun, SGI or OSF disklabel
Building a new dos disklabel with disk identifier 0xc6997a54.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: Invalid flag 0x0000 of Partition Table 4 will be corrected by W (RITE)
Warning: DOS-compatible mode is deprecated. It's stronugly recommended
Switch off the mode (command 'C') and change display units
Sectors (command 'U ').
Command (M for help): p # print the current disk Information
Disk/dev/SDB: 214.7 GB, 214748364800 bytes
255 heads, 63 sectors/track, 26108 Cylinders
Units = cylinders of 16065*512 = 8225280 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimal): 512 bytes/512 bytes
Disk identifier: 0xc6997a54
Device boot start end blocks ID system
Command (M for help): N # Add a partition
Command action
E extended
P primary partition (1-4)
P # usually select the primary partition, so here is a p
Partition Number (1-4): 1 # select 1 because it is the first score.
First cylinder (1-26108, default 1): 26100G # Fill in the partition size 200g
Last cylinder, + cylinders or + size {K, M, g} (26100-26108, default 26108 ):
Using default value 26108
Command (M for help): W # Write the partition to the hard disk
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
Format partitions
[[Email protected] ~] # Mkfs. ext4/dev/SDB
Mke2fs 1.41.12 (17-may-2010)
/Dev/SDB is entire device, not just one partition!
Proceed anyway? (Y, n) y
Filesystem label =
OS type: Linux
Block size = 4096 (log = 2)
Fragment size = 4096 (log = 2)
Stride = 0 blocks, stripe width = 0 blocks
13107200 inodes, 52428800 Blocks
2621440 blocks (5.00%) reserved for the Super User
First data block = 0
Maximum filesystem blocks = 4294967296
1600 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768,983 04, 163840,229 376, 294912,819 200, 884736,160 5632, 2654208,
4096000,796 2624, 11239424,204 23887872
Writing inode tables: Done
Creating Journal (32768 blocks): Done
Writing superblocks and filesystem accounting information: Done
This filesystem will be automatically checked every 34 mounts or
180 days, whichever comes first. Use tune2fs-C or-I to override.