LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-06-2011, 02:33 PM   #1
jg1
LQ Newbie
 
Registered: Nov 2007
Location: UK
Posts: 6

Rep: Reputation: 0
maximal mount count reached - how can I fix fstab to run e2fsck or run it manually?


I'm running Ubuntu Lucid on a Compaq Presario which has a 500GB disk installed as well as the standard 120GB device. The 120GB drive has 30GB Windows (NTFS) partition(sda1) and a 35GB Ubuntu (ext4) partition (sda5). There's 1.5GB swap space (sda6) and a 50GB encrypted (ext4) partition (sda2). The 500GB disk (sdb) contains a single encrypted (ext4) partition. The encryption engine is Truecrypt.

That all seems to work fine but if I leave a USB memory stick plugged in the reboot hangs. No big deal. Pull out the USB stick and it fires up OK. However I've been experimenting with various backup regimes and the the one I've chosen to use is Back-In-Time. This goes fine and chugs away happily in the background. However, every now and then the machine locks up and I can't be certain of the integrity of the back-up. But that's not the problem.

In the course of investigating this problem I've discovered the syslog which tells me there are all sorts of evil happenings down in the works. In particular I get occasional messages that say things like:
"maximal mount count reached, running e2fsck is recommended".
This usually coincides with my using 2 external USB HDD drives as well as the internal stuff and I've found that if I dismount everything I'm not actually using, this message doesn't occur. However, I've no idea whether it's a hardware limitation (eg SCSI or IDE architecture) or BIOS/Linux and I've not been able to put in place a means of cleaning up any FS corruption that might be occurring.

I have discovered two threads that are helpful in explaining my problem:

http://www.linuxquestions.org/questi...mended-848788/

http://www.linuxquestions.org/questi...mended-153676/

but as a numpty I've no idea of how to formulate the text of the /etc/fstab file or how to run e2fsck manually. Can someone help me, pls?

My /etc/fstab file currently looks like this:

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda5 during installation
UUID=ccf875dc-0572-463b-8400-5aa964a2e611 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=ae7b0ab4-5b00-4037-b026-c25129840d7a none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0

and a couple of examples of the syslog messages are as follows:

Aug 6 05:59:34 Jenny kernel: [42891.437058] usb 1-4: configuration #1 chosen from 1 choice
Aug 6 05:59:34 Jenny kernel: [42891.441553] scsi7 : SCSI emulation for USB Mass Storage devices
Aug 6 05:59:34 Jenny kernel: [42891.442921] usb-storage: device found at 8
Aug 6 05:59:34 Jenny kernel: [42891.442925] usb-storage: waiting for device to settle before scanning
Aug 6 05:59:39 Jenny kernel: [42896.440527] usb-storage: device scan complete
Aug 6 05:59:39 Jenny kernel: [42896.440983] scsi 7:0:0:0: Direct-Access Hitachi HDT721010SLA360 PQ: 0 ANSI: 2 CCS
Aug 6 05:59:39 Jenny kernel: [42896.443937] sd 7:0:0:0: Attached scsi generic sg5 type 0
Aug 6 05:59:39 Jenny kernel: [42896.445211] sd 7:0:0:0: [sde] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
Aug 6 05:59:39 Jenny kernel: [42896.445952] sd 7:0:0:0: [sde] Write Protect is off
Aug 6 05:59:39 Jenny kernel: [42896.445956] sd 7:0:0:0: [sde] Mode Sense: 34 00 00 00
Aug 6 05:59:39 Jenny kernel: [42896.445959] sd 7:0:0:0: [sde] Assuming drive cache: write through
Aug 6 05:59:39 Jenny kernel: [42896.447451] sd 7:0:0:0: [sde] Assuming drive cache: write through
Aug 6 05:59:39 Jenny kernel: [42896.447455] sde: sde1 sde2
Aug 6 05:59:39 Jenny kernel: [42896.467204] sd 7:0:0:0: [sde] Assuming drive cache: write through
Aug 6 05:59:39 Jenny kernel: [42896.467212] sd 7:0:0:0: [sde] Attached SCSI disk
Aug 6 05:59:40 Jenny kernel: [42897.564906] EXT4-fs (sde1): warning: maximal mount count reached, running e2fsck is recommended
Aug 6 05:59:40 Jenny kernel: [42897.565325] EXT4-fs (sde1): recovery complete
Aug 6 05:59:40 Jenny kernel: [42897.565670] EXT4-fs (sde1): mounted filesystem with ordered data mode
Aug 6 05:59:49 Jenny kernel: [42906.004088] Aborting journal on device dm-3-8.
Aug 6 05:59:49 Jenny kernel: [42906.004218] Buffer I/O error on device dm-3, logical block 121667584
Aug 6 05:59:49 Jenny kernel: [42906.004222] lost page write due to I/O error on dm-3
Aug 6 05:59:49 Jenny kernel: [42906.004230] JBD2: I/O error detected when updating journal superblock for dm-3-8.
Aug 6 06:01:15 Jenny kernel: [42992.077091] EXT4-fs error (device dm-3): ext4_journal_start_sb: Detected aborted journal
Aug 6 06:01:15 Jenny kernel: [42992.077101] EXT4-fs (dm-3): Remounting filesystem read-only
Aug 6 06:02:37 Jenny kernel: [43074.420145] EXT4-fs error (device dm-3): __ext4_get_inode_loc: unable to read inode block - inode=57410569, block=229638240
Aug 6 06:02:37 Jenny kernel: [43074.424230] EXT4-fs error (device dm-3): __ext4_get_inode_loc: unable to read inode block - inode=57422396, block=229638979
Aug 6 06:02:37 Jenny kernel: [43074.428068] EXT4-fs error (device dm-3): __ext4_get_inode_loc: unable to read inode block - inode=11149326, block=44565024
Aug 6 06:02:37 Jenny kernel: [43074.432128] EXT4-fs error (device dm-3): __ext4_get_inode_loc: unable to read inode block - inode=11149328, block=44565024
Aug 6 06:02:56 Jenny kernel: [43093.769573] usb 1-4: USB disconnect, address 8


Aug 6 06:29:34 Jenny AptDaemon: INFO: Initializing daemon
Aug 6 06:33:11 Jenny kernel: [ 319.040027] usb 1-3: new high speed USB device using ehci_hcd and address 3
Aug 6 06:33:11 Jenny kernel: [ 319.174699] usb 1-3: configuration #1 chosen from 1 choice
Aug 6 06:33:11 Jenny kernel: [ 319.193977] Initializing USB Mass Storage driver...
Aug 6 06:33:11 Jenny kernel: [ 319.194144] scsi2 : SCSI emulation for USB Mass Storage devices
Aug 6 06:33:11 Jenny kernel: [ 319.194358] usbcore: registered new interface driver usb-storage
Aug 6 06:33:11 Jenny kernel: [ 319.194362] USB Mass Storage support registered.
Aug 6 06:33:11 Jenny kernel: [ 319.204583] usb-storage: device found at 3
Aug 6 06:33:11 Jenny kernel: [ 319.204587] usb-storage: waiting for device to settle before scanning
Aug 6 06:33:16 Jenny kernel: [ 324.204316] usb-storage: device scan complete
Aug 6 06:33:16 Jenny kernel: [ 324.205034] scsi 2:0:0:0: Direct-Access SAMSUNG HD501LJ 0-10 PQ: 0 ANSI: 2 CCS
Aug 6 06:33:16 Jenny kernel: [ 324.207795] sd 2:0:0:0: Attached scsi generic sg4 type 0
Aug 6 06:33:16 Jenny kernel: [ 324.209143] sd 2:0:0:0: [sdc] 976773168 512-byte logical blocks: (500 GB/465 GiB)
Aug 6 06:33:16 Jenny kernel: [ 324.209888] sd 2:0:0:0: [sdc] Write Protect is off
Aug 6 06:33:16 Jenny kernel: [ 324.209894] sd 2:0:0:0: [sdc] Mode Sense: 00 38 00 00
Aug 6 06:33:16 Jenny kernel: [ 324.209897] sd 2:0:0:0: [sdc] Assuming drive cache: write through
Aug 6 06:33:16 Jenny kernel: [ 324.218583] sd 2:0:0:0: [sdc] Assuming drive cache: write through
Aug 6 06:33:16 Jenny kernel: [ 324.218595] sdc: sdc1 sdc2
Aug 6 06:33:16 Jenny kernel: [ 324.262973] sd 2:0:0:0: [sdc] Assuming drive cache: write through
Aug 6 06:33:16 Jenny kernel: [ 324.262982] sd 2:0:0:0: [sdc] Attached SCSI disk
Aug 6 06:33:16 Jenny kernel: [ 324.752713] EXT4-fs (sdc1): mounted filesystem with ordered data mode
Aug 6 06:33:16 Jenny init: ureadahead-other main process (1438) terminated with status 4
Aug 6 06:34:33 Jenny kernel: [ 401.130371] padlock: VIA PadLock not detected.
Aug 6 06:34:33 Jenny ntfs-3g[1511]: Version 2010.3.6 external FUSE 28
Aug 6 06:34:33 Jenny ntfs-3g[1511]: Mounted /dev/mapper/truecrypt1 (Read-Write, label "", NTFS 3.1)
Aug 6 06:34:33 Jenny ntfs-3g[1511]: Cmdline options: rw,uid=1000,gid=1000,umask=077
Aug 6 06:34:33 Jenny ntfs-3g[1511]: Mount options: rw,silent,allow_other,nonempty,relatime,fsname=/dev/mapper/truecrypt1,blkdev,blksize=4096,default_permissions
Aug 6 06:34:33 Jenny ntfs-3g[1511]: User mapping built, configuration type 1
Aug 6 06:34:33 Jenny init: ureadahead-other main process (1509) terminated with status 4
Aug 6 06:34:35 Jenny AptDaemon: INFO: Quiting due to inactivity
Aug 6 06:34:35 Jenny AptDaemon: INFO: Shutdown was requested
Aug 6 06:34:41 Jenny kernel: [ 409.057442] EXT4-fs (dm-1): warning: maximal mount count reached, running e2fsck is recommended
Aug 6 06:34:41 Jenny kernel: [ 409.062509] EXT4-fs (dm-1): recovery complete
Aug 6 06:34:41 Jenny kernel: [ 409.062933] EXT4-fs (dm-1): mounted filesystem with ordered data mode
Aug 6 06:34:41 Jenny init: ureadahead-other main process (1546) terminated with status 4
Aug 6 06:34:46 Jenny kernel: [ 414.304056] EXT4-fs (dm-2): mounted filesystem with ordered data mode
Aug 6 06:34:46 Jenny init: ureadahead-other main process (1581) terminated with status 4
Aug 6 07:05:12 Jenny ntfs-3g[1511]: Unmounting /dev/mapper/truecrypt1 ()
Aug 6 07:05:12 Jenny ntfs-3g[1511]: Permissions cache : 7 writes, 1804 reads, 99.7% hits
Aug 6 07:05:12 Jenny kernel: [ 2240.263212] device-mapper: ioctl: unable to remove open device truecrypt1
Aug 6 07:05:12 Jenny kernel: [ 2240.396284] device-mapper: ioctl: unable to remove open device truecrypt1
Aug 6 07:05:19 Jenny nautilus: [N-A] Nautilus-Actions Menu Extender 2.30.2 initializing...
Aug 6 07:05:19 Jenny nautilus: [N-A] Nautilus-Actions Tracker 2.30.2 initializing...
Aug 6 07:05:42 Jenny kernel: [ 2270.136031] usb 1-4: new high speed USB device using ehci_hcd and address 4
Aug 6 07:05:42 Jenny kernel: [ 2270.277119] usb 1-4: configuration #1 chosen from 1 choice
Aug 6 07:05:42 Jenny kernel: [ 2270.300033] scsi3 : SCSI emulation for USB Mass Storage devices
Aug 6 07:05:42 Jenny kernel: [ 2270.303471] usb-storage: device found at 4
Aug 6 07:05:42 Jenny kernel: [ 2270.303475] usb-storage: waiting for device to settle before scanning
Aug 6 07:05:47 Jenny kernel: [ 2275.304024] usb-storage: device scan complete
Aug 6 07:05:47 Jenny kernel: [ 2275.304539] scsi 3:0:0:0: Direct-Access Hitachi HDT721010SLA360 PQ: 0 ANSI: 2 CCS
Aug 6 07:05:47 Jenny kernel: [ 2275.305079] sd 3:0:0:0: Attached scsi generic sg5 type 0
Aug 6 07:05:47 Jenny kernel: [ 2275.322141] sd 3:0:0:0: [sdd] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
Aug 6 07:05:47 Jenny kernel: [ 2275.322872] sd 3:0:0:0: [sdd] Write Protect is off
Aug 6 07:05:47 Jenny kernel: [ 2275.322876] sd 3:0:0:0: [sdd] Mode Sense: 34 00 00 00
Aug 6 07:05:47 Jenny kernel: [ 2275.322879] sd 3:0:0:0: [sdd] Assuming drive cache: write through
Aug 6 07:05:47 Jenny kernel: [ 2275.324518] sd 3:0:0:0: [sdd] Assuming drive cache: write through
Aug 6 07:05:47 Jenny kernel: [ 2275.324523] sdd: sdd1 sdd2
Aug 6 07:05:47 Jenny kernel: [ 2275.347871] sd 3:0:0:0: [sdd] Assuming drive cache: write through
Aug 6 07:05:47 Jenny kernel: [ 2275.347878] sd 3:0:0:0: [sdd] Attached SCSI disk
Aug 6 07:05:47 Jenny kernel: [ 2275.936147] EXT4-fs (sdd1): warning: maximal mount count reached, running e2fsck is recommended
Aug 6 07:05:47 Jenny kernel: [ 2275.936597] EXT4-fs (sdd1): recovery complete
Aug 6 07:05:47 Jenny kernel: [ 2275.936603] EXT4-fs (sdd1): mounted filesystem with ordered data mode
Aug 6 07:05:47 Jenny init: ureadahead-other main process (1821) terminated with status 4
Aug 6 07:06:09 Jenny ntfs-3g[1859]: Version 2010.3.6 external FUSE 28
Aug 6 07:06:09 Jenny ntfs-3g[1859]: Mounted /dev/mapper/truecrypt4 (Read-Write, label "", NTFS 3.1)
Aug 6 07:06:09 Jenny ntfs-3g[1859]: Cmdline options: rw,uid=1000,gid=1000,umask=077
Aug 6 07:06:09 Jenny ntfs-3g[1859]: Mount options: rw,silent,allow_other,nonempty,relatime,fsname=/dev/mapper/truecrypt4,blkdev,blksize=4096,default_permissions
Aug 6 07:06:09 Jenny ntfs-3g[1859]: User mapping built, configuration type 1
Aug 6 07:06:09 Jenny init: ureadahead-other main process (1855) terminated with status 4
Aug 6 07:06:20 Jenny kernel: [ 2308.186343] EXT4-fs (dm-1): warning: maximal mount count reached, running e2fsck is recommended
Aug 6 07:06:20 Jenny kernel: [ 2308.188638] EXT4-fs (dm-1): mounted filesystem with ordered data mode
Aug 6 07:06:20 Jenny init: ureadahead-other main process (1897) terminated with status 4
Aug 6 07:06:38 Jenny kernel: [ 2326.396095] EXT4-fs (dm-3): warning: maximal mount count reached, running e2fsck is recommended
Aug 6 07:06:38 Jenny kernel: [ 2326.464932] EXT4-fs (dm-3): recovery complete
Aug 6 07:06:38 Jenny kernel: [ 2326.464942] EXT4-fs (dm-3): mounted filesystem with ordered data mode
Aug 6 07:06:38 Jenny init: ureadahead-other main process (1942) terminated with status 4
Aug 6 07:08:53 Jenny ntfs-3g[1859]: Unmounting /dev/mapper/truecrypt4 ()
 
Old 08-06-2011, 03:14 PM   #2
eSelix
Senior Member
 
Registered: Oct 2009
Location: Wroclaw, Poland
Distribution: Arch, Kubuntu
Posts: 1,254

Rep: Reputation: 314Reputation: 314Reputation: 314Reputation: 314
Truecrypt containers are not mounted through fstab file, so altering it give you nothing. You did not write how you mount it. If you want to manually fschk it, first check what is where mounted by typing
Code:
truecrypt -l
next unmount given volume or all and next type
Code:
fsck /dev/mapper/truecrypt1
fsck /dev/mapper/truecrypt2
and so on.
 
Old 08-06-2011, 06:17 PM   #3
jg1
LQ Newbie
 
Registered: Nov 2007
Location: UK
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by eSelix View Post
Truecrypt containers are not mounted through fstab file, so altering it give you nothing. You did not write how you mount it. If you want to manually fschk it, first check what is where mounted by typing
Code:
truecrypt -l
next unmount given volume or all and next type
Code:
fsck /dev/mapper/truecrypt1
fsck /dev/mapper/truecrypt2
and so on.
Hi, eSelix
Tks for your quick response.
Normally I use the Auto-Mount facility in the Truecrypt GUI to mount Truecrypt volumes. They all have the same password and they normally load in a predictable order:
/dev/sda2 - truecrypt1
/dev/sdb - truecrypt2
/dev/sdc2 - truecrypt3 etc etc

Further to my original post (above), I remembered that /dev/sda2 (usually mounted as truecrypt1) is in fact an NTFS volume so I dismounted truecrypt2 as you suggested (using the Truecrypt GUI) but when I used fsck I got the following output:

root@Jenny:/home/jg# fsck /dev/mapper/truecrypt2
fsck from util-linux-ng 2.17.2
e2fsck 1.41.11 (14-Mar-2010)
fsck.ext2:No such file or diectory while trying to open /dev/mapper/truecrypt2

The superblock could not be read or does not describe a correct ext2 filesystem. If the device is valid and it really contains an ext2 filesystem (and not swap or ufs or something else), then the superblock is corrupt, and you might try running e2fsck with an alternate superblock: e2fsck -b 8193 <device&gt;

My reading of this is that Truecrypt will only decrypt volumes or containers if they are mounted which requires the decrypt algorithm to be running with the correct password. Hence when fsck tries to read the file structure control blocks it either can't find them or gets garbage back, as the decryption algorithm isn't running. The only way to check Truecrypt volumes (as far as I am aware) is at the moment they are mounted, before control is given to the requesting App. I think this is how ChkDsk and Defrag works in WindowsNT so I assumed that there was a similar parameter file somewhere (which I assumed was fstab) which says to Linux "Run fsck next time you get to mount this volume" (ie truecrypt[N]) in a similar way to a Windows specific "Drive Letter".

I ran ChkDsk on dev/sda2 and it ran OK. It found no errors so had nothing to fix, thank heavens!
Any further ideas would be much appreciated.
 
Old 08-06-2011, 06:43 PM   #4
jg1
LQ Newbie
 
Registered: Nov 2007
Location: UK
Posts: 6

Original Poster
Rep: Reputation: 0
Sorry eSelix I malign you and have not tried hard enough to execute the fix you suggested....
By going in as root and using

umount /dev/mapper/truecrypt2

rather than the Truecrypt GUI I was able to dismount the volume while retaining the decryption. Then using

fsck.ext4 /dev/mapper/truecrypt2 -p -v

it told me it had been mounted 176 times without check and it had 146883 inodes and the space was 25% used. It said nothing about any errors so I assume there were none to fix.
I will try this on the other Truecrypt volumes and the unencrypted partitions, too.

Tks for your help
jg1

and he went on his way rejoicing........

Last edited by jg1; 08-06-2011 at 06:52 PM.
 
Old 08-06-2011, 07:09 PM   #5
jg1
LQ Newbie
 
Registered: Nov 2007
Location: UK
Posts: 6

Original Poster
Rep: Reputation: 0
Another wrinkle, should this be of help to others with a similar query....

If you are using the GUI and have one or more Truecrypt volumes mounted, you can right click on them to bring down a menu including check/repair FS which automatically dismounts the volume and runs fsck, or in my case fsck.ext4. But against the NTFS volume it said "fsck.ntfs not found".

And to think of the hours I've spent trying to find how to do this!
jg1
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
maximal mount count reached, running e2fsck is recommended Iyyappan Red Hat 7 12-07-2010 04:24 AM
trying to fix xwindows or just run command line... changing run levels dave247 Debian 2 11-18-2008 07:11 PM
computer asks me to run a FSCK Manually, but won't : says can't run on mounted lightwave Linux - Newbie 12 04-02-2008 01:25 AM
fs damage. e2fsck will not run to fix linux partition aya_rei Linux - Software 4 02-23-2005 09:55 AM
warning: maximal mount count reached, running e2fsck is recommended Donboy Linux - Hardware 1 03-05-2004 01:16 AM


All times are GMT -5. The time now is 08:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration