Ask Your Question

How to check filesystem on mounted USB disk ?

asked 2015-03-12 13:35:29 -0500

Orriginal gravatar image

updated 2015-03-12 21:11:50 -0500

mether gravatar image

I have a 500Gb USB external Hard disk that I use to backup data. When copying files from this to my internal hard disk, it is reporting corrupted files and failing to copy all files over so I want to run FSCK on the drive BUT I am warned that I will cause Majot Damage to the file system if I do as the device is mounted

PLEASE..How can I check the file system and repair lost sectors on a mounted USB external drive.? thak you in advance

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted

answered 2015-03-12 17:04:51 -0500

updated 2015-03-13 13:51:46 -0500

Unmount the device and then fsck it. Are you able to determine the device name (/dev/sdc, for example)? You may try using lsblk to see your disk device tree; that should help you to identify the USB disk drive by its device name. Then, simply unmount it (umount /dev/sdc) and then fsck it (fsck /dev/sdc1, if it's a single-partition device).

I can help you with any steps that are difficult for you, but it should be a fairly simple process.

edit flag offensive delete link more


Does this work for FAT and FAT32 file systems ? I had the following output...

lsblk showed the USB drive as this

sdd 8:48 0 298.1G 0 disk └─sdd1 8:49 0 298.1G 0 part /run/media/angoose/TREKSTOR

So then I ran

[root@cestmoi-pc angoose]# fsck /dev/sdd1 fsck from util-linux 2.25.2 fsck.fat 3.0.27 (2014-11-12) 0x41: Dirty bit is set. Fs was not properly unmounted and some data may be corrupt. 1) Remove dirty bit 2) No action ? 2 There are differences between boot sector and its backup. This is mostly harmless. Differences: (offset:original/backup) 65:03/00 1) Copy original to backup 2) Copy backup to original 3) No action ? 3

Read 32 bytes at 120365498368:Input/output error

So I tried and got -

[root@cestmoi-pc angoose]# fsck /dev/sdd fsck from util-linux 2.25.2 e2fsck 1.42.12 ...(more)

Orriginal gravatar imageOrriginal ( 2015-03-13 13:20:47 -0500 )edit

Woah woah. It looks like you didn't actually unmount the file system before you ran fsck. You should unmount it first! Furthermore, you need to use the file system check utility appropriate to the file system. If you're trying to check a FAT32 file system, you should use fsck.vfat. The phrase you're asking about is explaining to you a potential alternate method for repairing the file system if it's actually an EXT file system. Since we know it's not, we can disregard it.

Read the manual pages and understand what you are doing before proceeding.

bitwiseoperator gravatar imagebitwiseoperator ( 2015-03-13 16:40:55 -0500 )edit

Thak you..I shall look into that So you know, I had unmouted with umount /dev/sdd1 before I tried any of this but maybe I shodl have umounted /dev/sdd

Orriginal gravatar imageOrriginal ( 2015-03-14 04:56:14 -0500 )edit

Job done Thak you

Orriginal gravatar imageOrriginal ( 2015-03-17 12:09:25 -0500 )edit

Excellent! Glad I could help.

bitwiseoperator gravatar imagebitwiseoperator ( 2015-03-17 12:57:45 -0500 )edit

Question Tools

1 follower


Asked: 2015-03-12 13:35:29 -0500

Seen: 7,379 times

Last updated: Mar 13 '15