在Linux中划分partition 并格式化为文件系统

本文介绍了如何解决使用mkfs.ext3格式化磁盘分区时遇到的问题,包括无法找到指定设备的情况。通过执行partprobe命令刷新内核分区表,成功完成ext3文件系统的创建。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

[root@hvrhub ~]# mkfs.ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda3 --- No such file or directory

The device apparently does not exist; did you specify it correctly?


需要先执行以下partprobe重新读入Linux kernel

 

[root@hvrhub ~]# partprobe
Warning: Unable to open /dev/sr0 read-write (Read-only file system).  /dev/sr0 has been opened read-only.
[root@hvrhub ~]# mkfs.ext3 /dev/sda3
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
5373952 inodes, 10733428 blocks
536671 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
328 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks: 
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 
        4096000, 7962624

Writing inode tables: done                            
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: 
done

This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值