安装操作系统的时候,有一部分空间没有使用,在系统安装后,准备重新分区并格式化,在挂到/u01下,来安装Oracle的。

分区的过程正常:

[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 BootStartEndBlocksIdSystem

/dev/sda1*11310439183Linux

/dev/sda2146505116702+83Linux

/dev/sda36518411534207+82Linux 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

eextended

pprimary partition (1-4)

p

Selected partition4

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 BootStartEndBlocksIdSystem

/dev/sda1*11310439183Linux

/dev/sda2146505116702+83Linux

/dev/sda36518411534207+82Linux swap / Solaris

/dev/sda4842261014209492+83Linux

但是格式化的时候,报错:

[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 格式化未分配区间,Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令...相关推荐

  1. Linux 格式化分区 报错Could not stat --- No such file or directory 和 partprobe 命令

    分区的过程正常: [root@db1 /]# fdisk -l Disk /dev/sda: 21.4 GB, 21474836480 bytes 255 heads, 63 sectors/trac ...

  2. Linux使用vi/vim打开文档/文件报错E325:ATTENTION Found a swap file by the name

    重点:解决方法是: rm -rf .文件名.文件类型后缀.swp 如 rm -r .mongod.conf.swp 1.对于同一个文件如果上次已经打开,而未关闭的情况下,又打开该文件进行编辑时,会出现 ...

  3. linux格式化扩展分区报错解决

    Linux格式化扩展分区时会报错,因为Linux扩展分区格式化无意义,它是为logicalpartition服务的,它们大小一 样.在一块硬盘里你最多只能创造fourpartiton,包括主分区与ex ...

  4. kali linux 安装 Mysql Can‘t read from messagefile 报错解决方案

    kali linux 安装 Mysql Can't read from messagefile 报错解决方案 参考文章: (1)kali linux 安装 Mysql Can't read from ...

  5. linux下安装mongodb,以及解决安装报错问题

    linux下安装mongodb,以及解决安装报错问题 参考文章: (1)linux下安装mongodb,以及解决安装报错问题 (2)https://www.cnblogs.com/tongl/p/71 ...

  6. linux系统Nginx下载安装步骤(含报错解决方法)

    linux系统Nginx下载安装步骤(含报错解决方法) 基础步骤 安装过程可能出现的报错及解决方法 执行 ./configure --prefix=/opt/nginx 报错 执行 make inst ...

  7. Linux中yum执行yum -y install gcc 报错 解决方案

    Linux中yum执行yum -y install gcc 报错 解决方案 本人实际遇到的问题,已亲测正式环境,为防止下次在遇到,在这里做个记录,遇到此问题的小伙伴可以参考此文章. 文章摘自其它网友博 ...

  8. SAP QM 执行事务代码QS23为检验特性分配Selected Set的时候报错 - You cannot use entries from catalogs 1 and 3-

    SAP QM 执行事务代码QS23为检验特性分配Selected Set的时候报错 - You cannot use entries from catalogs 1 and 3- 我已经定义好了如下的 ...

  9. MySQL 排错-解决MySQL非聚合列未包含在GROUP BY子句报错问题

    MySQL 排错-解决MySQL非聚合列未包含在GROUP BY子句报错问题 参考文章: (1)MySQL 排错-解决MySQL非聚合列未包含在GROUP BY子句报错问题 (2)https://ww ...

最新文章

  1. 如何配置一台深度学习工作站?
  2. linux撤销以硬件时钟作为UTC,linux时钟基本概念、CST与UTC、以及NTP简单设置
  3. linux dd 大文件下载,Linux dd+grep 大文件二分查找
  4. Redis数据库(四)——Redis集群模式(主从复制、哨兵、Cluster)
  5. 为什么 Netflix “永不宕机”?
  6. devops_如何成为DevOps的合适人选
  7. gitlab mysql 坑_gitlab迁移和踩坑
  8. 根据两点坐标计算两点距离
  9. 白夜追凶 :手 Q 图片的显示和发送逻辑
  10. 华为 会议室分配时间最长_华为“办公室新物种”来了,智慧办公一屏到位
  11. dubbo中文官方文档(新地址)
  12. java面试基础题整理(二)
  13. c++:警告:warning: catching polymorphic type ‘class std::exception’ by value
  14. 解决日志打印过多问题
  15. vue3 预览docx文件
  16. 前端学习资料 百度云盘
  17. 默纳克万能协议服务器图片,默纳克MDKE6万能协议                        使用说明...
  18. Windows7中随意排列图标(自动排列,对齐到网络)
  19. Cross Site Tracing (XST) Attacks
  20. 图书管理系统之读者信息管理实现

热门文章

  1. JavaScript函数式编程学习
  2. Python之旅.第十章.mysql
  3. 从LabVIEW到C++
  4. Keepalived+LVS+Nginx+DRBD+Heartbeat+Zabbix集群架构
  5. Linux-非结构化数据同步-Linux下Rsync+Rsync实现非结构化增量差异数据的同步2
  6. sqlite数据库测试类基本使用
  7. 总结网络执法官,p2p终结者等网管软件使用arp欺骗的防范方法
  8. 爱情这东西,真的有报应吗…
  9. 手机的秘密--按几个键就知道
  10. ASP.NET配置文件Web.config