Jaster Posted September 22, 2015 Share Posted September 22, 2015 Hey there, as many others I just moved to version 6 and would like to convert the RFS drives to XFS. I installed an clean disk (disk8 for the scripts) with sufficient space. I would like to write a script and run in at the server which will convert all the drives. I was thinking of something like that: rsync --progress -avh /mnt/disk1/ /mnt/disk8 FORMAT DISK1 to XFS (command?...) rsync --progress -avh /mnt/disk8/ /mnt/disk1 [REPEAT FOR OTHER RFS DISKS] [MAKE DISK8 THE PARITY DISK] [FORMAT PREVIOUS PARITY DISK TO XFS] Could someone help me with the commands? And how do I tun those batch-like? Best regards! Quote Link to comment
WeeboTech Posted September 22, 2015 Share Posted September 22, 2015 My first suggestion is to run one of the tools that attach hashes to the extended attributes. bitrot or bunker. If that is not feasible due to reiserfs issues, then run md5deep, hashdeep or a find with md5sum on the files to another drive. If you are able to use bitrot or bunker, then add the -X to the rsync command. as in rsync --progress -avhX /mnt/disk?/ /mnt/disk? This thread has some helpful information: Format XFS on replacement drive / Convert from RFS to XFS http://lime-technology.com/forum/index.php?topic=37490.msg346701#msg346701 as does this one (read the whole thing) correct commads to copy to XFS http://lime-technology.com/forum/index.php?topic=38507.msg357921#msg357921 bunker - yet another utility for file integrity checks http://lime-technology.com/forum/index.php?topic=37290.195 bitrot - a utility for generating sha256 keys for integrity checks (version 1.0) http://lime-technology.com/forum/index.php?topic=35226.90 EDIT: I would NOT recommend doing this in a scripted unattended manner. One issue in a tool could cause data loss if the script blindly continues. I would do each step manually as painstaking as that might be. (In fact I did). I would use the hash values to verify each step. Quote Link to comment
BRiT Posted September 22, 2015 Share Posted September 22, 2015 My suggestion is to never move the same set of files more than once. Once you have the files on the new disk (disk 8 first) there is absolutely no need to move them back to the original disk (disk 1 first). Quote Link to comment
WeeboTech Posted September 22, 2015 Share Posted September 22, 2015 My suggestion is to never move the same set of files more than once. Once you have the files on the new disk (disk 8 first) there is absolutely no need to move them back to the original disk (disk 1 first). I thought the same thing as well. I should have mentioned it. However me being as anal as I am I like to keep certain files on certain disks. I've moved them twice as long as the hash verification was good. I also use the rsync -c with --delete-source-files as the final step. Takes longer, but that's how I do it. Conversations about it are in the related threads. Quote Link to comment
Squid Posted September 22, 2015 Share Posted September 22, 2015 If you're going to automate everything including the formatting, you've got to be very careful with the error return codes from the various commands. The last thing you want to have happen is that rsync errors out for whatever reason, and the script goes ahead blindly and reformats a drive that still contains data. Not something that I'd trust with out tons and tons of testing under all scenarios. Quote Link to comment
gundamguy Posted September 22, 2015 Share Posted September 22, 2015 If you're going to automate everything including the formatting, you've got to be very careful with the error return codes from the various commands. The last thing you want to have happen is that rsync errors out for whatever reason, and the script goes ahead blindly and reformats a drive that still contains data. Not something that I'd trust with out tons and tons of testing under all scenarios. This was my first thought as well. I think it's much much safer to do this in steps where you can verify each step has completed properly. Quote Link to comment
trurl Posted September 23, 2015 Share Posted September 23, 2015 If you're going to automate everything including the formatting, you've got to be very careful with the error return codes from the various commands. The last thing you want to have happen is that rsync errors out for whatever reason, and the script goes ahead blindly and reformats a drive that still contains data. Not something that I'd trust with out tons and tons of testing under all scenarios. This was my first thought as well. I think it's much much safer to do this in steps where you can verify each step has completed properly. Why bother to automate something that is a one time process anyway? Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.