I am trying to resize a logical volume on anycodings_centos7 CentOS7 but am running into the following anycodings_centos7 error:
resize2fs 1.42.9 (28-Dec-2013) resize2fs: Bad magic number in super-block while trying to open /dev/mapper/centos-root Couldn’t find valid filesystem superblock.
I have tried adding a new partition (using anycodings_centos7 fdisk) and using vgextend to extend the anycodings_centos7 volume group, then resizing. Resize worked anycodings_centos7 fine for the logical volume using lvextend, anycodings_centos7 but it failed at resize2fs.
I have also tried deleting an existing anycodings_centos7 partition (using fdisk) and recreating it anycodings_centos7 with a larger end block, then resizing the anycodings_centos7 physical volume using lvm pvresize, followed anycodings_centos7 by a resize of the logical volume using lvm anycodings_centos7 lvresize. Again everything worked fine up to anycodings_centos7 this point.
Once I tried to use resize2fs, using both anycodings_centos7 methods as above, I received the exact same anycodings_centos7 error.
Hopefully some of the following will shed anycodings_centos7 some light.
fdisk -l
[[email protected]~]# fdisk -l Disk /dev/xvda: 32.2 GB, 32212254720 bytes, 62914560 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x0009323a Device Boot Start End Blocks Id System /dev/xvda1 * 2048 1026047 512000 83 Linux /dev/xvda2 1026048 41943039 20458496 8e Linux LVM /dev/xvda3 41943040 62914559 10485760 8e Linux LVM Disk /dev/mapper/centos-swap: 2147 MB, 2147483648 bytes, 4194304 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk /dev/mapper/centos-root: 29.5 GB, 29532094464 bytes, 57679872 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes
pvdisplay
[[email protected] ~]# pvdisplay – Physical volume – PV Name /dev/xvda2 VG Name centos PV Size 19.51 GiB / not usable 2.00 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 4994 Free PE 0 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 0 Allocated PE 2559 PV UUID p0IClg-5mrh-5WlL-eJ1v-t6Tm-flVJ-gsJOK6
vgdisplay
[[email protected] ~]# vgdisplay – Volume group – VG Name centos System ID Format lvm2 Metadata Areas 2 Metadata Sequence No 6 VG Access read/write VG Status resizable MAX LV 0 Cur LV 2 Open LV 2 Max PV 0 Cur PV 2 Act PV 2 VG Size 29.50 GiB PE Size 4.00 MiB Total PE 7553 Alloc PE / Size 7553 / 29.50 GiB Free PE / Size 0 / 0 VG UUID FD7k1M-koJt-2veW-sizL-Srsq-Y6zt-GcCfz6
lvdisplay
[[email protected] ~]# lvdisplay – Logical volume – LV Path /dev/centos/swap LV Name swap VG Name centos LV UUID KyokrR-NGsp-6jVA-P92S-QE3X-hvdp-WAeACd LV Write Access read/write LV Creation host, time localhost, 2014-10-09 08:28:42 +0100 LV Status available # open 2 LV Size 2.00 GiB Current LE 512 Segments 1 Allocation inherit Read ahead sectors auto – currently set to 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 Creation host, time localhost, 2014-10-09 08:28:42 +0100 LV Status available # open 1 LV Size 27.50 GiB Current LE 7041 Segments 2 Allocation inherit Read ahead sectors auto – currently set to 8192 Block device 253:1
I’ve probably done something stupid, so any anycodings_centos7 help would be greatly appreciated!