[mythtv-users] Does JFS filesystem need defragment?

George Mari george_mythusers at mari1938.org
Tue Nov 13 01:35:58 UTC 2007

James Oltman wrote:
> I also use JFS and last week I had a big time scare.  I'm running 5x500 GB
> SATA drives in a mdadm RAID5 On MythDora 4.0.  I was having trouble with
> changing ownership of all the files/folders on the drive.  So I stopped the
> mythbackend service and umounted the drive.  I went to remount it, and it
> wouldn't mount.  I was TERRIFIED.  I was getting these cryptic error
> messges.  After some research, I decided to run a file check on the drive.
> So I downloaded the jfs-utils RPM and ran that.  It found some errors and
> fixed them.  I only have about 200GBs left on that RAID array.  I'm
> considering adding more drives.  Should I not be using JFS since
> fragmentation might have caused this issue?  I know XFS has issues with 4K
> stacks which is what Mythdora uses IIRC.  Any ideas?
> Jim

I guess it depends on the error messages you encountered.

I have been running JFS on my myth backend for just over 2 years now. 
My storage is configured as a 6 x 181GB drive SCSI RAID5 using mdadm. 
It started as a 2 drive LVM on JFS, I migrated to a 4-drive RAID 5 
(still with JFS), then added the original 2 drives to the RAID5, still 
with JFS, migrating recordings and resizing the JFS file system along 
the way.  Shortly after I setup the 6 drive array, I had a drive fail. 
I did not have a spare and had to order one.  I continued to record 
programs for a couple of days, and while I was waiting for the spare(s) 
to arrive, another drive failed.  I thought I was toast.  It took a long 
weekend, but I was able to rebuild the array and filesystem without 
losing a file.  I also arranged for much better cooling on the drives, 
and that seems to have helped alot with the reliability.

I'm not relaying this story to brag about my data recovery skills, 
because I don't feel particularly skilled in this area.  I simply 
Googled for answers others have posted about similar situations, and 
took the recovery one step at a time.

My point is, my experience says to me that JFS is a pretty darn solid, 
robust filesystem, capable of handling failures I wouldn't think were 

I have also found that a filesystem check every once in a while is 
helpful, but I think most filesystems have this as a recommendation, not 
just JFS.  If you reboot fairly often, the OS will do this automatically 
at startup every few boots, but if your backend doesn't need to be 
rebooted often, you may go longer than usual without having the 
filesystem checked.  I've not taken to unmounting the file system and 
checking it outside of the normal reboot periodic check yet.

I've not run into any problems that a simple filesystem check has not 
been able to take care of.  I doubt that fragmentation would cause your 
mysterious error messages.

You seemed to be alarmed, but I consider it a good thing that a simple 
fsck was able to cure your problem.

Granted, I am a sample of one, so take what I say with a grain of salt, 
you mileage may vary, etc.

More information about the mythtv-users mailing list