WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: e2fsck  (Read 4057 times)

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
e2fsck
« on: April 16, 2013, 11:46:38 AM »
When TC regenerates the fstab it sets the sixth column for the e2fsck to zero which disables it. Does that mean it will not run
when system is not shut down properly. For example the rebuilding of what in the journal is done by e2fsck?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11500
Re: e2fsck
« Reply #1 on: April 16, 2013, 11:52:49 AM »
Hi mbertrand
Yes, you need to make sure the drive is unmounted and run e2fsck manually. This may mean booting from a CD
if the drive in question is your boot drive. If you go to the search page and enter  e2fsck  you should find other threads
that have discussed this.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: e2fsck
« Reply #2 on: April 16, 2013, 12:49:00 PM »
Well I searched and I can seem the find answer to following question: when does fsck run?

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11022
Re: e2fsck
« Reply #3 on: April 16, 2013, 12:53:29 PM »
TC does not run fsck for you.
The only barriers that can stop you are the ones you create yourself.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: e2fsck
« Reply #4 on: April 16, 2013, 01:19:04 PM »
Sorry for not understanding then who does the Kernel? What is fstab 6th column actually do?
And what about counter and max counter for fsck?
When I run "tune2fs -l /dev/sdb1" I see my counter is greater then my max counter and the last date never changed.
Like it never ran. Do you know what are the condition for it to run?

My messages file has "EXT4-fs (sdb1): warning: maximal mount count reached, running e2fsck is recommended" Should this had not run when I rebooted if my counter reached its max?
« Last Edit: April 16, 2013, 01:22:15 PM by mbertrand »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: e2fsck
« Reply #5 on: April 16, 2013, 01:32:23 PM »
If you want fsck to run, you must run it manually after making sure the filesystem is not mounted.
Core is not a full blown distribution like Ubuntu.
It is a toolkit.  You must learn what tools are available and how to use them.

Offline mbertrand

  • Full Member
  • ***
  • Posts: 225
Re: e2fsck
« Reply #6 on: April 16, 2013, 01:35:06 PM »
That's ok I just wanted to make sure  nothing was wrong.

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: e2fsck
« Reply #7 on: April 16, 2013, 01:40:18 PM »
Yes.  We are not running sysv init.  The init is a shell script: /etc/init.d/tc-config.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: e2fsck
« Reply #8 on: April 16, 2013, 04:33:28 PM »
Yes, you need to make sure the drive is unmounted and run e2fsck manually. This may mean booting from a CD if the drive in question is your boot drive.

Hmm...
This makes me realize that I have never given attention to boot loader access following an unclean shutdown.
Wondering now if there could be a risk.
But the way I remember traditional scatter GNU systems, they would mount "/" read-only at first to be able to run a "fsck -n" at each boot, but then that happens way after the boot loader is done and has handed over to the kernel.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: e2fsck
« Reply #9 on: April 16, 2013, 05:47:34 PM »
Unless you have opt= or home= bootcodes, the disk is only written to during the 'backup' phase of shutdown.

Offline tinypoodle

  • Hero Member
  • *****
  • Posts: 3857
Re: e2fsck
« Reply #10 on: April 16, 2013, 06:25:29 PM »
That depends on user's habits and on mode.
In mount mode /tce dir must be mounted read-write and is written to not only when downloading extensions but also when using functions of "tce-audit".

Personally I try to run backup frequently, to reduce risk of data loss.
Statistically I have probably accessed mydata.tgz as a literal backup to restore prior versions of selected files more often than running restore at boot.
I happen to hardly ever voluntarily run shutdown (I do use suspend).

In any case, if backup is written to disk at shutdown, then most likely it is not an unclean shutdown which would require a fsck before mounting fs read-write.
"Software gets slower faster than hardware gets faster." Niklaus Wirth - A Plea for Lean Software (1995)

aus9

  • Guest
Re: e2fsck
« Reply #11 on: April 16, 2013, 08:08:12 PM »
guys

What about this idea?  It looks like e2fsck (for us normal users) is a part of base.

If we had  e2fsck.tcz (= e2fsprogs.tcz) and we loaded it then ran
Code: [Select]
sudo umount /mnt/sdxn
sudo e2fsck /dev/sdxn

eg sdxn = sda1

Would that work?

I hope so as I assume the tcz is in RAM

If so,  I could volunteer to have a go at submitting one. I am a dinosaur and use only Linux type partitions so not sure what others might use.
« Last Edit: April 16, 2013, 08:25:28 PM by aus9 »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11500
Re: e2fsck
« Reply #12 on: April 16, 2013, 08:19:21 PM »
Hi aus9
You can't unmount the drive if it's in use. So that means no extensions on that drive loop mounted, and no persistent
/home or /opt. That's why I suggested booting from a CD, possibly with the base boot code so it doesn't try to mount
extensions from a hard drives /tce directory.


aus9

  • Guest
Re: e2fsck
« Reply #13 on: April 16, 2013, 08:28:22 PM »
Rich

Fair enough

Do SCMs get loaded into RAM and not loop mounted?

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11500
Re: e2fsck
« Reply #14 on: April 16, 2013, 08:33:43 PM »
Hi aus9
SCMs are loop mounted. I don't know if there is a copy to RAM option for them.