# [solved] unable to fix ext4 root partition

## yoshi314

i'm running a system on top of lvm inside of an encrypted partition.

recently i started getting errors as such :

```
[   26.803693] EXT4-fs (dm-6): warning: maximal mount count reached, running e2fsck is recommended
```

not comes the interesting part:

```
tune2fs -l /dev/system/gentoo

(....)

Mount count:              2

Maximum mount count:      9999
```

i've previously tried to set max mount count to 100 and 0. i also did fsck -f few times from another system on that partition (no errors). 

nothing helped, gentoo mounts it read-only and kernel insists that max mount count has been reached.

does anybody have some advice on the subject? that's really strange.

----------

## sasho23

Hi, I'm not sure, but I think that you have to use tune2fs on unmounted partition. Did you try it?

----------

## yoshi314

yes, i've booted into separate system, unmounted that partition and did e2fsck -f on it. also checked parameters with tune2fs -l . maximum mount count was definitely NOT reached. 

i really don't get it. right now my gentoo is in unusable state, because when it mounts / read-only it causes a lot of problems for openrc, and most services fail to start. 

remount / -o rw,remount has no problems with mounting my / read-write, though.

ps. i remember having similar problems when i specified data=writeback in fstab for my / . that was also very strange.

----------

## yoshi314

ok, now comes the interesting part. 

i finally got fed up with / on ext4. i tarred up my gentoo, unmounted the partition, removed it from lvm, created a new one and made ext3 on it.

same problem.

i tried again with reiserfs (v3) . same problem.

the most strange thing is that mount command says that my / is mounted as ext4 all the time.

----------

## Veldrin

Did you change your fstab, and had mtab time to rebuild (after localmount, mtab gets adapted to the current situation, otherwise it displays some old values)

Are all required modules inkernel, or in the initrd?

Did you change your kernel recently?

cheers

V.

----------

## yoshi314

no, i don't have / entry in fstab. i tried adding it, but it didn't change anything.

i didn't change kernel (i only tried rebuilding it with ext2,3,4 as modules - they were in-kernel previously).

if i use a kernel from another distribution i have the same problem. 

dmesg doesn't state any errors when mounting partitions.

----------

## Veldrin

what exactly are you trying to mount? (post the exact command please)

What "alternative" system were you using? Can you repeat the error with gentoo installCD or systemrescuecd?

cheers

V.

----------

## yoshi314

 *Quote:*   

>  	what exactly are you trying to mount? (post the exact command please) 

 

the root partition. unfortunately initscripts mount it read-only. no command here,as it happens automatically - and openrc cannot create a log file on read-only root :/

alternative system is arch linux installed on a different partition in the same lvm volume group.

the error does not appear when i mount the partition under another system (into /mnt/somewhere ). fsck does not report anything wrong.

different kernel also cannot mount gentoo / read-write. my guess is that something got messed up in initscripts, reinstalling baselayout and openrc does not help.

----------

## yoshi314

i think i've figured it out. 

i've recreated the partition and reinstalled gentoo from scratch on reiserfs partition.

it gave me similar error on bootup, but / was read-write, though. 

i think this time the problem was due to defaults,noatime entry in fstab and wrong order in "pass" column,

i'd mark this solved for now.

----------

