0

I'm trying to resize an Ext4 Google Cloud persistent disk from 14TB to 15 TB. I have an instance running Centos6. I increased the size of the disk in the cloud console. Now when I unmount the disk and try to run resize2fs it fails with this this error:

sudo resize2fs /dev/sdb
resize2fs 1.41.12 (17-May-2010)
resize2fs: Filesystem has unsupported feature(s) while trying to open 
/dev/sdb
Couldn't find valid filesystem superblock.

Any ideas or advice would be appreciated. Thanks.

José CM
  • 41
  • 5
as252522
  • 1
  • 1
  • Most likely the file system that you want to resize is not the disk device `/dev/sdb` but instead a partition on the device like `/dev/sdb1`. The command `fdisk -l` will list your disk partitions. Another possibility is that the file system is not EXT2. You would then need to use a file sytem resize command for that type of file system. – John Hanley Nov 22 '18 at 18:12
  • Disk /dev/sdb: 16106.1 GB, 16106127360000 bytes 255 heads, 63 sectors/track, 1958125 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 4096 bytes I/O size (minimum/optimal): 4096 bytes / 4096 bytes Disk identifier: 0x00000000 – as252522 Nov 22 '18 at 19:22
  • It doesn't look like it is partitioned from the result of fdisk. It is definitely EXT4. – as252522 Nov 22 '18 at 19:24
  • I overlooked the TB part of your question. MBR partitioned disks cannot be larger than 2 TB, so this must be raw formatted (e.g. no partition table). How are you sure that this is EXT4? How did you put a file sytem on this disk previously? You are very close to the max size for EXT4, so I would make sure that I have a backup in case you break the file system. – John Hanley Nov 22 '18 at 19:35
  • I've been using the partition for the past 4 months. I formatted it with: sudo mkfs.ext4 -m 0 -F -E lazy_itable_init=0,lazy_journal_init=0,discard /dev/sdb – as252522 Nov 22 '18 at 20:26
  • Are you automounting the partition? If yes, what is the mount statement in `/etc/fstab'? – John Hanley Nov 22 '18 at 20:46
  • What does the command `fsck.ext4 /dev/sdb` report? – John Hanley Nov 22 '18 at 20:47
  • If I remember correctly `Filesystem has unsupported feature` means that the superblock has flags set that are not supported by the tool that you are using. I am wondering if any of the mkfs options are affecting the resize comand. – John Hanley Nov 22 '18 at 20:50
  • Here is the fstab line: #UUID=862a271e-c22f-4495-ae88-696ce8bde6aa /mnt/disk-1 ext4 discard,defaults,nofail 0 2 – as252522 Nov 22 '18 at 20:53
  • This is on a live server. Not sure if it would be safe to run fsck.ext4 without unmounting the disk first. – as252522 Nov 22 '18 at 20:58
  • Clone the disk and test on the copy. I do not recommend testing on real data. Short of the resize program being out of date, I have run out of ideas for you. Once you can run fsck, double check what device the UUID maps to. – John Hanley Nov 22 '18 at 21:05
  • Thanks for all your help John Hanley. I'll keep working on this over the weekend. – as252522 Nov 22 '18 at 21:18
  • Seems like you have followed the documentation for ['Adding or Resizing Persistent Disks'](https://cloud.google.com/compute/docs/disks/add-persistent-disk). If the issue still persists, I would recommend you to open a ['issue-tracker report'](https://cloud.google.com/support/docs/issue-trackers) by mentioning all the reproduction steps along with the error logs(if any). – Digil Nov 28 '18 at 16:11

0 Answers0