FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Ubuntu > Ubuntu User

 
 
LinkBack Thread Tools
 
Old 12-14-2011, 03:01 PM
Colin Law
 
Default Confused about fsck

Every so often my system checks my disk on bootup. I thought that
this was done using fsck. It takes a couple of minutes to do the
check.

I have an external 250GB USB disk that I wish to check. I plug in the
disk and check it is not mounted (it appears as /dev/sdb1) and run
sudo fsck /dev/sdb1
This returns immediately saying that the disk is clean, whereas I had
expected it to take a little while checking things, so it does not
seem to be doing the same things that the check on startup does on the
built in disk. I can't see any options on fsck to specify what is to
be checked. Can someone explain what is going on?

Colin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-14-2011, 03:14 PM
Marius Gedminas
 
Default Confused about fsck

On Wed, Dec 14, 2011 at 04:01:16PM +0000, Colin Law wrote:
> Every so often my system checks my disk on bootup. I thought that
> this was done using fsck.

Yes.

> I have an external 250GB USB disk that I wish to check. I plug in the
> disk and check it is not mounted (it appears as /dev/sdb1) and run
> sudo fsck /dev/sdb1
> This returns immediately saying that the disk is clean, whereas I had
> expected it to take a little while checking things, so it does not
> seem to be doing the same things that the check on startup does on the
> built in disk.

It is doing the same thing fsck is doing to your built-in disk on every
boot: checking if the filesystem needs to be checked.

If the filesystem was not cleanly unmounted (e.g. you unplug the
external disk without first unmounting it), fsck will check it.

Otherwise it will see if the filesystem has been mounted X times since
last check (or, alternatively, if more than Y days have passed since the
last check). This is why your computer checks your system disk "every
so often".

Otherwise it will tell you the filesystem is clean and exit.

> I can't see any options on fsck to specify what is to
> be checked. Can someone explain what is going on?

Now if you want to do a full check, in case you don't trust the
'filesystem clean' bit, you can force a check with

sudo fsck -f /dev/sdb1


If you want to check for physical problems with the disk, use smartctl
(or the awesome GUI tool Palimpsest) instead.

Marius Gedminas
--
MSDOS didn't get as bad as it is overnight -- it took over ten years
of careful development.
-- dmeggins@aix1.uottawa.ca
--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-14-2011, 03:22 PM
Nils Kassube
 
Default Confused about fsck

Colin Law wrote:
> Every so often my system checks my disk on bootup. I thought that
> this was done using fsck. It takes a couple of minutes to do the
> check.

Yes, it is done by fsck.

> I have an external 250GB USB disk that I wish to check. I plug in
> the disk and check it is not mounted (it appears as /dev/sdb1) and
> run sudo fsck /dev/sdb1
> This returns immediately saying that the disk is clean, whereas I had
> expected it to take a little while checking things, so it does not
> seem to be doing the same things that the check on startup does on
> the built in disk. I can't see any options on fsck to specify what
> is to be checked. Can someone explain what is going on?

Your external disk probably hasn't been mounted often enough to force a
complete check. If it is a journalized file system like ext3/ext4, fsck
only checks if there is something to correct from the journal. If you
want to force a complete check anyway, you can use the -f option.


Nils

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-15-2011, 08:35 AM
Koh Choon Lin
 
Default Confused about fsck

Hi

> I have an external 250GB USB disk that I wish to check. *I plug in the
> disk and check it is not mounted (it appears as /dev/sdb1) and run
> sudo fsck /dev/sdb1
> This returns immediately saying that the disk is clean, whereas I had
> expected it to take a little while checking things, so it does not
> seem to be doing the same things that the check on startup does on the
> built in disk. *I can't see any options on fsck to specify what is to
> be checked. *Can someone explain what is going on?

Is your external drive a FAT32/NTFS system?



--
Regards
Koh Choon Lin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-15-2011, 10:37 AM
Colin Law
 
Default Confused about fsck

On 14 December 2011 16:14, Marius Gedminas <marius@pov.lt> wrote:
> On Wed, Dec 14, 2011 at 04:01:16PM +0000, Colin Law wrote:
>> ...
>> I can't see any options on fsck to specify what is to
>> be checked. *Can someone explain what is going on?
>
> Now if you want to do a full check, in case you don't trust the
> 'filesystem clean' bit, you can force a check with
>
> *sudo fsck -f /dev/sdb1

That is what I was looking for. I was confused by the fact that -f
does not appear on man fsck. I see now that that is because it is not
supplied by fsck but by e2fsck (or whatever).

Many thanks to yourself and the others that responded.

Colin

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 
Old 12-15-2011, 12:04 PM
Avi Greenbury
 
Default Confused about fsck

Koh Choon Lin wrote:
> Is your external drive a FAT32/NTFS system?

No - e2fsck wouldn't report it clean if it was.

--
Avi

--
ubuntu-users mailing list
ubuntu-users@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-users
 

Thread Tools




All times are GMT. The time now is 12:44 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org