在划分磁盘分区时,遇到错误“WARNING: Re-reading the partition table failed with error 22: Invalid argument” 如下所示:

[root@DB-Server u02]# fdisk -l

 

Disk /dev/sda: 500.1 GB, 500107862016 bytes

255 heads, 63 sectors/track, 60801 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       60801   488279610   8e  Linux LVM

[root@DB-Server u02]# fdisk /dev/sda2

Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel

Building a new DOS disklabel. Changes will remain in memory only,

until you decide to write them. After that, of course, the previous

content won't be recoverable.

 

 

The number of cylinders for this disk is set to 60788.

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)

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

 

Command (m for help): m

Command action

   a   toggle a bootable flag

   b   edit bsd disklabel

   c   toggle the dos compatibility flag

   d   delete a partition

   l   list known partition types

   m   print this menu

   n   add a new partition

   o   create a new empty DOS partition table

   p   print the partition table

   q   quit without saving changes

   s   create a new empty Sun disklabel

   t   change a partition's system id

   u   change display/entry units

   v   verify the partition table

   w   write table to disk and exit

   x   extra functionality (experts only)

 

Command (m for help): n

Command action

   e   extended

   p   primary partition (1-4)

p

Partition number (1-4): 2

First cylinder (1-60788, default 1): 

Using default value 1

Last cylinder or +size or +sizeM or +sizeK (1-60788, default 60788): 

Using default value 60788

 

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 22: Invalid argument.

The kernel still uses the old table.

The new table will be used at the next reboot.

出现这个错误,是因为没有在有效的设备(valid device)上进行分区操作(太久没有玩这台测试服务器了,忘记当初如何划分存储,测试一个备份的过程急于需要磁盘空间,没有检查情况,就动手了),实际上这个分区类型为 Linux LVM。已经划给VolGroup00了。后续处理如下。

[root@DB-Server ~]# pvscan

  PV /dev/sda2   VG VolGroup00   lvm2 [465.66 GB / 413.94 GB free]

  Total: 1 [465.66 GB] / in use: 1 [465.66 GB] / in no VG: 0 [0   ]

[root@DB-Server ~]# lvscan

  ACTIVE            '/dev/VolGroup00/LogVol00' [45.97 GB] inherit

  ACTIVE            '/dev/VolGroup00/LogVol01' [5.75 GB] inherit

[root@DB-Server ~]# more /etc/fstab 

/dev/VolGroup00/LogVol00 /                       ext3    defaults        1 1

LABEL=/boot             /boot                   ext3    defaults        1 2

tmpfs                   /dev/shm                tmpfs   defaults        0 0

devpts                  /dev/pts                devpts  gid=5,mode=620  0 0

sysfs                   /sys                    sysfs   defaults        0 0

proc                    /proc                   proc    defaults        0 0

/dev/VolGroup00/LogVol01 swap                    swap    defaults        0 0

[root@DB-Server ~]# vgdisplay

  --- Volume group ---

  VG Name               VolGroup00

  System ID             

  Format                lvm2

  Metadata Areas        1

  Metadata Sequence No  3

  VG Access             read/write

  VG Status             resizable

  MAX LV                0

  Cur LV                2

  Open LV               2

  Max PV                0

  Cur PV                1

  Act PV                1

  VG Size               465.66 GB

  PE Size               32.00 MB

  Total PE              14901

  Alloc PE / Size       1655 / 51.72 GB

  Free  PE / Size       13246 / 413.94 GB

  VG UUID               EYKFmq-O1Ko-0z94-Os3P-AKfC-0bG9-9oTQDh

   

[root@DB-Server ~]# lvextend -L 80G /dev/VolGroup00/LogVol00

  Extending logical volume LogVol00 to 80.00 GB

  Logical volume LogVol00 successfully resized

[root@DB-Server ~]# resize2fs /dev/VolGroup00/LogVol00

resize2fs 1.39 (29-May-2006)

Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required

Performing an on-line resize of /dev/VolGroup00/LogVol00 to 20971520 (4k) blocks.

The filesystem on /dev/VolGroup00/LogVol00 is now 20971520 blocks long.

 

[root@DB-Server ~]# df -h

Filesystem            Size  Used Avail Use% Mounted on

/dev/mapper/VolGroup00-LogVol00

                       78G   32G   42G  44% /

/dev/sda1              99M   13M   82M  14% /boot

tmpfs                 1.9G 1023M  916M  53% /dev/shm

/tmp/rhel-server-5.7-x86_64-dvd.iso

                      3.6G  3.6G     0 100% /mnt/cdrom

[root@DB-Server ~]# 

WARNING: Re-reading the partition table failed with error 22: Invalid argument的更多相关文章

  1. WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

    在 mkfs.ext4 /dev/sda2 格式化硬盘空间时,可能出现这种错误. had this situation at office where I was told to re-partiti ...

  2. Warning: file_put_contents(常用单词1.txt): failed to open stream: Invalid argument in

    Warning: file_put_contents(常用单词1.txt): failed to open stream: Invalid argument in 一.总结 1.上述问题是因为Win ...

  3. fdisk时WARNING: Re-reading the partition table failed with error 16: 设备或资源忙.

    现象:划分磁盘有警告, fdisk可以看到 lsblk却没有 partprobe刷新分区还是不行 放大招 #reboot   #这个是最好的方法(重启后新的分区表不一定生效) 或 # partx -a ...

  4. file_put_contents 错误:failed to open stream: Invalid argument 一种原因

    今天在测试nilcms系统的时候,出现了一个报错,导致缓存无法更新: file_put_contents(C:\UPUPW_AP5.4\vhosts\d.tv\NilCMS_APP\include_r ...

  5. Mycat+Mysql 插入数据报错 i[Err] 1064 - partition table, insert must provide ColumnList

    使用Navicat连接Mycat 8066 成功插入了分库表和全局表 1.全局表 sql如下: '); '); '); 插入成功! 2.分库表 sql如下: ', null, null, null, ...

  6. -- Warning: Skipping the data of table mysql.event. Specify the --events option explicitly.

    [root@DB ~]# mysqldump -uroot -p123 --flush-logs --all-databases >fullbackup_sunday_11_PM.sql -- ...

  7. oracle partition table 分区表详解

    Oracle partition table 分区表详解 分区表就是通过使用分区技术,将一张大表,拆分成多个表分区(独立的segment),从而提升数据访问的性能,以及日常的可维护性.分区表中,每个分 ...

  8. 计算机启动出现 Invalid Partition Table

    计算机启动出现 Invalid Partition Table 解决办法 使用大白菜启动盘进入临时系统,打开程序DiskGenius 如果系统盘(一般为 C 盘)非活动状态,先激活 如果装系统的硬盘不 ...

  9. 小米2s线刷出现remote: partition table doesn't exist

    =================问题============ 小米2s线刷出现remote: partition table doesn't exist =================解决方案= ...

随机推荐

  1. Spring boot @EnableScheduling 和 @Scheduled 注解使用例子

    前言 Spring Boot提供了@EnableScheduling和@Scheduled注解,用于支持定时任务的执行,那么接下来就让我们学习下如何使用吧: 假设我们需要每隔10秒执行一个任务,那么我 ...

  2. 转载:浏览器开发系列第一篇:如何获取最新chromium源码

    背景:     最近摊上一个事儿,领导非要让写一篇技术文章,思来想去,自己接触chrome浏览器时间也不短了,干脆就总结一下吧.于是乎,本文顺理成章.由于有些细节必需描述清楚,所以这次先讲如何拿到ch ...

  3. 使用docker搭建数据分析环境

    注:早在学习<云计算>这门课之前就已经知道docker,学习这门课时老师还鼓励我们自己尝试一下:但是直到去年年底才有机会尝试,用过之后感觉确实很好用.最近需要部署几个shiny应用,又回顾 ...

  4. Netty实现简单HTTP代理服务器

    自上次使用Openresty+Lua+Nginx的来加速自己的网站,用上了比较时髦的技术,感觉算是让自己的网站响应速度达到极限了,直到看到了Netty,公司就是打算用Netty来替代Openresty ...

  5. springboot redis(单机/集群)

    前言 前面redis弄了那么多, 就是为了在项目中使用. 那这里, 就分别来看一下, 单机版和集群版在springboot中的使用吧.  在里面, 我会同时贴出Jedis版, 作为比较. 单机版 1. ...

  6. SpringBoot 常用注解

    @SpringBootApplication  这个配置等同于:@Configuration ,@EnableAutoConfiguration 和 @ComponentScan 三个配置. @Ena ...

  7. 【CSS】flex布局初认识

     1. 父容器为Flex容器,它有以下六个属性: 1)flex-direction: 作用:决定主轴的方向(如果为row,那么x方向为主轴:如果为column,那么y方向为主轴) 属性:row | r ...

  8. Perl和操作系统交互(一):system、exec和反引号

    调用操作系统命令:system函数 system函数可以直接让perl调用操作系统中的命令并执行. system入门示例 例如: #!/usr/bin/perl system 'date +" ...

  9. 业务开发(五)—— Java代码

    0x01.java.util.NoSuchElementException 表示在线程中访问越界.比如队列为空,这时你要remove()时就会报这个错误 0x02.线程的同步与异步 如果两个业务可以不 ...

  10. Visual Studio 2017 - Windows应用程序打包成exe文件(1)- 工具简单总结

    最近有对一个Windows应用程序少许维护和修改.修改之后要发布新的exe安装文件,打包exe文件时,遇到了很头疼的问题,还好最后解决了,记录一下. Visual Studio版本:Visual St ...