Author Topic: Linux:: EXT4-fs odds?!?  (Read 2429 times)

0 Members and 1 Guest are viewing this topic.

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Linux:: EXT4-fs odds?!?
« on: April 03, 2020, 10:40:32 am »
One year ago I formatted a hard drive as Ext3, and installed Linux.

and I saw and ignored these weird messages

but I continuously see these messages
Code: [Select]
EXT4-fs (sda3): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)

One year later I tried to convert it into Ext4

Code: [Select]
#tune2fs -O extents,uninit_bg,dir_index /dev/sda3

but I still see these messages

Code: [Select]
EXT4-fs (sda3): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)
EXT4-fs (sda3): re-mounted. Opts: (null)

and it makes no sense for me

Code: [Select]
#cat /etc/fstab | grep sda3
/dev/sda3       /               ext4            noatime         0 1

Code: [Select]
#cat /etc/fstab | grep sda3
/dev/sda3       /               ext4            noatime         0 1

Code: [Select]
#cat /etc/mtab
/dev/sda3 / ext4 rw 0 0
none /proc proc rw 0 0
none /sys sysfs rw 0 0
mpme /dev/pts devpts rw 0 0



but wait, see this

Code: [Select]
#file -s /dev/sda3
/dev/sda3: Linux rev 1.0 ext3 filesystem data (needs journal recovery) (large files)


I am a bit confused ...


edit:
typo fixed
« Last Edit: April 03, 2020, 12:38:09 pm by 0db »
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #1 on: April 03, 2020, 10:47:34 am »
You should do a repair as the last message says with fsck. All behaviour are suspect on an inconsistent filesystem. The tune2fs requires a clean filesystem if you follow the instructions..
 

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #2 on: April 03, 2020, 12:08:41 pm »
Code: [Select]
# fsck.ext4 -f /dev/sda3

I have already checked, and there is any problem reported by fsck. Besides, the above warning-messages were present even one year ago and they are the same warning-messages.

 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #3 on: April 03, 2020, 12:15:21 pm »
In your tune2fs command you specified sda4. Is that a typo or is that copy and paste?
 

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #4 on: April 03, 2020, 12:37:29 pm »
In your tune2fs command you specified sda4. Is that a typo or is that copy and paste?

typo.
 

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #5 on: April 03, 2020, 12:42:04 pm »
Shouldn't "file -s /dev/sda3" report "Ext4" for an Ext3-converted-into-Ext4 ?
That's odd

 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #6 on: April 03, 2020, 12:53:07 pm »
I would say your conversion didn't succeed so I would treat it as ext3 until it's fixed. So use fsck.ext3 to fix any errors, then run tune2fs again before attempting to test it or mount it again.

Or maybe it's neither here nor there and the only way out is to copy the data off it, then format it ext4 from the beginning, then restore the data.
 
The following users thanked this post: Kilrah

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #7 on: April 03, 2020, 01:00:51 pm »
I would say your conversion didn't succeed so I would treat it as ext3 until it's fixed. So use fsck.ext3 to fix any errors, then run tune2fs again before attempting to test it or mount it again.

already checked: fsck.ext3 -f /dev/sda3 ---> no problem
already checked: fsck.ext4 -f /dev/sda3 ---> no problem
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #8 on: April 03, 2020, 01:23:29 pm »
This for example is what file shows on an ext4 filesystem:

/dev/md126: Linux rev 1.0 ext4 filesystem data, UUID=77bebd8b-beab-449e-9b77-f040a8508614 (extents) (large files) (huge files)

I think your filesystem is stuffed.
 

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #9 on: April 03, 2020, 01:33:02 pm »
hence converting Ext3 into Ext4 is not a good idea. Let's backup and reformat it.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #10 on: April 04, 2020, 08:42:29 am »
I think your original mistake was attempting the migration on an unclean ext3 filesystem. The full instructions require that you fix any inconsistencies with fsck.ext3 before running tune2fs. Perhaps that version of tune2fs didn't check for a consistent filesystem, recent versions may. As such you probably got a filesystem that was neither here nor there.

I have done ext3 to ext4 migration many times without issues.
 
The following users thanked this post: Kilrah

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #11 on: April 04, 2020, 09:49:15 am »
I think your original mistake was attempting the migration on an unclean ext3 filesystem. The full instructions require that you fix any inconsistencies with fsck.ext3 before running tune2fs.

before tune2fs, I checked it with fsck and it reported no problems.


 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #12 on: April 04, 2020, 09:53:18 am »
Yet, file -s showed that the journal needed recovering. So if the problem didn't happen then it was caused by something else you did. Anyway too late now.
 

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #13 on: April 04, 2020, 10:03:05 am »
I seriously think migrating from Ext3 to Ext4 was not good idea

I have a second computer with Ext4 here, it's a server and it crashed a couple of days ago. When checked it reported
Code: [Select]
fsck.ext4  -f /dev/hda6
e2fsck 1.44.5 (15-Dec-2018)
Pass 1: Checking inodes, blocks, and sizes
Inodes that were part of a corrupted orphan linked list found.  Fix<y>? yes
Inode 53202 was part of the orphaned inode list.  FIXED.
Inode 53203 was part of the orphaned inode list.  FIXED.
Inode 53204 was part of the orphaned inode list.  FIXED.
Inode 53206 was part of the orphaned inode list.  FIXED.
Inode 53207 was part of the orphaned inode list.  FIXED.
Inode 70082 was part of the orphaned inode list.  FIXED.
Inode 70087 was part of the orphaned inode list.  FIXED.
Inode 70095 was part of the orphaned inode list.  FIXED.
Inode 70097 was part of the orphaned inode list.  FIXED.
Inode 70104 was part of the orphaned inode list.  FIXED.
Inode 70106 was part of the orphaned inode list.  FIXED.
Inode 74981 was part of the orphaned inode list.  FIXED.
Inode 160446 was part of the orphaned inode list.  FIXED.

e2fsck is v1.44.5 (15-Dec-2018) and it was able to check and identifies problems with Ext4 on the crashed server, but not able to report any problem on the computer migrated from Ext3 to Ext4.

... perhaps, because the server is being Ext4 since the beginning ...
« Last Edit: April 04, 2020, 10:12:30 am by 0db »
 

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #14 on: April 04, 2020, 10:05:04 am »
Yet, file -s showed that the journal needed recovering. So if the problem didn't happen then it was caused by something else you did. Anyway too late now.

indeed too late
- badblock to check the integrity of the physical hard drive
- I will repartition it and reformat sdc3 into Xfs
 

Offline madires

  • Super Contributor
  • ***
  • Posts: 8141
  • Country: de
  • A qualified hobbyist ;)
Re: Linux:: EXT4-fs odds?!?
« Reply #15 on: April 04, 2020, 10:10:09 am »
Best current practice is to backup data, reformat partition with ext4 and restore data. A direct migration won't create a complete ext4. It's a well known issue.
 
The following users thanked this post: 0db

Offline 0dbTopic starter

  • Frequent Contributor
  • **
  • Posts: 336
  • Country: zm
Re: Linux:: EXT4-fs odds?!?
« Reply #16 on: April 04, 2020, 10:11:07 am »
Best current practice is to back up data, reformat partition with ext4 and restore data. A direct migration won't create a complete ext4. It's a well known issue.

Lesson learned  :D
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #17 on: April 04, 2020, 10:43:26 am »
e2fsck is v1.44.5 (15-Dec-2018) and it was able to check and identifies problems with Ext4 on the crashed server, but not able to report any problem on the computer migrated from Ext3 to Ext4.

The thing is it never went to ext4, the migration didn't succeed and you then mounted it as ext4. That would be a problem. One of the steps is to check that it really is ext4 before trying to mount it.

Best practice is to do a backup of anything important. You can do the migration and if it succeeds you have saved a restore. Of course it's better if you start with ext4, but sometimes in real life you don't have the luxury because you have to do the change in place and hope that you won't need to activate plan B.
 
The following users thanked this post: 0db

Offline madires

  • Super Contributor
  • ***
  • Posts: 8141
  • Country: de
  • A qualified hobbyist ;)
Re: Linux:: EXT4-fs odds?!?
« Reply #18 on: April 04, 2020, 02:25:02 pm »
From https://docs.fedoraproject.org/en-US/Fedora/14/html/Storage_Administration_Guide/ext4converting.html:

Quote
Whenever possible, create a new ext4 file system and migrate your data to it instead of converting from ext3 to ext4. This ensures a better metadata layout, allowing for the enhanced performance natively provided by ext4.
 

Offline greenpossum

  • Frequent Contributor
  • **
  • Posts: 408
  • Country: au
Re: Linux:: EXT4-fs odds?!?
« Reply #19 on: April 05, 2020, 04:09:14 am »
Best current practice is to backup data, reformat partition with ext4 and restore data. A direct migration won't create a complete ext4. It's a well known issue.

To be precise, what happens is that existing files do not use the new features such as extents so you don't get full performance on those, but files created afterwards will. That includes copies, so if you know that a file needs the performance, say a DB file, you could make a copy and rename to the original name. While it's not in use, of course. Hopefully that's what you mean by "complete". It is a valid ext4 filesystem after conversion.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf