格式化大型驱动器

格式化大型驱动器

我的情况:

/dev/sda1
/dev/sda2

/dev/sdb1 - ~4TB

我需要格式化驱动器 /dev/sdb1
我需要怎样格式化/清除如此大的驱动器上的数据?使用
什么命令?

答案1

这取决于您要使用哪个文件系统,例如使用ext4

sudo mkfs.ext4 /dev/sdb1

答案2

最简单的方法是重新创建文件系统:

sudo mkfs.ext3 /dev/sdb1

man mkfs

mke2fs is used to create an ext2, ext3, or ext4 filesystem, usually in a disk
partition.  device is the  special file corresponding to the device 
(e.g /dev/hdXX).  blocks-count is the number of blocks on the device.  If omit‐
ted, mke2fs automagically figures the file system size.  If called as mkfs.ext3 
a journal is created as  if  the -j option was specified.

The  defaults of the parameters for the newly created filesystem, if not over-
ridden by the options listed below, are controlled by the /etc/mke2fs.conf
configuration file.  See the mke2fs.conf(5) manual page for more details.

相关内容