[Novalug] Number of file systems question

Peter Larsen peter@peterlarsen.org
Wed Aug 7 21:40:42 EDT 2013


On 08/07/2013 07:47 PM, cmhowe@patriot.net wrote:
> List,
>
> I'm pretty sure I want to try using fsck. There were power outages, but
> they occured recently and the problem is long standing. To prepare for
> using fsck, I want to figure out how many file systems there are. Before
> reading the Wikipedia article, which is long and then some, I'm asking
> you, List, to help me.

If you're not getting IO errors there isn't much need for you to run
fsck manually. The default behavior is that your system will
automatically check the file system every so often (use "tune2fs -l
<device>" to see how often the checks are done).

Every place you have files you have a file system of some kind.
Microsoft created first FAT, it got enhanced a few times, and around
Windows NT they had to move to NTFS as FAT had meet with it's physical
limits and couldn't get enhanced anymore. All of it were file systems -
but MS never really talked about them like that - they called them
"formats". With Linux and Unix we have a much wider range of such
"formats" or file systems. Linux uses EXT - most likely you're using
EXT4 which means you're using a journaled file system. This means, that
the file system is auto-correcting. Just like NTFS introduced journaling
fixing issues people had when crashing with a FAT formatted drive, you
would lose a lot of data (potentially) due to inconsistent writes to the
disk.  The journal fixed most of those issues, and EXT4 does the same
thing. BTFS and other modern filesystems do the same. The need to do
manual file-system checks are really minimum.

So since filesystems contains files, you find out the devices you have
running with files on by simply typing "mount" on the command line. File
systems are created on so-called block-devices - and there's a very nice
command called: lsblk
It will list every block-device and where they're mounted - it may be
easier to read the output from it than mount which will also list
devices that aren't physical. Another easy command to use is "df" -
which also lists you all file systems (including networked) and how much
space is left on them.

Be aware, that fsck cannot be run while the disk is active - or rather,
it can but in read-only mode. This is why your boot process will do an
automatic fsck every now and then before things are started/mounted. You
shouldn't even notice it anymore - it's so fast since there is a journal
file - that you're most likely not even aware that it's happening.
Unless it finds errors of course :)

fsck.ext4 is most likely the command you'll need to run it. Be sure to
pass it "force" otherwise it will simply tell you the filesystem is
clean and refuse to do much about it.

>
> Charlie
>
>
> _______________________________________________
> Novalug mailing list
> Novalug@calypso.tux.org
> http://calypso.tux.org/mailman/listinfo/novalug


-- 
Regards
  Peter Larsen




More information about the Novalug mailing list