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.使用 ...
随机推荐
- angular-scope.assign
<!doctype html> <html> <head> <meta charset="utf-8"> <title> ...
- 5.9-4用字符串生成器给字符串str追加1~10这10个数字
package zfc; public class ZfcShcq { public static void main(String[] args) { // TODO Auto-generated ...
- Java基础-四要素之一《继承》
继承的概念: 继承在本职上是特殊——一般的关系,即常说的is-a关系.子类继承父类,表明子类是一种特殊的父类,并且具有父类所不具有的一些属性或方法. 继承是所有OOP语言不可缺少的部分,在java中使 ...
- c#创建ISS站点
private void CreateWebSite() { try { string installPath = "C:\\Program Files\\MyWeb"; stri ...
- 修改Oracle权限的SQL及常见错误
1.在cmd命令中进入sqlplus:相应的在DOS命令下执行:(1)set ORACLE_SID = $INSTANCE_NAME(2)sqlplus /nolog(3)connect user/p ...
- BZOJ2121 字符串游戏
Description BX正在进行一个字符串游戏,他手上有一个字符串L,以及其 他一些字符串的集合S,然后他可以进行以下操作:对于一个在集合S中的字符串p,如果p在L中出现,BX就可以选择是否将其删 ...
- poj 1006 中国剩余定理解同余方程
其实画个图就明白了, 该问题就是求同余方程组的解: n+d≡p (mod 23) n+d≡e (mod 28) n+d≡i (mod 33) #include "iostream" ...
- 面试题52:缺少i的乘积数组
vector<int> multiply(const vector<int>& A) { int len = A.size(); vector<); result ...
- linux安全加固(1)
Redhat是目前企业中用的最多的一类Linux,而目前针对Redhat攻击的黑客也越来越多了.我们要如何为这类服务器做好安全加固工作呢? 一. 账户安全 1.1 锁定系统中多余的自建帐号 检查方法: ...
- 深入浅出 - Android系统移植与平台开发(五)- 编译Android源码(转)
2.3编译Android源码 Android源码体积非常庞大,由Dalvik虚拟机.Linux内核.编译系统.框架代码.Android定制C库.测试套件.系统应用程序等部分组成,在编译Android源 ...