Other Running <fsck> on [ext4] filesystem.

daemonpup

New Member

Reaction score: 1
Messages: 3

After a force restart, the (mounted) [ext4] filesystems became unaccessable,
- on FreeBSD-12.1,
- using ext2fs kernel module.

The [ext4] filesystems became not mountable (by superuser),
The error message was: "mount: /dev/... : Operation not permitted"

As fsck (standard) does not work on ext filesystems (which I tried), and also tried to use the following: fsck -t ext4, ended up with the following solution:
--> installed <e2fsprogs>
and after that the commands using <fsck> for ext2/3/4 were available, and I could run the following:
--> fsck.ext4 /dev/...

The checks ran, the filesystems became available again, and mountable.

My question is, that is this procedure the best solution, and/or are other ones?

What is the recommended - proper way of dealing with a not-clean linux filesystem?
(I did not post this in /guides, because I think a verified solution regarding this topic is needed)
 
OP
D

daemonpup

New Member

Reaction score: 1
Messages: 3

As far as I know it's the only solution.

Thank you for your fast answer.

I wanted to be sure, because it, -- that is dealing with a not-clean linux-filesystem (especially ext4) --, is not covered in Handbook, nor did I found any exact solution, explanation, or guide dealing with it even in Forum, nor did I found anything about it in the <fsck> man page, only that -t command, which obviously does not work with ext4 (but was worth a try). At first, I did have quite a problem, because I couldn't put this error message anywhere, why root has no permission to mount a filesystem was not really clear for me. After I searched for it, and I found some problems -somewhat alike- in Forum, and on the Web, at least I knew I have a not-clean filesystem. But because it is a linux-filesystem, and <fsck> can't handle it, I was kind of clueless, and had to wander for hours on the web to figure out how I can manage this. In the end I found this short guide: here. The problem is, it is from 2012, which means 8 years old. Well to be precise, it was 8 years and 4 days old when I wrote here in forum (13th). I was unsure if it still stands. And it was not official.

At least now it will be clear for everyone, when they have a not-clean linux-filesystem they have to install e2fsprogs, and then they can use the following commands, using <fsck>:

fsck.ext2
fsck.ext3
fsck.ext4

on the filesystem in question.
(if it is on the 2nd drive (IDE-disk), 2nd slice (primary partition), and ext2 filesystem, then like:

fsck.ext2 /dev/ada1s2


I think this topic, dealing with not-clean linux-filesystem, could be, or should be covered in Handbook, not only because it probably affects a quite reasonable percentage of users, but because of the fact of FreeBSD's capability of handling linux-filesystems alone.

There is no mention in Handbook of dealing with not-clean filesystems, not even about UFS, or ZFS. While possibly the majority of users of FreeBSD have the knowledge, and expertise regarding these cases, I do think, a topic/chapter about this in Handbook, dealing with not-clean filesystems, would be beneficial, and worthy and logical to be included. Maybe in a separate new, main chapter, like:

III. System Administration
---->
Handling errors and casual problems
A new main chapter, which could include the most usual, and most important type of problems, and their solutions, the actual way of handling them.
--------> Dealing with not-clean filesystems
- what does it mean
- when may it happen
- when it happens
- how to recognize it
- how to deal with it
- introduction to <fsck>
- checking filesystems's integrity using <fsck>
---- ufs
---- linux-filesystems
- filesystem check on startup

Or simply adding into other topics, like mounting, or linux-filesystems.
(but a new chapter would be more logical)


I do think it would be worthwile. I would even write it. But I do not have the sufficient knowledge about it. I am unsure about how ideas regarding Handbook are handled, but here I am presenting one, kindly.
 
OP
D

daemonpup

New Member

Reaction score: 1
Messages: 3

I know it's like when you see a guy in joggings and knitted pullover stepping into an AUDI dealership blabling about that his -wheel- from his SUZUKI what he somehow managed to mount on the AUDI he rented went full-flat, so he needed another tool to disassemble and re-mount it, but hey! it works again, but yay, keeps blabling, that the guys at dealership who gave him that AUDI for free why didn't give him a manual about dealing with a FLAT-SUZUKI-TIRE, so he wouldn't need to mumble around the town looking for a solution.
 
Top