LVM XFS增加硬盘分区容量(resize2fs: Bad magic number in super-block while) -- ::

分类: Linux

LVM XFS增加硬盘分区容量(resize2fs: Bad magic number in super-block while)
给某个硬盘增加分区之后
[root@Mysql01-- ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_mysql0121366-LogVol02 .7G .6G .8G % /
tmpfs 495M 495M % /dev/shm
/dev/sda1 194M 29M 155M % /boot
/dev/mapper/vg_mysql0121366-LogVol01 .0G .1G .0G % /data
这里增加/data大小
[root@Mysql01-- ~]# fdisk -l /dev/sda Disk /dev/sda: 40.8 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x000eb81f Device Boot Start End Blocks Id System
/dev/sda1 * Linux
Partition does not end on cylinder boundary.
/dev/sda2 8e Linux LVM 进行分区
[root@Mysql01-- ~]# fdisk /dev/sda WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u'). Command (m for help): n
Command action
e extended
p primary partition (-)
p
Partition number (-):
First cylinder (-, default ):
Using default value
Last cylinder, +cylinders or +size{K,M,G} (-, default ):
Using default value Command (m for help): p Disk /dev/sda: 40.8 GB, bytes
heads, sectors/track, cylinders
Units = cylinders of * = bytes
Sector size (logical/physical): bytes / bytes
I/O size (minimum/optimal): bytes / bytes
Disk identifier: 0x000eb81f Device Boot Start End Blocks Id System
/dev/sda1 * Linux
Partition does not end on cylinder boundary.
/dev/sda2 8e Linux LVM
/dev/sda3 Linux Command (m for help): t
Partition number (-):
Hex code (type L to list codes): 8e
Changed system type of partition to 8e (Linux LVM) 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 : Device or resource busy.
The kernel still uses the old table. The new table will be used at
the next reboot or after you run partprobe() or kpartx()
Syncing disks. 重启服务器或者 partprobe
创建物理卷
[root@Mysql01-- ~]# pvcreate /dev/sda3
Physical volume "/dev/sda3" successfully created
使用vgscan查询物理卷
[root@Mysql01-- ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "vg_mysql0121366" using metadata type lvm2
使用新增物理卷扩展vg
[root@Mysql01-- ~]# vgextend vg_mysql0121366 /dev/sda3
Volume group "vg_mysql0121366" successfully extended
[root@Mysql01-- ~]# vgscan
Reading all physical volumes. This may take a while...
Found volume group "vg_mysql0121366" using metadata type lvm2
查询vg
[root@Mysql01-- ~]# vgdisplay
--- Volume group ---
VG Name vg_mysql0121366
System ID
Format lvm2
Metadata Areas
Metadata Sequence No
VG Access read/write
VG Status resizable
MAX LV
Cur LV
Open LV
Max PV
Cur PV
Act PV
VG Size 37.79 GiB
PE Size 4.00 MiB
Total PE
Alloc PE / Size / 17.80 GiB
Free PE / Size / 19.99 GiB
VG UUID Zy2PVv-xSsx-NEAv-L6ba-G8Oy-tBBq-5zXKQm
查询lv
[root@Mysql01-- ~]# lvdisplay
--- Logical volume ---
LV Path /dev/vg_mysql0121366/LogVol01
LV Name LogVol01
VG Name vg_mysql0121366
LV UUID 5znkJ2-wdeZ-Y2o1-ECDS-gzzl-PqaS-qo2yZR
LV Write Access read/write
LV Creation host, time Mysql01--, -- :: +
LV Status available
# open
LV Size 8.00 GiB
Current LE
Segments
Allocation inherit
Read ahead sectors auto
- currently set to
Block device : --- Logical volume ---
LV Path /dev/vg_mysql0121366/LogVol00
LV Name LogVol00
VG Name vg_mysql0121366
LV UUID b1FV1n-iKyK-kZ23-glRO-opFh-gDRp-TzWNcL
LV Write Access read/write
LV Creation host, time Mysql01--, -- :: +
LV Status available
# open
LV Size 2.00 GiB
Current LE
Segments
Allocation inherit
Read ahead sectors auto
- currently set to
Block device : --- Logical volume ---
LV Path /dev/vg_mysql0121366/LogVol02
LV Name LogVol02
VG Name vg_mysql0121366
LV UUID eoVdk3-cbcP-9PlI-kZBL-6pY2-Jpbl-1WI2uH
LV Write Access read/write
LV Creation host, time Mysql01--, -- :: +
LV Status available
# open
LV Size 7.80 GiB
Current LE
Segments
Allocation inherit
Read ahead sectors auto
- currently set to
Block device : [root@Mysql01-- ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_mysql0121366-LogVol02 .7G .6G .8G % /
tmpfs 495M 495M % /dev/shm
/dev/sda1 194M 29M 155M % /boot
/dev/mapper/vg_mysql0121366-LogVol01 .0G .1G .0G % /data
扩展lv
[root@Mysql01-- ~]# lvextend -L +19G /dev/mapper/vg_mysql0121366-LogVol01
Extending logical volume LogVol01 to 27.00 GiB
Logical volume LogVol01 successfully resized
[root@Mysql01-- ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_mysql0121366-LogVol02 .7G .6G .8G % /
tmpfs 495M 495M % /dev/shm
/dev/sda1 194M 29M 155M % /boot
/dev/mapper/vg_mysql0121366-LogVol01 .0G .1G .0G % /data
若不是xfs我们可以用resize2fs,这里报错了
[root@Mysql01-- ~]# resize2fs -f /dev/mapper/vg_mysql0121366-LogVol01
resize2fs 1.41. (-May-)
resize2fs: Bad magic number in super-block while trying to open /dev/mapper/vg_mysql0121366-LogVol01
Couldn't find valid filesystem superblock.
[root@Mysql01-- ~]# xfs_growfs /dev/mapper/vg_mysql0121366-LogVol01
meta-data=/dev/mapper/vg_mysql0121366-LogVol01 isize= agcount=, agsize= blks
= sectsz= attr=, projid32bit=
data = bsize= blocks=, imaxpct=
= sunit= swidth= blks
naming =version bsize= ascii-ci=
log =internal bsize= blocks=, version=
= sectsz= sunit= blks, lazy-count=
realtime =none extsz= blocks=, rtextents=
data blocks changed from to
[root@Mysql01-- ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/vg_mysql0121366-LogVol02 .7G .6G .8G % /
tmpfs 495M 495M % /dev/shm
/dev/sda1 194M 29M 155M % /boot
/dev/mapper/vg_mysql0121366-LogVol01 27G .1G 24G % /data

LVM XFS增加硬盘分区容量(resize2fs: Bad magic number in super-block while)的更多相关文章

  1. LVM XFS增加硬盘分区容量最后一步的时候动态扩容报错

    在我们lvextend扩容完之后,想动态扩容时出现错误.我们可以用以下命令来进行操作. 若不是xfs我们可以用resize2fs,这里报错了 [root@Mysql01-213-66 ~]# resi ...

  2. CentOS7上lvm分区调整(resize2fs: Bad magic number in super-block while trying to open ...)

    问题描述:根目录空间占用率100% 首先用传统resize2fs方式调整分区: resize2fs -p /dev/mapper/centos-home 50Gresize2fs 1.42.9 (28 ...

  3. resize2fs: Bad magic number in super-block while trying to open /dev/centos/root Couldn't find valid filesystem superblock

    今天在进行lvm扩容之后,按照惯例进行 resize2fs 操作,发现报如下错误: # resize2fs /dev/centos/root resize2fs 1.42.9 (28-Dec-2013 ...

  4. resize2fs: Bad magic number in super-block while trying to open

    I am trying to resize a logical volume on CentOS7 but am running into the following error: resize2fs ...

  5. LINUX下为LVM磁盘增加硬盘空间

    总结: ~~~~~~~~~~~~~~~~~~~~ fdisk -lpvcreate /dev/sdbvgextend VolGroup /dev/sdblvextend -L +180G /dev/m ...

  6. 使用fdisk给新增加硬盘分区

    1.使用fdisk创建6个分区[1P+1E(5L)]   //dev/sdb1 /dev/sdb5 /dev/sdb6 /dev/sdb7 /dev/sdb8 /deb/sdb9 [root@serv ...

  7. Ubuntu 16.04创建Swap分区或增加Swap分区容量(转)

    要在Ubuntu中要创建Swap分区主要有如下2种方式: 一.传统创建方式 一般情况下,我们都会使用dd命令来预先创建交换分区文件,然后再用/dev/zero将该文件的内容全部置零,创建时还将用到bs ...

  8. 【linux】新添加一块硬盘制作LVM卷并进行分区挂载

    linux服务器新添加一块硬盘,可以直接将盘格式化挂载就能用,比如挂载在/usr/local目录,但是这样有一个弊端,就是如果这一块磁盘满了,后续想要扩容的话,不能继续挂载这个/usr/local挂载 ...

  9. CentOS 挂载(U盘NTFS格式,新硬盘,增加交换分区,扩展根分区等)

    1.挂载fat或者fat32分区的U盘 如果是用VM安装的linux,在vm里挂载U盘有两个前提: 第一,主机里的service要启动: 第二,U盘是连接到虚拟机,而不是主机,需要确认这点: 2.使用 ...

随机推荐

  1. 第四课:seajs的模块编译_compile过程

    最近比较闲,我就讲下seajs的模块编译_compile过程. 这里紧接着第三课的例子来讲解.首先是a.js的编译 Module.prototype._compile = function() { 1 ...

  2. WebService学习笔记一

    01——Schema约束复习 1.1 schema约束 几个重要知识: 1.namespace 相当于schema文件的id 2.targetNamespace属性 用来指定schema文件的name ...

  3. web.xml中配置固定数据

    在web.xml单个servlet中配置的数据的存取 存: <servlet> <description>This is the description of my J2EE ...

  4. 50行代码仿backbone_todos

    <!doctype html> <html> <head> <meta charset="utf-8"> <title> ...

  5. ios消息

    Class typedef struct objc_class *Class; struct objc_class { Class isa OBJC_ISA_AVAILABILITY; #if !__ ...

  6. C#获取本机磁盘信息

    照着书敲的.留作笔记吧. using System; using System.Collections.Generic; using System.Linq; using System.Text; u ...

  7. 使用JMeter创建数据库(Mysql)测试

    我的环境:MySQL:mysql-essential-5.1.51-win32 jdbc驱动:我已经上传到csdn上一个:http://download.csdn.net/source/3451945 ...

  8. C# WPF 显示图片和视频显示 EmuguCv、AForge.Net测试(续)

    介绍 本文是接着上文<C# WPF 显示图片和视频显示 EmuguCv.AForge.Net测试>写的,建议先看下上文,因为有些代码还需要了解. 增添 接着上文的代码,我们可以在事件处理方 ...

  9. Xcode7中新技术

    Xcode7真加了两个重要的debug功能:1:Address Sanitizer: 再也不用担心 EXC_BAD_ACCESS 在项目的Scheme中Diagnostics下,选中enable ad ...

  10. Servlet------(声明式)异常处理

    Test.java 其他方法不变,重写 protected void service()方法 public void init(ServletConfig config) throws Servlet ...