分区的过程正常:
[root@db1 /]# fdisk -l
 
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         650     5116702+  83  Linux
/dev/sda3             651         841     1534207+  82  Linux swap / Solaris
[root@db1 /]# fdisk /dev/sda
 
The number of cylinders for this disk is set to 2610.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)
 
Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Selected partition 4
First cylinder (842-2610, default 842):
Using default value 842
Last cylinder or +size or +sizeM or +sizeK (842-2610, default 2610):
Using default value 2610
 
Command (m for help): w
The partition table has been altered!
 
Calling ioctl() to re-read partition table.
 
WARNING: Re-reading the partition table failed with error 16: Device or resource busy.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
 
再次查看,分区已经划好:
[root@db1 /]# fdisk -l
 
Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14         650     5116702+  83  Linux
/dev/sda3             651         841     1534207+  82  Linux swap / Solaris
/dev/sda4             842        2610    14209492+  83  Linux
 
但是格式化的时候,报错:
[root@db1 /]# mkfs -t ext3 /dev/sda4
mke2fs 1.39 (29-May-2006)
Could not stat /dev/sda4 --- No such file or directory
 
The device apparently does not exist; did you specify it correctly?
 
 
解决方法:执行下partprobe 命令
 
       partprobe包含在parted的rpm软件包中。partprobe可以修改kernel中分区表,使kernel重新读取分区表。 因此,使用该命令就可以创建分区并且在不重新启动机器的情况下系统能够识别这些分区。
 
查看是否安装该命令:
[root@db1 dev]# rpm -q parted
parted-1.8.1-23.el5
 
我们执行一下该命令:
[root@db1 dev]# partprobe
Warning: Unable to open /dev/hdc read-write (Read-only file system).  /dev/hdc has been opened read-only.
 
然后在格式化,就ok了:
[root@db1 dev]# mkfs -t ext3 /dev/sda4
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
1778880 inodes, 3552373 blocks
177618 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=3640655872
109 block groups
32768 blocks per group, 32768 fragments per group
16320 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208
 
Writing inode tables: done                           
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
 
This filesystem will be automatically checked every 38 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.

Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令的更多相关文章

  1. Linux格式化分区报错Could not start /dev/sda No such file or directory 解决办法

    Linux查看已经分好的区[root@linuxidc ~]# fdisk -l /dev/sda   Disk /dev/sda: 21.5 GB, 21474836480 bytes 255 he ...

  2. Linux安装redis报错:jemalloc/jemalloc.h: No such file or directory踩坑

    报错内容: 针对这个错误,我们可以在README.md 文件中看到解释: --------- Selecting a non-default memory allocator when buildin ...

  3. node 报错 env: node\r: No such file or directory

    最近在编写一个命令行工具.使用 npm link 时可以正常运行.但是 ctrl+s 保存后, 再运行则报错 env: node\r: No such file or directory ,需要再 n ...

  4. 使用nsenter进入docker容器后端报错 mesg: ttyname failed: No such file or directory

    通过nsenter 进入到docker容器的后端总是报下面的错,, [root@devdtt ~]# docker inspect -f {{.State.Pid}} mynginx411950 [r ...

  5. laravel 报错SQLSTATE[HY000] [2002] No such file or directory

    在mac中执行php artisan migrate时报错 SQLSTATE[HY000] [2002] No such file or directory (SQL: select * from i ...

  6. Linux 启动数据库报错:could not open parameter file init**.ora

    sqlplus /nolog.conn /as sysdba.startup命令后显示 SQL> startupORA-01078: failure in processing system p ...

  7. Gitlab 备份迁移恢复报错gtar: .: Cannot mkdir: No such file or directory

    1. 版本信息 OS: centos 6.9 Gitlab: gitlab-ce.10.7.4 gitlab-ce.10.8.0 gitlab-ce.10.8.3 gitlab-ce.10.8.4 2 ...

  8. 安装apr-1.6.3报错[cannot remove `libtoolT’: No such file or directory]解决方法

    发现有这个提示:cannot remove `libtoolT’: No such file or directory , 编辑 configure文件,查找 $RM "$cfgfile&q ...

  9. 报错:Error: ENOENT, no such file or directory 'c:\Users\Administrator\WebstormProjects\blogtest\views\footer.ejs'

    这是我在index上引用<%- include footer %>,找不到该文件 所以报错 建立文件footer.ejs

随机推荐

  1. OOP的方法

    <?php class Computer{ //我要创建一个构造方法 public function __construct(){ echo '我是比较先进的构造方法!'; //构造方法一般用于 ...

  2. win10 Incredibuild 兼容

    电脑换了win10,所有的软件都需要重新安装. win10的体验还是很不错的.但是也有一堆的问题.原来的vs2010今天无法再使用分布式编译IncrediBuild. 现象是,虽然可以连上分布式编译的 ...

  3. Maven项目下WEB-INFO目录下没有编译的classes文件

    建立mavan项目之后,在项目目录中没有发现编译的classes文件夹 解决办法: 因为maven是默认将编译后的classes文件存入项目下的target文件夹中,所以我们需要修改编译后存放的路径, ...

  4. JavaScript 属性类型(数据属性 访问器属性)

    ECMA-2把对象定义为:“无序属性的集合,其属性可以包含基本值.对象或者函数.” 严格来说,这就相当于说对象是一组没有特定顺序的值.对象的属性或方法都有一个名字,而每个名字映射到一个值.我们可以把E ...

  5. Collector

    安装 参考安装文章   创建项目project 转到你创建的目录,运行命令 django-admin.py startproject collector 生成下列文件 collector/ __ini ...

  6. Arduino使用注意问题及编程相关

    1.Arduino的概念 arduino是一款便捷灵活方便上手的开源电子原型平台,包含硬件(各种型号的arduino板)和软件(arduino IDE), 是一个基于开放原始码的软硬件平台,构建于开放 ...

  7. JS逻辑运算大于小于比较

    遇到这个问题,结果测试了好半天终于发现原因, 例子: var az = $('#a').css('zIndex'); // 1001 var bz = $('#b').css('zIndex'); / ...

  8. HDU 1028 HDU Ignatius and the Princess III

    简单的钱币兑换问题,就是钱的种类多了一点,完全背包. #include<cstdio> #include<cstring> int main () { ]; memset(dp ...

  9. github上一些觉得对自己工作有用的项目收集

    usefullProjectCollect github上一些觉得对自己工作有用的项目收集 技能类 markdown语法中文说明 全文检索 elasticsearch bigdesk elastics ...

  10. 《JS权威指南学习总结--8.8.3 不完全函数》

    内容要点: 本节讨论的是一种函数变换技巧,即把一次完整的函数调用拆成多次函数调用,每次传入的实参都是完整实参的一部分,每个拆分开的函数叫做不完全函数(partial function),每次函数调用叫 ...