Results 1 to 8 of 8

Thread: Screwy FS after using parted and resize2fs

  1. #1
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    Screwy FS after using parted and resize2fs

    So I added a few disks and removed the only partition from /dev/sdb1 and created a new one at the same starting sector, running resize2fs to fill out the FS into all of my lovely new space. Rebooted a few times since then, no worries, everything in that partition (so far) works fine.

    It's only today that I happened to run fsck and it tells me I don't have a valid superblock, so I try to get the fs info with tune2fs -l and that bombs out straight away with 'Couldn't find valid filesystem superblock'.

    As I say things appear fine, but obviously they aren't. Any ideas?
    Last edited by yamangman; 02-06-2011 at 10:48 AM.
    To err is human. To really foul things up ... you need a computer.

  2. #2
    Gentoo Ricer
    Join Date
    Jan 2005
    Location
    Galway
    Posts
    11,048
    Thanks
    1,016
    Thanked
    944 times in 704 posts
    • aidanjt's system
      • Motherboard:
      • Asus Strix Z370-G
      • CPU:
      • Intel i7-8700K
      • Memory:
      • 2x8GB Corsiar LPX 3000C15
      • Storage:
      • 500GB Samsung 960 EVO
      • Graphics card(s):
      • EVGA GTX 970 SC ACX 2.0
      • PSU:
      • EVGA G3 750W
      • Case:
      • Fractal Design Define C Mini
      • Operating System:
      • Windows 10 Pro
      • Monitor(s):
      • Asus MG279Q
      • Internet:
      • 240mbps Virgin Cable

    Re: Screwy FS after using parted and resize2fs

    So it mounts fine but e2fs utilities don't work?

    Probably a minor alignment issue caused by parted that for some odd reason the kernel can compensate for but the fs utils can't. I'd backup everything and recreate the filesystem. You wouldn't want the fs to become degraded and not being able to use the fs utils on it.
    Quote Originally Posted by Agent View Post
    ...every time Creative bring out a new card range their advertising makes it sound like they have discovered a way to insert a thousand Chuck Norris super dwarfs in your ears...

  3. Received thanks from:

    yamangman (02-06-2011)

  4. #3
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    Re: Screwy FS after using parted and resize2fs

    Sound advice. I've chosen a not so safe option and run mke2fs with the -n switch to see where my superblock backups might be, and made a couple of attempts to restore from those locations. It found a valid one eventually, but running fsck with no-to-all finds a bazillion errors on the FS unfortunately, but mounting and using the FS R/W everything still seems fine.

    I'm expecting data loss if I let fsck work its magic on so many 'fixes' though.
    To err is human. To really foul things up ... you need a computer.

  5. #4
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    Re: Screwy FS after using parted and resize2fs

    I wonder am I missing a trick with managing this file server? Is there some software available to abstract the notion of partitions, that I can easily increase/decrease/add and remove partitions and resize their filesystems' with ease? I've heard of ZFS and LVM of course but i wonder if that's what I'm after.
    To err is human. To really foul things up ... you need a computer.

  6. #5
    Comfortably Numb directhex's Avatar
    Join Date
    Jul 2003
    Location
    /dev/urandom
    Posts
    17,074
    Thanks
    228
    Thanked
    1,027 times in 678 posts
    • directhex's system
      • Motherboard:
      • Asus ROG Strix B550-I Gaming
      • CPU:
      • Ryzen 5900x
      • Memory:
      • 64GB G.Skill Trident Z RGB
      • Storage:
      • 2TB Seagate Firecuda 520
      • Graphics card(s):
      • EVGA GeForce RTX 3080 XC3 Ultra
      • PSU:
      • EVGA SuperNOVA 850W G3
      • Case:
      • NZXT H210i
      • Operating System:
      • Ubuntu 20.04, Windows 10
      • Monitor(s):
      • LG 34GN850
      • Internet:
      • FIOS

    Re: Screwy FS after using parted and resize2fs

    Quote Originally Posted by yamangman View Post
    I wonder am I missing a trick with managing this file server? Is there some software available to abstract the notion of partitions, that I can easily increase/decrease/add and remove partitions and resize their filesystems' with ease? I've heard of ZFS and LVM of course but i wonder if that's what I'm after.
    LVM handles the partitions part, and you can resize filesystems on a live mounted box with modern EXT3/4

  7. #6
    Senior Member watercooled's Avatar
    Join Date
    Jan 2009
    Posts
    11,459
    Thanks
    1,539
    Thanked
    1,022 times in 868 posts

    Re: Screwy FS after using parted and resize2fs

    Moving the start point of a partition can be very lengthy, in my experience it's often quicker to just delete and re-create the partition and copy the data back. Plus resizing has failed for me a few times (corrupted contents).

  8. #7
    Senior Member oolon's Avatar
    Join Date
    Mar 2007
    Location
    London
    Posts
    2,294
    Thanks
    150
    Thanked
    302 times in 248 posts
    • oolon's system
      • Motherboard:
      • Asus P6T6
      • CPU:
      • Xeon w3680
      • Memory:
      • 3*4GB Kingston ECC
      • Storage:
      • 160GB Intel G2 SSD
      • Graphics card(s):
      • XFX HD6970 2GB
      • PSU:
      • Corsair HX850
      • Case:
      • Antec P183
      • Operating System:
      • Windows 7 Ultimate and Centos 5
      • Monitor(s):
      • Dell 2408WFP
      • Internet:
      • Be* Unlimied 6 down/1.2 up

    Re: Screwy FS after using parted and resize2fs

    Next time use LVM on your disks, can use it to slice up a single disk or make filesystems go over multiple, also you can expand and reduce volumes. It will also allow you to move your data from one disk to another, while it live and in use!
    (\__/) All I wanted in the end was world domination and a whole lot of money to spend. - NMA
    (='.*=)
    (")_(*)

  9. #8
    Large Member
    Join Date
    Apr 2004
    Posts
    3,720
    Thanks
    47
    Thanked
    99 times in 64 posts

    Re: Screwy FS after using parted and resize2fs

    My RAID card supports ORM and various other goodies, do these volume managers work in conjunction with this or will it just treat the volumes I create using it as any other disk?
    To err is human. To really foul things up ... you need a computer.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •