LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 10-21-2009, 09:38 AM   #1
clunk
LQ Newbie
 
Registered: Sep 2009
Posts: 5

Rep: Reputation: 0
How to tell which FS type


I got stumped today on a question, one of those where you think 'that's easy'.

Colleague asked me 'How do I tell if the file system is ext3 or Reiser'. Half listening I replied 'fdisk -l'.

"NO, that only gives me type 83" came the reply. An hour of googling later, I honestly don't know how to do this really simple thing. Can someone tell me how to get that info natively without having to install anything extra?
 
Old 10-21-2009, 09:58 AM   #2
alphaniner
LQ Newbie
 
Registered: Jan 2009
Posts: 17

Rep: Reputation: 1
fsck -N should work, though there are probably better methods.
 
Old 10-21-2009, 11:50 AM   #3
ThinkFree
Member
 
Registered: Jan 2009
Location: India
Distribution: Fedora, Arch, OpenSolaris
Posts: 112

Rep: Reputation: 20
If the partition is mounted, you can find filesystem type using
Quote:
mount
or
Quote:
df -T
 
Old 10-21-2009, 02:32 PM   #4
clunk
LQ Newbie
 
Registered: Sep 2009
Posts: 5

Original Poster
Rep: Reputation: 0
No luck:

Code:
#fsck -N
fsck 1.41.3 (12-Oct-2008)
This is fine -
Code:
#df -T
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/sdb1     ext3   232140440 210167428  10180904  96% /
but I want to check an unmounted drive :-(
 
Old 10-21-2009, 03:42 PM   #5
alphaniner
LQ Newbie
 
Registered: Jan 2009
Posts: 17

Rep: Reputation: 1
LOL sorry, I assumed you were familiar with fsck. You need to include the partition:

Code:
$ fsck -N /dev/sda5
[/sbin/fsck.ext3 (1) -- /dev/sda5] fsck.ext3 /dev/sda5
$ fsck -N /dev/sda6
[/sbin/fsck.reiserfs (1) -- /dev/sda6] fsck.reiserfs /dev/sda6
Admittedly, not an elegant solution. Plus I don't know what would happen if you tried it with a non-supported FS; but the -N means "Don’t execute, just show what would be done" so I doubt it would hurt anything.

Last edited by alphaniner; 10-21-2009 at 04:05 PM.
 
Old 10-22-2009, 12:36 AM   #6
clunk
LQ Newbie
 
Registered: Sep 2009
Posts: 5

Original Poster
Rep: Reputation: 0
I must confess to never having needed to use fsck. I know it's out there - but my dealings with it have been limited. Now I've said that, you know what will happen.....

Thanks for the solution - problem now solved :-)
 
  


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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dual Boot Vista Suse 10.2 error setting type of partition to type 82 jmp559 Linux - General 1 05-15-2008 07:40 PM
Warning ___ specifies undefined mime type/service type mbvpixies78 Linux - Software 0 12-31-2007 07:44 AM
installing redhat 8.0 when text login in I cannot type password?? I type root scrist Linux - General 4 04-22-2006 03:20 AM
arrays of elements with [gcc4]array type has incomplete element type lmmix Linux - Software 0 02-26-2005 09:07 AM


All times are GMT -5. The time now is 01:07 PM.

Main Menu
 
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
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration