AVS Forum banner
1 - 14 of 14 Posts

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #1 ·
Background:

One of my mythtv systems consists of multiple frontends and backends, with all pictures, music, and non recording videos sitting on my fileserver. My fileserver is pretty rock solid, and I had an extra tuner card sitting around so I added it to my fileserver a little while back but didn't use it much until now. Of my slave backends, this is the only one that has the storage group on the same partition as my root filesystem (I didn't plan ahead on this one), and it is the only one running ext3 (all other storage groups are xfs). Occasionally I get very stuttery playback from this storage group. It seems intermittent. I can play the same recording back at various times and sometimes it will stutter and sometimes it won't from any of my frontends. When it does stutter, it stutters on all frontends.


From my tests, I'm pretty sure it isn't a network problem (for one, I never have any problems streaming HD mpeg-2 from the other disks in this machine via mythvideo using the internal player). So that leaves me thinking it is a disk/filesystem I/O problem. I do have delete files slowly set on the backend. It's a 250GB SATA II drive


What is the best way to confirm this? Assuming I/O I was looking into:


1. Creating another partition on the drive that also has / and partitioning it as XFS. Think this will help? I actually don't want to do this because since this is on the same drive as / I would have to take the machine down for a bit and migrate recordings (it's a machine that is used quite a bit).


2. I have no more room in the case for more disks, so I was thinking of simply adding a firewire or USB external just for recordings (I don't have esata on this machine). I have some extra hard drives and cases laying around... I think they will be fast enough to record and stream 1 or 2 HD streams at once


Any other ideas? Any suggestions appreciated. Thanks!


EDIT: I should add that I started using this because I was running out of storage space on my other storage groups, and I now sometimes need to use this tuner at the same time as the other tuners are busy (wife is using myth for more recordings now).
 

·
Registered
Joined
·
465 Posts
First thing to do is to unmount the device and run "e2fsck -cv /dev/xxx" against it. The -c switch checks for bad blocks on the drive and adds them to the list of bad blocks ext2/3 maintains. The -v switch is, of course, "be verbose."


If you want to see exactly what's happening, you can watch while it does the checking and respond to any prompts. However bad-block checking is a fairly slow process, so you might want to add the "-y" switch to the command above to automatically confirm all prompts. I find the questions e2fsck asks are sufficiently obscure that I just say "yes" to them all anyway.
 

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #4 ·
I've looked at gnome-system-monitor and htop and haven't seen any CPU or memory issues. Doesn't have much info for disks. I'll look at dstat next time the problem arises. It is really intermittent, and I can't reproduce it on demand yet.
 

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #5 ·

Quote:
Originally Posted by SeijiSensei /forum/post/15423481


First thing to do is to unmount the device and run "e2fsck -cv /dev/xxx" against it. The -c switch checks for bad blocks on the drive and adds them to the list of bad blocks ext2/3 maintains. The -v switch is, of course, "be verbose."


If you want to see exactly what's happening, you can watch while it does the checking and respond to any prompts. However bad-block checking is a fairly slow process, so you might want to add the "-y" switch to the command above to automatically confirm all prompts. I find the questions e2fsck asks are sufficiently obscure that I just say "yes" to them all anyway.

Didn't want to go there yet (would have to take the system off line) but I was going to check for badblocks as a last resort. And yeah, the last time I ran e2fsck without the -y switch I was completely befuddled
. I clearly don't know any better than to say yes anyway. But I will go there if nothing else works. I have hope that it isn't bad blocks because this only happens on HD recordings. Last time I had bad blocks it was random on all types of recordings (this was also the last time I used ext3 for recordings) and I had to reboot whenever I tried playing back anything that hit a bad block...


On the flipside, if it is bad blocks - I get to start all over again and use a larger disk and partition it with a mythbackend in mind.
 

·
Registered
Joined
·
465 Posts

Quote:
Originally Posted by newlinux /forum/post/15423574


Didn't want to go there yet (would have to take the system off line)

I assume you know that you can unmount a device that isn't being written to or read from, even if you leave the rest of the system running. You can use "lsof | grep [mountpoint]" (e.g., "lsof | grep /home") to see which processes have open files on the mount, then stop those processes and unmount the drive.
 

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #7 ·

Quote:
Originally Posted by SeijiSensei /forum/post/15424342


I assume you know that you can unmount a device that isn't being written to or read from, even if you leave the rest of the system running. You can use "lsof | grep [mountpoint]" (e.g., "lsof | grep /home") to see which processes have open files on the mount, then stop those processes and unmount the drive.

but it's my root filesystem... How do I unmount that without taking the machine down? As far as I know that's always in use...


I thought the only way I was going to be able to mess with that device is to use a liveCD...
 

·
Registered
Joined
·
465 Posts
Sorry, I didn't read the OP as carefully as I should have. I thought this was another drive separate from where root resides. Obviously you can't check the root partition without bringing down the system. As you say, the best approach is to use a bootable Linux CD. My preference in these situations is to use Knoppix . It has a KDE desktop, so I know where to find everything, and includes a very extensive collection of utilities, particularly disk utilities.


However if your OS drive has bad blocks, that's probably something you'll want to know about sooner rather than later!


I've taken to using older, smaller drives that I have lying around for the /boot and /root partitions with everything else on other devices, particularly /home and mounted devices at /media. The PC connected to my TV, for instance, has a 30 GB drive with /boot and /root, and four other storage devices mounted under /media. My /home resides on a networked server running NFS. That way I can trash the OS at any time and not lose anything of value.
 

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #9 ·

Quote:
Originally Posted by SeijiSensei /forum/post/15426035


...


I've taken to using older, smaller drives that I have lying around for the /boot and /root partitions with everything else on other devices, particularly /home and mounted devices at /media. The PC connected to my TV, for instance, has a 30 GB drive with /boot and /root, and four other storage devices mounted under /media. My /home resides on a networked server running NFS. That way I can trash the OS at any time and not lose anything of value.

Yeah, my other machines are partitioned in a similar way. On my network, this machine is the equivalent of your server that has /home. I just did this one too quickly, just focusing on the extra drives and since this was going to be a fulltime fileserver server, I didn't really bother with making separate partitions on the root drive. Of course, then I got to thinking I'm barely using this 250GB root drive, and I have an extra tuner, why not make it a mythbackend (I used to just use the tuner with mplayer). Ahh well...


Predictably, I have not had the problem since making this thread. Who knows when I will recreate it.
 

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #10 ·
I just had it happen again. checked dstat and if I am interpreting it right the problem appears sometimes the CPU is waiting for the disk when this happens. So that confirms to me that it is a disk/filesystem issue. I think I'm going to end up taking it offline at some point in the next month (A good time will be when my family is taking a trip and I'm home alone) and run some tests on the disk and probably repartition it properly and make the storage directory partition XFS if there turns out to be nothing wrong with the disk...
 

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #11 ·
Well I took it offline, and found no bad blocks. I repartitioned it and now have a separate recordings partition in XFS, and all was good for a while and then the problem came back. But I think it is a bit different this time. From my tests, it now only happens when I am trying to watch an HD mpeg-2 recording at the same time as when it is recording and commercial flagging another recording on the same disk. this seems a bit slow to me, because I used to have two machines with similar spec'd hard drives that could record and commercial flag a recording at the same time as streaming a different HD recording. This was on machines that had one disk with a separate partition for recordings. Now all my other machines use a separate disk for recordings - I'm thinking maybe I'll go the USB route since I don't have any more room in this machine for more drives...
 

·
Registered
Joined
·
1,591 Posts
Discussion Starter · #13 ·

Quote:
Originally Posted by mythmaster /forum/post/15870556


If you have a free sata port --> http://www.newegg.com/Product/Produc...82E16812104063


I wish I did - that would be easy. But for now I have a spare IDE drive and USB enclosure so I'll give that a shot. If not - I may consider either replacing one of the drives in there with a larger drive that has a partition just for recordings storage or finding a PCIe esata card that works in Linux...
 
1 - 14 of 14 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top