To write something under a disk, you have to format it first
/////////////////////////////////////////////////////////////////////////////////////
There are several file formats supported by CentOS
[Email protected] ~]# Cat/etc/filesystems
Ext4
Ext3
Ext2
Nodev proc
Nodev devpts
iso9660
Vfat
HfS
Hfsplus
/////////////////////////////////////////////////////////////////////////////////////////////
Formatted commands
[[email protected] ~]# mkfs.////press TAB completion
Mkfs.cramfs mkfs.ext3 Mkfs.ext4dev mkfs.vfat/////is commonly used MKFS.EXT4
Mkfs.ext2 MKFS.EXT4 Mkfs.msdos
///////////////////////////////////////////////////////////////////////////////
MKFS format
[Email protected] ~]# MKFS.EXT4/DEV/SDB5
File System label =//////Not
Operating system: Linux
Block size =4096 (log=2)/////a block of 4k=4096b
Chunked size =4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
131648 inodes, 526120 blocks
26306 blocks (5.00%) reserved for the super User////keep 5% of the memory left to root
First block of data =0
Maximum filesystem blocks=541065216
Block groups
32768 blocks per group, 32768 fragments per group
7744 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912
/////////////////////////////////////////////////////////////
MKE2FS format last followed by the path of the partition
-T Type EXT3/EXT4
-B 1024 twice times growth
-M retention percentage
-L Label
[Email protected] ~]# mke2fs-t ext4-b 2048-m 1-l dennywang/dev/sdb1
MKE2FS 1.41.12 (17-may-2010)
File System label =dennywang/////specified
Operating system: Linux
Block size =2048 (log=1)////block size
Chunked size =2048 (log=1)
Stride=0 blocks, Stripe width=0 blocks
131560 inodes, 1052240 blocks
10522 blocks (1.00%) reserved for the Super User////reserved 1%
First block of data =0
Maximum filesystem blocks=538968064
Block groups
16384 blocks per group, 16384 fragments per group
2024 Inodes per group
Superblock backups stored on blocks:
16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816
//////////////////////////////////////////////////////////////////////
Usually only use the command format, the disk is large with mke2fs-m reduce reservation
Linux command-mke2fs