分区的过程正常:
[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. codefirst mvc Self referencing loop detected for property

    登录时,json序列化用户类时提示错误"Self referencing loop detected for property--",经过5个小时的查找,发现原因可能是,用户类包含 ...

  2. qt5.6 for android

    尝试在qt下写android的程序.测试,没有编译成功. 在选项-android配置页面,提示有"Qt version for 3 architectures are missing&quo ...

  3. jQuery 源码学习(先放在这,未开始)

    希望对源码有一个框架上认识,对整体结构有一个理解. 对外只暴露出了一个变量,$/jQuery,这个变量指向一个函数 function(a,b){return new n.fn.init(a,b)}

  4. JDK及Jmeter的安装和配置

    Jmeter通常用于并发测试,本文介绍Jmeter工具的安装步骤. 工具/原料   WIN7 Jmeter安装包 JDK 一.安装JDK [步骤一]安装jdk 1.下载jdk,到官网下载jdk,地址: ...

  5. try{}catch{}finally{}的手记

    try{ System.out.println("执行try"); int = 6 / 0; return 1; }catch(Exception e){ System.out.p ...

  6. ZS and The Birthday Paradox

    ZS and The Birthday Paradox 题目链接:http://codeforces.com/contest/711/problem/E 数学题(Legendre's formula) ...

  7. 数据库DateTime类型为空的处理

    一,写一个辅助类,将该方法设为静态,先装换为object,在转为DateTime,返回DateTime public class DateTimeHelper { public static Date ...

  8. iOS开发瀑布流的实现

    //自定义布局,继承于UICollectionViewLayout #import <UIKit/UIKit.h> @class WaterFlowLayout; @protocol  W ...

  9. 《JS权威指南学习总结--第五章语句》

    内容要点: 一.throw语句     所谓异常是当发生了某种异常情况或错误时产生的一个信号.     抛出异常就是用信号通知发生了错误或异常状况.     捕获异常时指处理这个信号,即采取必要的手段 ...

  10. 明天学习一下验证码的匹配和thinkphp第十三章

    333333333 js 冒泡排序 var arr=[17,19,5,90,3];window.onload=function(){// alert(arr[0]);var len=arr.lengt ...