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. angular-scope.assign

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

  2. Moqui学习Day1

    运行时目录以及Moqui的xml配置文件 Moqui框架部署运行主要有三个核心部分: 可执行的war包文件 运行时目录 Moqui配置文件XML格式 不管怎么使用这个可执行的war文件,你必须拥有一个 ...

  3. NS图绘制工具推荐

    世界上要画NS图的人肯定很少,这种无聊的东西= = 我根据个人经验和直觉,推荐三个套工具. 一.签字笔(铅笔+橡皮)+作业纸+拍照的手机 鉴于我以前手绘版ns图已经找不到了,就用室友之前画的做个例子. ...

  4. Dedecms include\dialog\select_soft_post.php Upload Any Files To The Specified Directory Via Variable Not Initial Flaw Bypass Extension Defence

    目录 . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 综合来说,这个漏洞的根源是"register_globals = on& ...

  5. Entity Framework 学习总结之一:ADO.NET 实体框架概述

    http://www.cnblogs.com/xlovey/archive/2011/01/03/1924800.html ADO.NET 实体框架概述 新版本中的 ADO.NET 以新实体框架为特色 ...

  6. #pragma预处理实例

    1.#include <stdio.h>#if defined(ANDROID20)    #pragma message("Compile Android SDK 2.0... ...

  7. js中网页图片自动更换的效果

    <script> var arr=new Array(); arr[]="url(images/city.jpg)"; arr[]="url(images/d ...

  8. Machine Learning Methods: Decision trees and forests

    Machine Learning Methods: Decision trees and forests This post contains our crib notes on the basics ...

  9. iOS exit(0); 直接退出程序

    exit();

  10. 锋利的jQuery-1--jQuery对象和DOM对象以及相互转化

    DOM对象: document object model,文档对象模型,每一份dom都可以表示成一棵树. 如下图所示,代码省略 在这颗dom树种,h3, p, ul以及ul的3个li子节点都是dom元 ...