LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-21-2007, 10:59 PM   #1
wearetheborg
Member
 
Registered: Sep 2004
Distribution: Mint 19.1
Posts: 298

Rep: Reputation: 41
How to do a disk check for ext3 ?


I was running bittorent on my external HDD (which had ext3).
Suddenlly the bittorrent client gave a write error, and all the files in the external HDD vanished.
How should I do a disk check ?

Also, what is the best filesystem for an external HDD ?
 
Old 07-21-2007, 11:04 PM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
fdisk and fsck
the man pages for each of these are quite readable.
 
Old 07-21-2007, 11:18 PM   #3
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
the best format for an externel hdd is FAT32 because all operating systems can read it
 
Old 07-22-2007, 12:05 AM   #4
wearetheborg
Member
 
Registered: Sep 2004
Distribution: Mint 19.1
Posts: 298

Original Poster
Rep: Reputation: 41
The filesystem is ext3.

I did this:
Code:
 # fsck.ext3 -r -v /dev/sdb
e2fsck 1.38 (30-Jun-2005)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to open /dev/sdb

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>
The filesystem is ext3 ad not ext2
 
Old 07-22-2007, 12:25 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Use the device for the partition, and not the disk.

Try /dev/sdb1 instead.

If you still get that error, then look at the output of "tune2fs -l /dev/sdb1". It may provide information on the locations of the alternate superblocks.
 
Old 07-22-2007, 01:40 AM   #6
wearetheborg
Member
 
Registered: Sep 2004
Distribution: Mint 19.1
Posts: 298

Original Poster
Rep: Reputation: 41
Quote:
Originally Posted by jschiwal
Use the device for the partition, and not the disk.

Try /dev/sdb1 instead.

If you still get that error, then look at the output of "tune2fs -l /dev/sdb1". It may provide information on the locations of the alternate superblocks.
Yup, that did the trick.
However there were thousands of errors. I got tired of presssing y after a while (it would not accept the a option).

I reformatted it, but now it seems the HDD has died
 
Old 07-22-2007, 05:08 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
now it seems the HDD has died
... this is usually the case.

Quote:
Originally Posted by AceofSpades19
the best format for
... "best" is not a good descriptor as it is just sooo subjective. B'sides, you have based your assessment on only one metric.

eg. fat32 is a poor choice as it is non-journaling and doesn't preserve permissions - it also responds poorly to unclean disconnections, which are more likely in an external drive - these things may outweigh the desire for portability, especially if the client is happy to install alternative fs support to non-linux machines.

If the drive needs to store very large files, or needs to be able to handle a great number of small files rapidly, the equation changes again.

See how the inclusion of other metrics changes your assessment. There was simply not enough information to make a recommendation.

Further, OP's issue was about a bad drive... using a different fs probably wouldn't have helped. It fact, ext3 at least offered some hope of recovering the lost data. (ext2 would, maybe, have been easier in this regard.)

You're normally more thoughtful than this... had a rough night?
 
Old 07-22-2007, 12:46 PM   #8
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
Quote:
Originally Posted by wearetheborg
I was running bittorent on my external HDD (which had ext3).
Suddenlly the bittorrent client gave a write error, and all the files in the external HDD vanished.
How should I do a disk check ?

Also, what is the best filesystem for an external HDD ?
He asked what the best filesystem was for externel harddrives, I'm used to flashdrives that have to be read on windows and linux machines
 
Old 07-22-2007, 01:33 PM   #9
wearetheborg
Member
 
Registered: Sep 2004
Distribution: Mint 19.1
Posts: 298

Original Poster
Rep: Reputation: 41
Sorry.
Say I'm only using the the external HDDs with linux.
And I'm using the external HDD extensively with bittorent.
 
Old 07-22-2007, 06:00 PM   #10
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
Quote:
He asked what the best filesystem was for externel harddrives,
... amday! I could have sworn I checked: 10:08pm (nz time) isn't too late either so I don't get to plead the 2am-effect

Don't flashdrives come pre-formatted with fat32 on a logical partition?

Windows won't make fat32 bigger than about 32GiG and I understand Vista won't creat fat32 at all(?) <checks> in-ter-rest-ting...
Quote:
first go into properties of the drive you are trying to format and give it a volume name. then open a command prompt in admin mode.then type

format fs:fat32 /a:32k (drive letter):

then it will ask for the volume label, type the name you put in the volume lable under properties section.
http://www.lavafactory.com/articles/...ing-limitation
... I am guessing this command uses 32k blocks.
Note the Windows shift back to the commandline!

Anyway... the upshot is that the "best is subjective" rant should have been directed at OP... who, I see, has got the message. Cool.

Last edited by Simon Bridge; 07-22-2007 at 06:01 PM.
 
Old 07-22-2007, 07:33 PM   #11
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
is there a reason why you have to constantly criticize my posts?
 
Old 07-22-2007, 07:56 PM   #12
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
is there a reason why you have to constantly criticize my posts?
... that is an excellent post: direct and to the point. Well done
 
Old 07-22-2007, 09:05 PM   #13
Darvocet
Member
 
Registered: Feb 2003
Location: United States
Distribution: RHEL, Slackware, Gentoo, Fedora, CentOS, Ubuntu, Debian
Posts: 66

Rep: Reputation: 15
Quote:
Originally Posted by wearetheborg
Yup, that did the trick.
However there were thousands of errors. I got tired of presssing y after a while (it would not accept the a option).

I reformatted it, but now it seems the HDD has died
If you add the -y flag you won't have to hit yes each time. If you tried to fsck the device "/dev/sda" it could cause serious filesystem damage. As could fscking while mounted.

Last edited by Darvocet; 07-22-2007 at 09:07 PM.
 
Old 07-22-2007, 09:06 PM   #14
Darvocet
Member
 
Registered: Feb 2003
Location: United States
Distribution: RHEL, Slackware, Gentoo, Fedora, CentOS, Ubuntu, Debian
Posts: 66

Rep: Reputation: 15
Quote:
Originally Posted by AceofSpades19
is there a reason why you have to constantly criticize my posts?
Please properly capitalize sentences, it's just hard to understand if you don't.
 
Old 07-22-2007, 09:18 PM   #15
AceofSpades19
Senior Member
 
Registered: Feb 2007
Location: Chilliwack,BC.Canada
Distribution: Slackware64 -current
Posts: 2,079

Rep: Reputation: 58
I was talking to Simon Bridge
 
  


Reply



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
ext3 check zghh Linux - Software 3 01-08-2007 08:00 AM
Disk check takes too long to check hemantm Linux - Hardware 16 12-22-2006 04:18 AM
FC6 - ext3 disk check Thoddy Fedora 2 10-26-2006 04:22 AM
Kernel Panic with Ext2/Ext3 partition check kewlemer Linux - General 3 04-06-2005 07:49 PM
Boot disk; check. CD in drive; check. Doesn't work; check. Hal DamnSmallLinux 7 02-04-2004 02:10 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:08 AM.

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
Open Source Consulting | Domain Registration