New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Partitioning woes
I tried repartitioning the disk on a kimsufi because I inadvertently didnt create enough space for the root partition.
I tried the following:
#parted Partition Table: msdos Number Start End Size Type File system Flags 1 2097kB 21.0GB 21.0GB primary ext4 boot 2 21.0GB 500GB 479GB primary ext4 3 500GB 500GB 536MB primary linux-swap(v1) (parted) rm 2 (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? ext4 Start? 41GB End? 500GB (parted) q Information: You may need to update /etc/fstab. #resize2fs /dev/sda2 resize2fs 1.42.5 (29-Jul-2012) resize2fs: Bad magic number in super-block while trying to open /dev/sda2 Couldn't find valid filesystem superblock.
fdisk list before operation: Device Boot Start End Blocks Id System /dev/sda1 * 4096 40962047 20478976 83 Linux /dev/sda2 40962048 975718399 467378176 83 Linux /dev/sda3 975718400 976764927 523264 82 Linux swap / Solaris Now fdisk shows: Device Boot Start End Blocks Id System /dev/sda1 * 4096 40962047 20478976 83 Linux /dev/sda2 80078848 975718399 447819776 83 Linux /dev/sda3 975718400 976764927 523264 82 Linux swap / Solaris
Unfortunately I cant seem to find why resizefs reports that Couldn't find valid filesystem superblock.
The OS is Debian wheezy.
This discussion has been closed.
Comments
Because you've removed the partition, hence there is no superblock.
https://www.centos.org/docs/5/html/Deployment_Guide-en-US/ch-disk-storage.html
Thank you for responding.
I deleted it, and created it again (to resize). My version of gnu parted doesnt seem to have a resize command. What I cant understand it is, if I do it like this:
The above creates the partition fine.
But if I change the start to 41GB, like this:
It doesnt work. See that the file system does not show 'ext4'.
Superblock is still in the same place. When you move the start position of the partition it is simply left behind, hence you have no superblock in your new range.
I would suggest to clone the partition in question (or dump an image), create it at the new location and then restore.
Some guide that explains it can be found here: https://help.ubuntu.com/community/MovingLinuxPartition
Flagged as resolved by thread starter.