LinHES Forums http://forum.linhes.org/ |
|
Automating database maintenance with Mythwelcome shutdown http://forum.linhes.org/viewtopic.php?f=6&t=19794 |
Page 2 of 2 |
Author: | alien [ Fri Apr 29, 2011 1:32 am ] |
Post subject: | |
Cool script. One suggestion. You might want to instead use the -a (archive) option to rsync. That preserves ower, group, permissions, links (and a few others) as well as timestamp. You can also do multiple directories at once. Ex: Code: rsync -va --delete /myth/video /myth/music /myth/gallery /myth2/media-backup/
...Saves having to fix permissions/ownership if you have to restore... Allen |
Author: | nicom [ Sun May 01, 2011 8:51 pm ] |
Post subject: | |
Thanks, that's a good suggestion. |
Author: | turpie [ Wed Dec 07, 2011 12:03 am ] |
Post subject: | |
Hi, I'm trying to get this setup on my machine now that I have a drive using XFS. I've modified the script to script to skip the defrag of /myth (as it's running ext3) and change the /myth2 partition to /dev/sda1. But I'm not sure what the -m option is for and why it uses an alternative mtab file? echo `sudo xfs_fsr -v -t 1200 -m /home/mythtv/sd-maint/mtab_sdb1` What should I do with this line? Also while I still have space on /myth2 should I convert /myth to xfs as well? Code: /dev/sdb3 925G 898G 28G 98% /myth
/dev/sda1 1.9T 254G 1.6T 14% /myth2 |
Author: | nicom [ Sun Dec 11, 2011 9:02 pm ] |
Post subject: | |
Paul, Sorry for the delay getting back to you but I have been out of the country. The -m option allows me to defrag one partition at a time. The referenced file is just like the entry you would see in the /etc/mtab file for the partition in question, so for me Code: $ cat sd-maint/mtab_sdb1 Likewise a similar file for the other partition.
/dev/sdb1 /myth2 xfs rw,noatime,allocsize=512m 0 0 If you only intend to leave it as one xfs partition, you do not need to bother about the -m option because xfs_fsr defaults to /etc/mtab so it will look for any xfs partition and defrag it (even if there is more than one). I originally did not use the option and I found that the second partition listed did not get get a good defragging so I added the option and now they happen on different shutdowns. As for whether to convert your /myth partition to xfs, my main reason was to avoid the partition checking at start-up after 30 boots delaying the start of the machine for up to 10 minutes for a similar size drive to yours. If that is not a concern then ext3 would be fine although conversion would be tempting while you have all that room in /myth2. Perhaps others can comment on relative merits of the file systems. Richard |
Page 2 of 2 | All times are UTC - 6 hours |
Powered by phpBB® Forum Software © phpBB Group http://www.phpbb.com/ |