$sudo fdisks-l
Basic skills, format the command to format the/DEV/SDB4 partition for example: $ sudo umount/dev/sdb4 # You must first unmount the partition
# formatted FAT partition $ sudo mkfs.vfat- FThe/DEV/SDB4 #-F parameter must be capitalized, with parameters of 12, 16, and 32, respectively, corresponding to Fat12,fat16,fat32.
# format to NTFS partition, first install ntfsprogs, take Ubuntu/debian for example: $ sudo apt-get install Ntfsprogs
#然后执行格式化命令, take the format/DEV/SDA1 partition as an example: $ sudo umount/dev/sda1 # must first unload the partition $ sudo mkfs.ntfs/dev/sda1 # formatted as NTFS speed a little slow 。
# format EXT4/3/2 to format the/DEV/SDA1 partition as an example: $ sudo umount/dev/sda1 # must first unload the partition $ sudo mkfs.ext4/dev/sda1 # formatted as EXT4 partition $ sudo mkfs.ext3/dev/sda1 # formatted EXT3 partition $ sudo mkfs.ext2/dev/sda1 # formatted as EXT2 partition
Since the EXT series partition has a reserved space for super user, it must occupy a certain percentage,default 5%, so that the format of the small size of the partition does not feel, 5% is not much, but if it is hundreds of g,1t partition will be problematic, in this case,5% is not a small number Ah!
"Workaround"
One, for the partition to be formatted, take ext3 as an example: $ sudo umount/dev/sda1 # must first unload the partition, here to format the/DEV/SDA1 partition. $ sudo mkfs.ext3- m 0.05/DEV/SDA1 #Note-M after parameters,the set is already percentile, this is set to 0.05, is 0.05%, that is, extremely 5!
OK, so take the 1T partition as an example, 1T=1024GB=1048576MB (all multiplied by the 1024 relationship), 1048576MB*0.0005=524.288MB.
In other words, after setting the-m parameter, the retention area is approximately 524MB. Of course you can set it according to your preference.
Second, to the already formatted partition, and do not want to erase the data in the partition, you can use the Tune2fs-m method: # This command does not need to unload the partition first. $ sudo tune2fs-m 0.05/dev/sda2 # This example is the Super User reserved area of the conversion/dev/sda2 partition, also set to 0.05, in the reminder once, is 0.05%, which is the extreme 5.
[Linux] Ubuntu formatted U-disk