Fdisk-l
[Email protected]:/# fdisk-l
disk/dev/sda:2000.4 GB, 2000398934016 bytes
255 heads, Sectors/track, 243201 cylinders, total 3907029168 sectors
Units = Sector of 1 * bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk IDENTIFIER:0X00071C40
Device Start point end block number Id system
/DEV/SDA1 * 2048 3781251071 1890624512 Linux
/dev/sda2 3781253118 3907028991 62887937 5 extension
/dev/sda5 3781253120 3907028991 62887936, Linux switching/Solaris
disk/dev/sdb:3000.6 GB, 3000592982016 bytes
255 heads, Sectors/track, 364801 cylinders, total 5860533168 sectors
Units = Sector of 1 * bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
Disk/dev/sdb doesn ' t contain a valid partition table
Fdisk/dev/sdb
[Email protected]:/# fdisk/dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF Disklabel
Building a new DOS disklabel with disk identifier 0X2C2A1FD8.
Changes'll remain in memory only, until the decide to write them.
After that, of course, the previous content won ' t is recoverable.
Warning:invalid flag 0x0000 of partition Table 4 would be a corrected by W (rite)
Warning:the size of this disk is 3.0 TB (3000592982016 bytes).
DOS partition table format can is used on drives for volumes
Larger than (2199023255040 bytes) for 512-byte sectors. Use parted (1) and GUID
Partition table Format (GPT).
Command (enter M for help): P
disk/dev/sdb:3000.6 GB, 3000592982016 bytes
255 heads, Sectors/track, 364801 cylinders, total 5860533168 sectors
Units = Sector of 1 * bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk Identifier:0x2c2a1fd8
Device Start point end block number Id system
Command (enter M for help): D
No partition is defined yet!
Command (enter M for help): N
Partition Type:
P Primary (0 primary, 0 extended, 4 free)
E Extended
Select (default p): P
Partition code (1-4, default = 1): 1
Starting sector (2048-4294967295, default = 2048):
The default value of 2048 will be used
Last sector, + sector or +size{k,m,g} (2048-4294967294, default = 4294967294):
The default value of 4294967294 will be used
Command (enter M for help): W
The partition table has been altered!
Calling IOCTL () to re-read partition table.
Syncing disks.
[Email protected]:/#
Mkfs.ext4/dev/sdb1
[Email protected]:/# mkfs.ext4/dev/sdb1
MKE2FS 1.42.9 (4-feb-2014)
File System label =
OS Type:linux
Block size =4096 (log=2)
Chunked size =4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
134217728 inodes, 536870655 blocks
26843532 blocks (5.00%) reserved for the Super user
First block of data =0
Maximum filesystem blocks=4294967296
16384 block Groups
32768 blocks per group, 32768 fragments per group
8192 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
Allocating group tables: complete
Writing Inode table: complete
Creating Journal (32768 blocks): complete
Writing Superblocks and FileSystem accounting information: Complete
[Email protected]:/#
Vi/etc/fstab
# This is another PHY disk
/dev/sdb1/mnt/data1 ext4 defaults 0 0
# Swap was on/dev/sda5 during installation
UUID =8ea4b4d6-cc01-4bc5-be5d-045538cf0891 None swap SW 0 0
This article is from the "Huang Chao It Notes" blog, so be sure to keep this source http://huangchao.blog.51cto.com/10446378/1682801
"Ubuntu" fdisk mkfs fstab