Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

My desktop runs Ubuntu 11.04 61-bit server with LVM. I use XFCE 4 as a GUI on top of the server. Recently, I get a message on every startup which says "/dev/sda1 was not properly unmounted. Check forced". After the check completes, it now shows that hard disk is "8% contiguous". A week ago it showed 4% contiguous and now it has gone up to 8%. I get the same message irrespective of whether I shutdown from the terminal or using XFCE's shutdown button.

How serious is this issue? Is there any serious risk of data damage/corruption? Is it time to get a new hard disk?

(edit: fix spelling of contigous, was "contagious")

share|improve this question
    
Can you double check that this message is not saying "8% contiguous"? Thanks. –  Danny Staple Sep 24 '11 at 22:04
    
@DannyStaple Checked it a number of times. Message actually spells it as "8% contiguous". –  Kaustav Das Modak Sep 25 '11 at 1:26
    
@KaustavDasModak: are you sure it does not say "non-contiguous"? That is what newly mounted ext3 sows in dmesg when mounted. +1 for "contagious", lol. –  eudoxos Sep 25 '11 at 10:42
    
@eudoxos Sorry for the spelling :D It surely showed up as "contagious" and not "non-contagious". The partition in question is an ext4 and not newly mounted. Thanks for pointing out the spelling error though :) –  Kaustav Das Modak Sep 25 '11 at 12:16
    
@KaustavDasModak: usual e2fsck run ends with line like /dev/sda2: 59586/30539776 files (0.6% non-contiguous), 3604682/61059048 blocks (note the non). If you really have 8% contiguous (i.e. 92% non-contiguous) data, it is pretty much a disaster; I don't really believe that. –  eudoxos Sep 25 '11 at 18:57
add comment

1 Answer

up vote 0 down vote accepted

"Contiguous" is referring not to some kind of corruption or virus, but is actually a measure of the file fragmentation, the percentage of files that are not fragmented. This will be coming not from LVM, but probably from the filesystem on top of the logical volumes, likely to be ext4.

A simple explanation is that when may small files are allocated, and then another larger more permanent file is allocated after. At some point later, some of the smaller files are then released, leaving gaps. You may then end up with plenty of free space, but the gaps are small.

Files that are then created, and larger than the gaps, may be split across a number of gaps - fragmentation, and the more this happens, the slower operations on the volume will become. This number 8% is the percentage of non-fragmented files. The number going up is a good thing - but you may be low on disk space given that it was such a low number initially.

share|improve this answer
    
Thanks! I was rather worried because my server was forcing a check on every startup saying "/dev/sda1 was not cleanly unmounted" and then it was throwing up this message. –  Kaustav Das Modak Sep 25 '11 at 12:18
    
It is by itself more serious if your volume is not unmounted cleanly at shutdown. –  eudoxos Sep 25 '11 at 18:58
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.