SageTV Community  

Go Back   SageTV Community > SageTV Products > SageTV Linux
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 09-30-2010, 03:31 PM
RocKKer RocKKer is offline
Sage Advanced User
 
Join Date: Dec 2005
Posts: 196
A few things about Linux Software RAID and XFS...

Just thought I'd put this out there. I was playing on my STV Linux server with RAID 5 and caused several lockups and was greeted with several messages about something about SATA.4 aborting (ABRT) and CRC errors and so on.... Eventually, I figured out mdadm was running a resync, my lockups must have caused some corruption on my RAID Array. I unknowingly rebooted several times while the resync was running and each time the resync process started over, which didn't seem to hurt anything.

Many times when things go wrong I attempt to find more about what I'm using, anyway here is some things I found.

In order to view the resync progress, I ran:

Code:
watch cat /prod/mdstat
watch is one of the Unix commands that comes in useful at times, this displays the resync progress every 2 seconds.


Resyncing (or syncing):
There are ways to speed this up - didn't help me as I think they were written for older hardware??...might be of use to someone though.
I found the info here

Setting both the speed_limit_min and speed_limit_min, that the link describes to something higher didn't help me at all. I think it didn't make a difference in my case because this sets the rates of each device higher than my devices capabilites (just guessing here).


While the array was re-syncing I had time to search for more things mdadm related came across more RAID info and a few xfs file system related items that I decided to implement.

I decided I needed to set up mdadm to monitor and send me notification if an error is discovered in the RAID Array:
I found this.

I set msmtp as described, and the test worked! While there are other email options for the notification, this was simple and it worked for my use. mdadm monitering was running on my system but never sent me anything because I never set up the email part of this!


The next few items relate specifically to my xfs filesystem.
This is a good read, and a few items caught my interest.

Defragmenting XFS Partitions - I checked mine, fragmentation was extremely low (22%) - but I implemented a defrag process anyway (more on this below). Here is the code to check the fragmentation of an xfs filesystem:
Code:
xfs_db -c frag -r /dev/mapper/lvm--raid-lvm0
I was at 22% before but seems to have hit a plateau at 9% after running it 4 seperate times. Change the device name to match your setup.

Avoiding Future Fragmentation and Mounting the XFS filesystem with high performance options - I had already implemented both of thes, here is what to do if you want to.

Code:
vi /etc/fstab
Now find the line that defines your partition and change the mount options to look like this.

Code:
UUID=uuidinfo-for-my-drives /raid xfs  defaults,noatime,nodiratime,nosuid,nodev,allocsize=512m,logbufs=8 0 0
Above are my mount flags, not all are found in the wiki article. You can either reboot or unmount and remount your partition for this to take effect. Here is the code to remount:

Code:
umount /raid

mount -a

Keeping XFS Healthy (Disk Checking) - I unmounted the filesystem and ran xfs_repair - all was well! Here is the code to check filesystem health:

Code:
umount /raid

xfs_repair /dev/mapper/lvm--raid-lvm0

Here is another link I found - this one talks in generalities about optimizing, I pulled one thing out of it and used this to run a defrag on my xfs filesystem automatically:

30 1 * * * root /usr/sbin/xfs_fsr -t 21600 >/dev/null 2>&1

Did a test of streaming in and out of STV with the defrag running and I noticed no performance issues. However, I implemented this to run everynight at a low use time (1:30 AM).

Is all of this necessary? Depends, to some I'm quite sure it isn't. However, all this stuff is easy to implement, causes no performance hit when run, and to me defrag is a tune up item (you tune up your car's engine don't you?). Besides, my whole software RAID setup is overkill for my STV/media performance needs, so what's a little more overkill!

Hopefully someone can get some use out of this.

Comments are welcome!

BTW Thanks to the MythTV wiki for most of this info!
__________________
SageTV Server v9.2.2, Ubuntu Server 18.04.4 x64, Java 1.8.0_252, Xeon E5-2690, 32GB, 6X6TB WD Red - Software Raid 6, 2X HDHR3 (OTA), 3X HD-200
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
6.5.3 good things and bad things... thenuma SageTV Beta Test Software 1 12-05-2008 10:46 PM
To Raid or not to Raid? Anyone here running Raid5? Shield Hardware Support 29 12-11-2007 07:59 PM
One user's experiences with RAID 0 and RAID 5 stevech Hardware Support 0 04-04-2007 09:57 PM
Intel Software Raid 1 Jesse Hardware Support 37 08-13-2005 11:53 AM
SageTV Media Center Software for Windows Now Available for Linux dkardatzke Announcements 0 01-06-2005 09:56 AM


All times are GMT -6. The time now is 05:11 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.