Linux disk formatting

Source: Internet
Author: User

The file system format supported by CENTOS7 and the default is the file system with XFS as the system. "/" and "/boot" are all XFS formats! [Email protected] ~]# Cat/etc/filesystemsxfsext4ext3ext2nodev Procnodev devptsiso9660vfathfshfsplus*mke2fs Command:MKE2FS, Mkfs.ext2, MKFS.EXT3, MKFS.EXT4 are all available for disk formatting! Xfs! not supported For example, to perform the format of the EXT4 system (mkfs.ext4=mke2fs-t ext4)-l:=label, preset the label of the partition-T: Used to specify the type of file system (XFS, Ext4, ext3, ext2, etc.)-B: partition when specifying the size of each data block, Currently supports 1024, 248, 4096 bytes each block-I: Specify the inode size, the default is byte-n: Set the number of Inode, sometimes the default number is not enough, so you need to set the number of Inode-C: Before formatting the disk to detect whether there is a problem, Plus this option will be very slow after-m: when formatting, specify a percentage of the disk that is reserved to the administrator, which is only for the MKE2FS command format sdb1 for EXT4 file system [[email protected] ~]# mke2fs-t ext4-b 2048/dev/sdb1# is specified as a ext4 format with a block size of 2048; here's a command MKFS.EXT4 equivalent to Mke2fs-t EXT4MKE2FS 1.42.9 (28-dec-2013) Filesystem label=os type:linuxblock size=2048 (log=1) Fragment size=2048 (log=1) stride=0 blocks, Stripe width=0 blocks131072 inodes, 1048576 blocks52428 blocks (5.00%) reserved for the Super Userfirst data block =0maximum filesystem blocks=26948403264 Block groups16384 blocks per group, 16384 fragments per group2048 inodes per group Superblock backups stored on blocks:        16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816 allocating group tables:done                              writing Inode tables:done                          &nbSp;  creating Journal (32768 blocks): donewriting superblocks and filesystem accounting Information:done specify SDB1 as 2048k blocks [[email protected] ~]# mke2fs-b 2048/dev/sdb1   mke2fs 1.42.9 (28-dec-2013) Filesystem Label=OS Type:linuxblock size=2048 (log=1) Fragment size=2048 (log=1) stride=0 blocks, Stripe width=0 blocks131072 inodes, 1048576 b locks52428 blocks (5.00%) reserved for the Super Userfirst data block=0maximum filesystem blocks=53791948864 block Groups1 6384 blocks per group, 16384 fragments per group2048 inodes per groupsuperblock backups stored on blocks:  &nbsp ;      16384, 49152, 81920, 114688, 147456, 409600, 442368, 802816 allocating group tables : done                             writing Inode tables:done                              writing Superblocks and FilesyStem Accounting Information:done [[email protected] ~]#  mke2fs-t ext4-m 0.1/dev/sdb1   # 1.1 of the space is reserved to the root user, and the file system format is specified as EXT4, if not specified, the default is Ext2mke2fs 1.42.9 (28-dec-2013) Filesystem label=os type:linuxblock size =4096 (log=2) Fragment size=4096 (log=2) stride=0 blocks, Stripe width=0 blocks131072 inodes, 524288 blocks524 blocks (0.1% ) reserved for the Super Userfirst data block=0maximum filesystem blocks=53687091216 block groups32768 blocks per group, 3 2768 fragments per group8192 inodes per groupsuperblock backups stored on blocks:      & nbsp; 32768, 98304, 163840, 229376, 294912 allocating group tables:done                              writing Inode tables:done                           &Nbsp; creating Journal (16384 blocks): donewriting superblocks and filesystem accounting Information:done mke2fs specify inode corresponding block size [[email protected] ~]# mke2fs-t ext4-i 8192  /dev/sdb1            #增加inodemke2fs 1.42.9 (28-dec-2013) Filesystem label=os type:linuxblock size=4096 (log=2) Fragment size=4096 (log=2) stride=0 blocks, Stripe width=0 blocks262144 inodes, 524288 blocks26214 blocks (5.00%) reserved for the S Uper Userfirst Data block=0maximum filesystem blocks=53687091216 block groups32768 blocks per group, 32768 fragments per g roup16384 inodes per groupsuperblock backups stored on blocks:        32768, 98304, 163840, 229376, 294912 allocating group tables:done                              writing Inode tables:done                          &nBsp;  creating Journal (16384 blocks): donewriting superblocks and filesystem accounting Information:done Viewing partition information[Email protected] ~]# blkid/dev/sdb1/dev/sdb1:uuid= "ffd991f6-2fc8-4c56-9ffb-41a9f741d70d" type= "Ext4"mkfs Command:supported file systems mkfs.btrfs Mkfs.cramfs mkfs.ext2 mkfs.ext3 mkfs.ext4 mkfs.minix mkfs.xfs format sdb1 for XFS file system:[[email protected] ~]# mkfs.xfs/dev/sdb1 #用mkfs. XFS can be formatted for XFS, if it is already formatted need to add-F enforcement MKFS.XFS:/DEV/SDB1 appears To contain a existing filesystem (EXT4). Mkfs.xfs:Use the-f option to force overwrite. [[email protected] ~]# mkfs.xfs-f/dev/sdb1meta-data=/dev/sdb1               isize=512    agcount=4, agsize=131072 blks          =                        sectsz=512   attr =2, projid32bit=1         =                        crc=1         finobt=0, sparse=0data     =                        bsize=4096    blocks=524288, imaxpct=25         =                         sunit=0      swidth=0 Blksnaming   =version 2               bsize=4096    ascii-ci=0 ftype=1log      =internal log            bsize=4096   blocks=2560, version=2          =                        sectsz=512   sunit=0 Blks, lazy-count= 1realtime =none                    Extsz=4096   blocks=0, rtextents=0 

Linux disk formatting

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.