LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 02-25-2023, 01:31 PM   #1
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: Fedora
Posts: 27

Rep: Reputation: 0
Repair GPT partition ?


I recently performed a clean install of Fedora 37
on to a 1TB SSD drive. I used a GPT partition table.

I have four data partitions, each 200G, named
/u1, /u2, /u3, /u4, all with Ext4.

After the initial install I booted up without problem.

Then, when I restored data to these partitions and rebooted.
I was put into emergency mode and found that I had errors
on partition /u3 (sda7)

Code:
  EXT4-fs error (device sda7): ext4_validate_block_bitmap: 398 comm ext4lazyinit: bg 1370: bad block bitmap checksum
When I removed /u3 (sda7) from /etc/fstab and booted,
the machine booted up without problem.

So, I deleted the /u3 (sda7) partition with GParted,
added it again and reformatted it.

When I loaded data on to the (sda7) partition AGAIN,
things went fine but when I test rebooted AGAIN,
the /u3 (sda7) partition still forced me into
emergency mode, because of EXT4-fs errors on this
partition.

---

What more can I do to fix this partition?

Is this SSD drive permanently damaged?
Is is less than two years old.

Might changing the file system of this
partition to btrfs make a difference?

Thank you for your help.
 
Old 02-25-2023, 03:52 PM   #2
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,496
Blog Entries: 1

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
It very well could be that the section of SSD where sda7 lives has bad spot or spots. Use smartctl -t long /dev/sda7 to test it, smartctl -x /dev/sda7 | less to evaluate the results after the long test completes. Before deleting the partition the first time you should have run a forced fsck on it. If you have any other disk you could use you could put a similar partition on it to restore u3's data to do be sure the data from your backup isn't causing a problem. Can you create new data on a freshly formatted sda7 without experiencing errors? The filesystem type is unlikely to play a role in this. SSDs are like any new electro-mechanical technology, subject to failure for random reasons. I've had 4-5 complete SSD failures out of about 20 SSDs of about a dozen brands in less than 5 years. I'm not thrilled about the SSD track record I've experienced.
 
1 members found this post helpful.
Old 02-25-2023, 09:45 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,378

Rep: Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190Reputation: 4190
I would try turning off lazyinit and see if the error still occurs. This will extend the mkfs time - noticably for a large partition.
Code:
mkfs -E lazy_itable_init=0,lazy_journal_init=0 /dev/sda7
 
Old 02-25-2023, 11:51 PM   #4
lvm_
Senior Member
 
Registered: Jul 2020
Posts: 1,513

Rep: Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515Reputation: 515
First, check the image file of the suspect partition by mounting it as loop device. Disk failing this way is unlikely, but check its SMART and logs for disk-related error messages. Also, partprobe will re-read partitions without rebooting.
 
Old 02-26-2023, 12:28 PM   #5
chicagocoyote
LQ Newbie
 
Registered: May 2009
Location: Chicago
Distribution: Fedora
Posts: 27

Original Poster
Rep: Reputation: 0
mrmazda wrote:
Quote:
Before deleting the partition the first time you should have run a forced fsck on it.
And that was the ticket. When I ran fsck on /dev/sda7,
numerous errors were corrected.


Then, when I loaded data onto /u3 again, there were no more errors
and the machine has booted up fine several times now.


I suspect that when I deleted and then re-added the /u3 partition
with GParted the first time, Gparted did not actually reformat
the partition, as I had thought.

Thank you all for your help.

Concerning fsck: rather than wait until a partition has a problem,
is fsck something that people run regularly on partitions,
just for regular maintenance?
 
Old 02-26-2023, 05:42 PM   #6
mrmazda
LQ Guru
 
Registered: Aug 2016
Location: SE USA
Distribution: openSUSE 24/7; Debian, Knoppix, Mageia, Fedora, OS/2, others
Posts: 6,496
Blog Entries: 1

Rep: Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230Reputation: 2230
Whether and when an admin should run a manual fsck is generally a judgement call. An admin can perform a fsck at any time desired, as long as the filesystem can be unmounted. As in your case, it can become mandatory as prerequisite to mounting and thus data access. On extX filesystem creation, a time interval and mount counts are configured in and for that filesystem. After the earliest test to occur, mounting is disallowed until fsck is performed. These limits are customizable with tune2fs to as little as never by time (-i0) and zero mounts (-c0). Each line in fstab designates whether and when a fsck may be performed automatically during the init process via the last column's value (0=not, 1=first, 2=after first).
man fstab
man mke2fs
man tune2fs
Other checking rules apply to other filesystem types.
 
1 members found this post helpful.
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
MBR or GPT for a external enclosure hard drive with a newer Widows 10 system with GPT james2b Linux - Newbie 10 10-27-2020 06:45 AM
[SOLVED] GPT table corrupted (again @%36372 GPT) BW-userx Linux - Hardware 5 08-29-2018 04:14 PM
[SOLVED] Repair Dual-Boot UEFI/GPT Malacoda93 Linux - General 7 05-08-2015 01:03 PM
How to Repair GPT Partitiontable Sunghost Linux - General 29 07-13-2014 04:03 PM
[SOLVED] Slackware 13.37 - gdisk choices, MBR, GPT or Blank GPT CFet Slackware - Installation 3 04-01-2011 04:46 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration