分区的过程正常:
[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. python下载时报错 Errno 10060] A connection attempt failed because the connected party did not properly respond after a period of time

    def downloadXml(isExists,filedir,filename): if not isExists: os.mkdir(filedir) local = os.path.join( ...

  2. sql 各种格式

    --以2013-12-10 12:56:55为例--convert(nvarchar(10),CreateDate,120)      =>      2013-12-10--DATEPART( ...

  3. The Skyline Problem leetcode 详解

    class Solution { public: vector<pair<int, int>> getSkyline(vector<vector<int>&g ...

  4. fido-uaf-protocol-v1.0

    EXAMPLE 1: Policy matching either a FPS-, or Face Recognition-based Authenticator { "accepted&q ...

  5. sublime修改代码字体颜色

    1.首先知道你采用的是什么颜色主题在Preferences => color scheme查看,假设是Monokai2.查找该主题的脚本文件Preferences => Browse Pa ...

  6. python之~ 序列化与反序列化

    sy1.proto文件 syntax = "proto2"; message stuff { required int32 stuff_ID = ; required ; opti ...

  7. ActionBar 值 addTab 的小提示

    今天测试时偶然发现当程序中 addTab 后,会默认触发第一个 tab 的 onTabSelected 事件方法 ActionBar actionBar = mActivity.getSupportA ...

  8. 第五十九节,模拟浏览器请求Python结合html基本格式

    模拟浏览器请求Python结合html基本格式 用Python模拟一个客户端,结合打开一个HTML页面 创建客户端 #!/usr/bin/env python # -*- coding:utf8 -* ...

  9. php 类型

    var_dump 打印出类型和值     整型inter用  decimal 表示为 decimal : [1-9][0-9]* | 0   (int) ( (0.1+0.7) * 10 ); 强制类 ...

  10. jQuery第四章

    jQuery中的事件和动画 一.jQuery中的事件 1.加载DOM (1)执行时机 $(document).ready()方法和window.onload方法有相似的功能,但是在执行时机方面是有区别 ...