LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   tune2fs -c 4 -C 3 (https://www.linuxquestions.org/questions/linux-general-1/tune2fs-c-4-c-3-a-340677/)

calutateo 07-06-2005 01:54 PM

tune2fs -c 4 -C 3
 
Dear all,

I am preparing for the LPI exam 201 and trying some commands related to objective 203.2 Maintenance of Linux filesystems.
Since I don't have any ext2 filesystems on my notebook, I created one myself:
Code:

rechner:~ # dd if=/dev/zero of=/root/ext2fs bs=512 count=512000
rechner:~ # losetup /dev/loop0 /root/ext2fs
rechner:~ # mkfs -t ext2 /dev/loop0
rechner:~ # mount -t ext2 /dev/loop0 /mnt

Code:

rechner:~ # tune2fs -c 4 -C 3 /dev/loop0
tune2fs 1.36 (05-Feb-2005)
Setting maximal mount count to 4
Setting current mount count to 3

Code:

rechner:~ # dumpe2fs /dev/loop0 | grep count
dumpe2fs 1.36 (05-Feb-2005)
Inode count:              64000
Block count:              256000
Reserved block count:    12800
Mount count:              3
Maximum mount count:      4

Code:

rechner:~/lvm # umount /mnt/
rechner:~/lvm # mount -t ext2 /dev/loop0 /mnt/

rechner:~/lvm # dumpe2fs /dev/loop0 | grep count
dumpe2fs 1.36 (05-Feb-2005)
Inode count:              64000
Block count:              256000
Reserved block count:    12800
Mount count:              4
Maximum mount count:      4

My question:
Shouldn't the system be checked now that the max count is reached?
What is wrong?

Regards, Carsten

Matir 07-06-2005 02:29 PM

I don't believe a manual "mount" triggers an fsck. Only a boot-time mount will cause fsck to check the partition, based on the fields in /etc/fstab.

calutateo 07-06-2005 03:13 PM

That sounds correct. I will keep on trying. Thank you.


All times are GMT -5. The time now is 04:16 AM.