LVM XFS增加硬盘分区容量(resize2fs: Bad magic number in super-block while)
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)的更多相关文章
- LVM XFS增加硬盘分区容量最后一步的时候动态扩容报错
在我们lvextend扩容完之后,想动态扩容时出现错误.我们可以用以下命令来进行操作. 若不是xfs我们可以用resize2fs,这里报错了 [root@Mysql01-213-66 ~]# resi ...
- 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 ...
- 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 ...
- 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 ...
- LINUX下为LVM磁盘增加硬盘空间
总结: ~~~~~~~~~~~~~~~~~~~~ fdisk -lpvcreate /dev/sdbvgextend VolGroup /dev/sdblvextend -L +180G /dev/m ...
- 使用fdisk给新增加硬盘分区
1.使用fdisk创建6个分区[1P+1E(5L)] //dev/sdb1 /dev/sdb5 /dev/sdb6 /dev/sdb7 /dev/sdb8 /deb/sdb9 [root@serv ...
- Ubuntu 16.04创建Swap分区或增加Swap分区容量(转)
要在Ubuntu中要创建Swap分区主要有如下2种方式: 一.传统创建方式 一般情况下,我们都会使用dd命令来预先创建交换分区文件,然后再用/dev/zero将该文件的内容全部置零,创建时还将用到bs ...
- 【linux】新添加一块硬盘制作LVM卷并进行分区挂载
linux服务器新添加一块硬盘,可以直接将盘格式化挂载就能用,比如挂载在/usr/local目录,但是这样有一个弊端,就是如果这一块磁盘满了,后续想要扩容的话,不能继续挂载这个/usr/local挂载 ...
- CentOS 挂载(U盘NTFS格式,新硬盘,增加交换分区,扩展根分区等)
1.挂载fat或者fat32分区的U盘 如果是用VM安装的linux,在vm里挂载U盘有两个前提: 第一,主机里的service要启动: 第二,U盘是连接到虚拟机,而不是主机,需要确认这点: 2.使用 ...
随机推荐
- C语言总结(6)
1.表达式: 算数表达式: 单目:+, -, ++, --. 双目:+,-,*,/,%. 赋值表达式: 简单赋值:= 复合赋值:+=,-=,*=,,/=%=,!=. 关系表达式: >,>= ...
- 今天学习到的关于mysql数据库的linux命令
1. 登录mysql数据库: mysql -uroot -p 2.安装会提示的mysql的数据库软件:mycli sudo apt-get install mycli 3.安装依赖包: sudo ap ...
- Codeforces Beta Round #6 (Div. 2 Only) D. Lizards and Basements 2 dp
题目链接: http://codeforces.com/problemset/problem/6/D D. Lizards and Basements 2 time limit per test2 s ...
- 设计模式之UML类图的常见关系(一)
本篇会讲解在UML类图中,常见几种关系: 泛化(Generalization),依赖(Dependency),关联(Association),聚合(Aggregation),组合(Compositio ...
- 让js的forin循环禁止forin到某个属性的话要怎么做
//知识点1:for In循环是可以枚举到继承的属性的://知识点2:使用defineProperty让属性无法通过forIn枚举到://知识点3:用definedProperty重新定义一个属性药把 ...
- BZOJ-2038 小Z的袜子(hose) 莫队算法
2038: [2009国家集训队]小Z的袜子(hose) Time Limit: 20 Sec Memory Limit: 259 MB Submit: 5573 Solved: 2568 [Subm ...
- 【蒟蒻の进阶PLAN】 置顶+持续连载
看到周围神犇们纷纷列计划,本蒟蒻也决定跟随他们的步伐,计划大约是周计划吧,具体怎么安排我也不确定.. 2015.12.30 刚刚学习完最基础的网络流,需要进行这方面的练习,从简到难,有空余的话尝试学习 ...
- Record is locked by another user --Oracle行锁解锁
Oracle修改表中记录时出现record is locked by another user的问题 在操作表时没有commit,导致表被锁,只要执行下面两行语句,就可以了将行锁解锁了. 1. ...
- 刨根问底拦不住——I/O模型
前言 看过很多资料,很多对I/O模型概念模糊甚至错误,希望这篇文章有助理解I/O,欢迎讨论和纠正 参考资料:<UNIX网络编程卷1> P122 I/O中涉及概念 介绍阻塞非阻塞,同步异步 ...
- mysql 视图(view)
什么是视图 视图是从一个或多个表中导出来的表,是一种虚拟存在的表. 视图就像一个窗口,通过这个窗口可以看到系统专门提供的数据. 这样,用户可以不用看到整个数据库中的数据,而之关心对自己有用的数据. 数 ...