[mythtv-users] Better think twice before choosing an FS especially for LVM

David myth at dgreaves.com
Thu Sep 15 19:55:13 UTC 2005


Sorry, I have to disagree - and pretty strongly too!!

Resizing a filesystem with a known bad disk is *begging* for a total
toast situation (to use an expression I've grown rather fond of!).
You're basically asking the system to hammer a failing disk with read
and re-reads!

You need to resize the fs down - this is pretty read/write intensive on
all disks, then use lvm to pvmove all the blocks off the failing drive
which requires a total scan of this sick drive - which is probably
sobbing quietly on the floor by now - as are you.

(Last time I tried I had *hours* of solid disk activity trying to
downsize a 600Mb+ Reiser filesystem - and then it failed and needed a
repair and then I lost data - and I didn't have a pending disk failure.
Since then I've used XFS - and had probs with that too)

And finally, often the first sign of failure is a "crunch" or simply
read errors. In this case you are *very* lucky that you can still use
the disk.
(I had a drive fail last week - it would read a few Mb - often a few
hundred but sometimes only a block or 2 and then it would do a hard
disk-level reset and sulk until the power was cycled. It took me 14
solid hours and probably over hundred hard power-cycles into a knoppix
'RIP' CD using ddrescue (ide-level error resilient version of dd) to
recover 80Gb - you wouldn't want to run a pvmove with _that_ puppy!!)

There is only one approach that I'm aware of that gives the reliability
you want: get a RAID (5 probably) in place and if you're really
paranoid, get a hot spare (or RAID6 - I have a hot spare).

Alternatively *when* you get a drive failure (and it is when, not if)
you simply get an email saying you're in degraded mode and you either
buy or RMA the disk and keep your fingers crossed for 2-3 weeks until
the new one arrives (or, like me, you take that opportunity to buy and
install a new disk on next-day delivery and use it as an active disk and
use the RMA as a hot spare when it gets back)

So all of this means you continue to use Myth almost risk-free for the
sake of a cheapo 250Gb disk - and you get the benefits of fast deletion
etc that XFS offers.

David



Brandon Beattie wrote:

>I have to put an exception on what I've said for 2 years now.  
>
>I have been a supporter of XFS and JFS because of their much better 
>performance for handling large (Many GB) files.  This last week when I
>had yet another disk go out I found out why XFS and JFS are not good
>choice for me or other people running a media system.  
>
>LVM is almost mandatory for HD since Myth requires you to store all TV
>shows in a single directory and a single drive isn't enough for most
>people recording HD.  Everything regarding LVM works perfectly for this,
>except when you want to make the size of the LVM partition smaller.
>
>XFS and JFS support growing a filesystem, such as adding another drive
>or allocation more space in LVM for that partition.  They however do not
>support shrinking the filesystem.  
>
>Shrinking I've found is very critical, and someone shouldn't ignore this
>fact or they may not like their choices when things go bad.
>
>I run smartmontools to watch for errors and I have a drive begining to
>fail.  I can not remove the drive out of the LVM though because that
>would require shrinking the filesystem and that's not possible with XFS
>or JFS.
>
>My terrible options are as follows:
>
>1 Turn the system off so the drive doesn't fully faul until I get a new 
>  drive and not record all the TV pilots and season premiers I've waited 
>  4 months for. :)
>2 Leave the drive in the system and hope it doesn't fully go bad before
>  a new drive arrives.
>3 Backup as much data as I can (No way I can backup 1TB) and destroy the
>  rest and create a new LVM partition with the 4 good drives and hope a
>  drive never goes bad ever again. (Yeah right)
>
>If I were to do option 1 or 2, I have to deal with getting a new drive.
>This means not waiting for a good deal and paying more, or dealing with
>RMA'ing which has it's own issues.  
>
>RMA'ing a "failing but not failed" drive is risky.  They often don't
>check it, but sometimes companies do.  Companies have given hassle of a
>drive that has not failed but is, to them it still works, to the user it
>means they could lose data at any time.  If someone doesn't want to lose
>data, RMA'ing is tricky.
>
>Now for the other possible issues with LVM and a file system that does
>not shrink.  Luckily I have an extra IDE channel to connect an extra 
>drive to, but if someone is using 4 hard drives or 3 hard drives and a 
>CDROM they can't add in that new hard drive, so they can't easily move
>data to the new disk, or even save from having to completely redo the
>LVM config.
>
>Too bad for me I found out about this problem too late, but hopefully
>I'll save others time and frustration.
>
>If I could have just shrunk the FS down to not include this drive and
>removed the drive from LVM I could have taken it out and then add in
>another drive if or when I got another drive.
>
>The only filesystems that support shrinking are Ext2, Ext3, and
>ReiserFS.  Reiser4, Xfs, and JFS do not (Yet, but support for Reiser4
>and Xfs is being worked on, but many months from being stable (early 
>2006?).
>
>Since ReiserFS (Reiser version 3) is usually better than ext2 and ext3
>then it's sadly the best FS if you're going to be using LVM.  ResierFS
>outperforms other FS's only when dealing with small files, which is
>great for a root fs, but not a large media filesystem.  
>
>Lucklily Myth doesn't need "perfect/the best FS", even when I'm
>recording 4 HD streams at once, so as I had never, ever
>wanted to do, I'm now going use reiserFS as my FS for LVM and my TB
>partition for media.
>
>I should also note, the disk and other hardware have more of an effect
>on FS performance than the type of FS.
>
>Also, when XFS comes out with shrinking I will be able to shrink the
>reiserFS and create a new XFS LVM setup and grow it and move data from
>the current reiserfs that I'll shrink away to nothing.
>
>.... Happy Recording.
>
>--Brandon
>  
>
>------------------------------------------------------------------------
>
>_______________________________________________
>mythtv-users mailing list
>mythtv-users at mythtv.org
>http://mythtv.org/cgi-bin/mailman/listinfo/mythtv-users
>  
>



More information about the mythtv-users mailing list