Click to See Complete Forum and Search --> : 'Maximal mount count reached' - ext2fs- and tune2fs cron job problem


Ben Torrey
07-27-2001, 10:50 AM
One question I've tried to figure out but can't. I get the 'run ext2fs-maximal mount count' reached. I have an hourly cron job that mounts /dev/hdd6 and copies everything on my /home directory to another hard drive. It still does the job, but comes up with this 'maiximal mount count error message'.

In researching the problem, found that I can use tune2fs to set how many mounts can be done before running ext2fs, and I could set it but, I can't find any answer to this question:

How many times do I want to set using tune2fs? 100 300? how may are set now? I can't seem to see the settings.

Should I just add 'ext2fsck /dev/hdd6' to my mirror.sh script?

ext2fsk always runs without problem when I launch it from the command line, but do I want it as part of a cron job?

Malakin
07-27-2001, 09:48 PM
I'm not sure what the default number of mounts is before an fsck is forced, but you generally don't need it any more then once a month and even that is too often for most people.
If you have a cron job that mounts a drive and copies stuff over why don't you just mount the drive on startup and leave it mounted? If this isn't an option for some reason I'd just set the maximal mount count to 720 so it would only run fsck once a month.
I don't see any reason to put fsck into your script.

Ben Torrey
07-31-2001, 08:05 AM
Thanks, Idealogo! I'm continually thankful for all the awesome and talented people that monitor boards like this.

Keeping the drive mounted will work.

The only problem I see is security. If that drive is mounted, if someone hacks in they can effect/erase/messup that drive as well, so that's why I was thinking to mount and unmount it as a cron job.

Cool for now, and thanks again!
Ben

Linuxcool
07-31-2001, 11:10 PM
You might be able to continue to unmount and mount your partition without the maximal mount count comming up by adding tune2fs to your cron job to reset the mount count to a number that is less than the maximal mount count number. I believe the -C option will do the trick. Maybe something like this tune2fs -C 1.

Malakin
08-01-2001, 02:16 AM
If you set the maximal mount count to "-1" then it will disable it. I'd just set it to 720 so you wouldn't have to worry about running fsck manually.