Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
As usual, I am not sure in which sub-forum to post this.
These are more less just notes and or curiosity questions.
I am currently using "dd" to copy RAID5 "partitions".
I opted to do all four of them overnight.
I realize coping from one USB to another is not the fastest , but I started with around 2-3 Mbits / second and now I am "down" to less then 850 kilobits / second.
The speed is irrelevant, as long as my OS does not crash...
I also noted that "DD" copies the entire "partition", not just actual data.
Perhaps mdadm is also "updating" the new RAID and that is what is slowing thing down.
I am curious, why not use rsync?
Yes, you will need to create partition and run mkfs...
But, with rsync you can run it again tomorrow, and it will sync only the changes, where as dd will start all over.
Perhaps, I do not understand your requirements, and may be dd is the tool to use in this case?
If your RAID configuration / hardware is not changing, then using dd is overkill.
Usually, creating RAID then partitions then filesystem is (mostly) one time deal. Once that is done, it is ready for data...
Then, you can use rsync to copy data from one array to other.
You can create a script and put it in cron if you want to automate.
rsync is one tool, there are many other ways to do this. I have used tar, and xfsdump/xfsrestore (for XFS filesystem), and there is dump/restore (for ext3/4 filesystems). Note: xfsdump/xfsrestore and dump/restore will copy everything every-time, where as rsync and tar can be used to do copy only what's changed.
If your RAID configuration / hardware is not changing, then using dd is overkill.
Usually, creating RAID then partitions then filesystem is (mostly) one time deal. Once that is done, it is ready for data...
Then, you can use rsync to copy data from one array to other.
You can create a script and put it in cron if you want to automate.
rsync is one tool, there are many other ways to do this. I have used tar, and xfsdump/xfsrestore (for XFS filesystem), and there is dump/restore (for ext3/4 filesystems). Note: xfsdump/xfsrestore and dump/restore will copy everything every-time, where as rsync and tar can be used to do copy only what's changed.
So, all depends on what you want to do.
Yes, what I wanted to do is to duplicate existing working RAID5 into new devices.
Technically md0 to md1. I want to have two independent RAID5 arrays and eventually will delete the md0.
Perhaps it is the "(r) synch " in the name what is misleading (to me ) - perhaps I am too picky , but I see a difference in "coping" and "synchronizing".
Anyway - so far using "dd" worked and I am going to start using the md1 array from now on.
I find it interesting when one posts a question , receives reply to use such and such and then get another reply suggesting to use xyz instead.
Remind me of the proverbial "there is more than one way to skin a cat ".
Different methods are great, usually it is good learning , but somehow it misses the objective to "fix things".
Somewhat off topic - but maybe it is OK to ask this here.
RAID5 is OK whit 2 devices , better with 3.
When I "add" another device , it shows up as "spare".
Is this "spare" "synchronized" with the other hardware?
How do I verify that ?
Crude, and not preferred, way would be to delete the "active" device and run mdadm in monitor option.
RAID5 is OK whit 2 devices , better with 3.
When I "add" another device , it shows up as "spare".
Is this "spare" "synchronized" with the other hardware?
How do I verify that ?
No, RAID 5 uses a minimum of 3 disks. If your only using two then it is running in degraded mode and you will lose all data if a disk fails. The added drive is a hot spare and not part of the array until one of them fails.
cat /proc/mdstat will output the current status of your RAID.
No, RAID 5 uses a minimum of 3 disks. If your only using two then it is running in degraded mode and you will lose all data if a disk fails. The added drive is a hot spare and not part of the array until one of them fails.
cat /proc/mdstat will output the current status of your RAID.
OK, I was wrong with saying RAID5 is OK with two disks.
It is my understanding that when I test remove one of the active devices I'll see some activities when monitoring mdadm.
I just build yet another md2 and been looking at current activities using cat /proc/mdstat.
Noticed two odd things - it is "recovering" empty " , no data added so far , devices.
Secondly - it makes "gparted" crazy, it keeps scanning devices whose "recovering non existent data " contents is changing.
I think I'll wait until the "recovery" is done before I attempt to "ddrescue" from existing md0 to new one md2.
Just curious if it will work.
One more silly note about RAID.
Why does OS (Ubuntu ) keep changing mdx numbers?
I currently have three arrays , at various stages of usability , and only md0 stays and always reads as md0.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.