lvm - resize2fs: Bad magic number in super-block while trying to open -
I am trying to resize a logical volume on CentOS7, but I am running in the following error:
resize2fs 1.42.9 (28-Dec-2013) resize2fs: The valid file system superblock could not be found by attempting to open the bad magic number / dev / mapper / centos-root in the super-block. I have tried to add a new partition (using fdisk) and using vgextend to increase the volume group, then resize the logical volume by using Lvextend OK worked fine, but it failed on resize2fs.
I have also tried to remove an existing partition (using fdisk) and try to rebuild it with a big end block, then change the size of the physical volume to Lvm pvresize, lvm lvresize After the size of the logical volume using
Hopefully some of the following shades will be some light
fdisk -l
[root @ server ~] # fdisk -l disk / Dev / xvda:. 32.2 GB, 32212254720 bytes, 62,914,560 areas units = areas 1 * 512 = 512 bytes area size (logical / physical) of: 512 bytes / 512 bytes I / O size (least / optimum): 512 bytes / 512 bytes disk label Type: DOS Disk Identifier: 0x0009323a Tool Boot Start End Blocks Eid System / Dev / xvda1 * 2048 1,026,047 512,000 83 Linux / Dev / xvda2 1,026,048 41,943,039 20,458,496 8e Linux LVM / dev / xvda3 41,943,040 62,914,559 10485760 8e Linux LVM Disk / dev / Map / CentO S-swap: 2147 MB, 2147483648 bytes, 4,194,304 areas units 1 * 512 = 512 bytes Sector size (logical / physical): 512 bytes / 512 bytes I / O size (minimum / optimum): 512 bytes / 512 byte disk / Dev / mapper / centos-root: 29.5 GB, 295320 9 4464 bytes, 57679872 sector units = 1 * 512 = 512 bytes ctors of sector-size (logical / physical): 512 bytes / 512 bytes I / O size (at least / Optimum): 512 bytes / 512 bytes pvdisplay [root @ server ~] #pvdisplay --- Physical section --- PV name / dev / xvda2 VG name centis PV size 19.51 giB / non-usable 2.00 MB allocator Yes (but full) PE size 4.00 MiB total PE 4994 Free PE allocated PE 4994 PV UUID 7bJOPh- OUK0-dGAs-2yqL-CAsV-TZeL-HfYzCt --- Physical volume --- PV name / dev / xvda3 VG name centos PV size 10.00 GiB / Not usable 4.00 MiB Allocatable Yes (but full) PE size 4.00 MiB total PE 2559 free PE allocated PE 2559 PV UUID p0IClg-5mrh-5WlL-eJ1v-t6Tm-flVJ-gsJOK6 vgdisplay
[heavy @ Server ~] # vgdisplay --- volume group --- metadata areas lvm2 vg name centos system id format 2 metadata sequence no 6 vg access read / write vg position resizable max lv 0 cur lv 2 open lv 2 max pv 0 ER PV2 Act PV 2 VG Size 29.50 Gb PE Size 4.00 MB Total PE 7553 ALOC PE / Size 7553/2 9.50 GiB Free PE / Size 0/0 VG UUID FD7k1M-koJt-2veW-sizL-Srsq-Y6zt- GcCfz6 lvdisplay
[root @ server ~] # lvdisplay --- logical volume --- LV Path / dev / centos / swap lv name swap VG name centos LV UUID KyokrR-NGsp-6jVA-L2 Write-write / write LV creation host reading time localhost, 2014-10-09 08:28: 42 +0100 lv Position available # open 2 lv. Size 2.00 GIB Current LE 512 Segment 1 Allocation Warrior Read more areas - currently set on 8192 Block Device 253: 0 --- Logical volume --- LV path / dev / CentOS / root LV name root VG name centos LV UUID ugCOcT- STDK-M8EV-3InM-hjIg-2nwS-KeAOnq LV Write Access Read / Write LV Construction Host, Time Local Host, 2014-10 -09 08:28:42 +0100 LV Position available # open 1 lv. Size 27.50 Gb Launching 7041 Section 2 Allocation Warrior Read More Fields - Set 8192 Block Devices At 253: 1: 1 I have probably done some stupid, so any help Will be greatly appreciated!
After some testing and error ... as mentioned in the answer as possible, call it Instead of xfs_growfs instead of resize 2fs . CentOS 7,
fdisk / dev / xvda create a new primary partition, set as linux Lvm . np 3 t 8e w Create a new primary volume and volume group the new volume. partprobe pvcreate / dev / xvda3 vgextend / dev / centos / dev / xvda3 Check the physical volume for the space, expand the logical volume Do with free space.
Then check the available space.
xfs_growfs / dev / centos / root df -h
Comments
Post a Comment