<p><br>
On May 27, 2011 5:50 AM, "Douglas Clowes" <<a href="mailto:dclowes1@optusnet.com.au">dclowes1@optusnet.com.au</a>> wrote:<br>
><br>
> On 2011-05-27 05:37, Craig Huff wrote:<br>
>><br>
>> > >> the mythtv wiki has good info on XFS,<br>
>><br>
>> I'm afraid I didn't make myself clear. My video drives are all formatted with Journalling File System (JFS), _not_ XFS.<br>
>><br>
>> Can anyone answer any of the questions I raised in my last post in this thread? Sorry, not to restate them, but I don't have the dexterity (or is it the patience?) to do cut & paste in Android email.<br>
>><br>
>> Craig.<br>
>><br>
>> _______________________________________________<br>
>> mythtv-users mailing list<br>
>> <a href="mailto:mythtv-users@mythtv.org">mythtv-users@mythtv.org</a><br>
>> <a href="http://www.mythtv.org/mailman/listinfo/mythtv-users">http://www.mythtv.org/mailman/listinfo/mythtv-users</a><br>
><br>
> Gee Craig, I picked that up and I wasn't even paying attention. So it must have been at least a little bit clear.<br>
><br>
> The program filefrag can give an indication of file fragmentation. Works on XFS and EXT, so probably works on JFS. Try it.<br>
><br>
> For example, to find the topp 100 fragmented files over 1G:<br>
><br>
> # find /storage/mythtv -type f -size +1G -exec filefrag {} \; | sort -t: -nk2 | tail -n100<br>
><br>
> and "if it aint broke, don't fix it"!<br>
><br>
> If you have one or more heavily fragmented files, according to your taste/laziness, I have a remap.sh script that I use when xfs_fsr doesn't do the job on my heavily fragmented and very full disks:<br>
><br>
> #!/bin/bash<br>
> file="$*"<br>
> if [ ! -e "${file}" ]<br>
> then<br>
> echo "\"${file}\" does not exist"<br>
> exit 1<br>
> fi<br>
> echo "\"${file}\""<br>
> #ls -lh "${file}"<br>
> old_size=`ls -ld ${file} | cut -d ' ' -f 5`<br>
> old_frag="`filefrag "${file}" | cut -d ':' -f 2 | cut -d ' ' -f 2`"<br>
> old_rate=`expr $old_size \/ $old_frag`<br>
> mv "${file}" "${file}.bck"<br>
> cp -a "${file}.bck" "${file}"<br>
> #ls -lh "${file}"<br>
> new_size=`ls -ld ${file} | cut -d ' ' -f 5`<br>
> new_frag="`filefrag "${file}" | cut -d ':' -f 2 | cut -d ' ' -f 2`"<br>
> new_rate=`expr $new_size \/ $new_frag`<br>
> echo "${old_size} => ${new_size} bytes"<br>
> echo "${old_frag} => ${new_frag} extents"<br>
> echo "${old_rate} => ${new_rate} ratio"<br>
> echo "diff \"${file}\" \"${file}.bck\""<br>
> echo "ls -l \"${file}\" \"${file}.bck\""<br>
> echo "rm -i \"${file}.bck\""<br>
><br>
> This renames the file to <name>.bck, copies it back to the original file, shows you how it went and gives you a selection of commands. Your level of paranoia will determine whether you compare the files, "ls -l" them or just remove the original file.<br>
><br>
> As usual on linux, there are at least sixteen ways to do anything - this has been one of them.<br>
><br>
> And, as for the DMA timeout - sorry, can't help you :(<br>
><br>
> Cheers,<br>
><br>
> Douglas</p>
<p>Douglas,<br>
Thanks for your advice. Shiny new tools to try! :-)</p>
<p>Craig.<br>
</p>