Convert non-raid disk with data into RAID 1 disk (hardware controller)Migrating from hardware to software...

How quickly could a country build a tall concrete wall around a city?

Why does the ultra long-end of a yield curve invert?

tikz-3dplot: angle-placed cones in a sphere

Where to pee in London?

What was the first multiprocessor x86 motherboard?

What can make Linux unresponsive for minutes when browsing certain websites?

How to explain to a team that the project they will work for 6 months will 100% fail?

Why couldn't soldiers sight their own weapons without officers' orders?

Is Odin inconsistent about the powers of Mjolnir?

Does the Voyager team use a wrapper (Fortran(77?) to Python) to transmit current commands?

Why is there a need to prevent a racist, sexist, or otherwise bigoted vendor from discriminating who they sell to?

Why do private jets such as Gulfstream fly higher than other civilian jets?

Looking for a new job because of relocation - is it okay to tell the real reason?

What are these mathematical groups in U.S. universities?

Does this put me at risk for identity theft?

How does the oscilloscope trigger really work?

Whats the name of this projection?

Double blind peer review when paper cites author's GitHub repo for code

Is this cheap "air conditioner" able to cool a room?

Could one become a successful researcher by writing some really good papers while being outside academia?

Why are the inside diameters of some pipe larger than the stated size?

Need help understanding lens reach

What word can be used to describe a bug in a movie?

How can glass marbles naturally occur in a desert?



Convert non-raid disk with data into RAID 1 disk (hardware controller)


Migrating from hardware to software RAIDCan't swap between two bootable drivesMonitor disk health using smartd (in smartmontools) on a high availability software RAID 1 serverHow can I track virtual Disk device to physical slot?Recover data from raid 1 when both drives are faultyHow to map a sata device name to a physical sata interface for RAID systemsRAID1 that can be enlarged when adding a new disk: convert to lvm --type raid1?How to access raid partitions after controller failureWhy does hdparm return 2 differing results when AHCI is enabled and disabled?How to replace faulty disk in software raid using lvm






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







1















I moved away from software RAID due to all the hassle it brings. After OS reinstall, I am left with only one drive. I ordered a hardware RAID controller today, and when the controller arrives, I'd like to plug in the identical drives into the RAID controller and set up RAID 1 WITHOUT losing any data or needing to reinstall the OS (Debian Jessie x86_64).



Output of lsblk:



NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 953M 0 part /boot
├─sda2 8:2 0 29.8G 0 part [SWAP]
└─sda3 8:3 0 900.8G 0 part
├─vgmain-lvroot 254:0 0 621.4G 0 lvm /
├─vgmain-lvmail 254:1 0 93.1G 0 lvm /var/vmail
├─vgmain-lvhome 254:2 0 93.1G 0 lvm /home
├─vgmain-lvtmp 254:3 0 18.6G 0 lvm /tmp
└─vgmain-lvvar 254:4 0 74.5G 0 lvm /var
sdb 8:16 0 931.5G 0 disk



Can I do this somehow by dding the existing data to the clean drive while having it plugged into the RAID controller and sat up as RAID 1? To clarify, let's say sda is the drive with my data, sdb is the drive which is not in use.




  • Plug sda into the mobo sata controller

  • Plug sdb into the RAID controller

  • Define sdb as RAID 1 drive

  • Boot from liveCD and dd contents of sda -> sdb

  • Plug sda into RAID controller, define as RAID1

  • RAID controller syncs the drives, (copies over sdb to sda) (?)

  • Boot without problems?


Will dd copy the drive in a way that mbr/partitions/etc. are preserved? Am I thinking in a completely stupid way of doing this?



I contacted the RAID controller manufacturer and asked if it has some kind of utility to convert a drive into 2 drives in RAID1, but they said no. If it's relevant in any way, the specific controller is a HighPoint RocketRAID 620 PCI-Express 2.0 x1 SATA III RAID card










share|improve this question















bumped to the homepage by Community 17 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















  • If you think software raid is a hassle, just wait until you get to experience the "joy" of hardware raid.

    – cas
    Jun 14 '16 at 8:08













  • @cas what do you mean? A HW RAID cannot be broken by the OS in a way a software RAID can easily be misconfigured, and upon reboot the system will fail to load (forcing me to drive 80km and fixing the server on spot instead of ssh'ing as I always do).

    – Axel Latvala
    Jun 14 '16 at 11:22











  • Yes, it can (and when it does, it'll be much harder to fix). It can also break in other fun and exciting ways - you'll absolutely love discovering that when your HW RAID controller dies, you can't just replace it with any other controller, often not even one from the same manufacturer....and the model you need hasn't been made for years. There's only one good reason to use HW RAID - and that's so you can have non-volatile write-cache for RAID5 or RAID6. If R5/R6 is not a requirement, HW RAID is a waste of money. And if you need the capacity of R5/R6, you're still better off with ZFS.

    – cas
    Jun 14 '16 at 14:40











  • IMO, the simplest and best thing for you to do is partition sbd exactly the same as sda, make sdb1 a degraded RAID1 (with either LVM or mdadm), rsync /boot to it, unmount /boot, add sda1 to the RAID1, and remount it as /boot. Don't forget to run update-grub. and grub-install /dev/sdb to install the grub boot-loader in the 2nd drive's MBR. sdb2 could be a second swap partition (don't bother with RAID0 for swap, linux already stripes swap devices that have the same priority). And add sdb3 as a mirror (i.e. RAID1) to the existing LVM volume group (currently consisting of only sda3).

    – cas
    Jun 14 '16 at 14:50




















1















I moved away from software RAID due to all the hassle it brings. After OS reinstall, I am left with only one drive. I ordered a hardware RAID controller today, and when the controller arrives, I'd like to plug in the identical drives into the RAID controller and set up RAID 1 WITHOUT losing any data or needing to reinstall the OS (Debian Jessie x86_64).



Output of lsblk:



NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 953M 0 part /boot
├─sda2 8:2 0 29.8G 0 part [SWAP]
└─sda3 8:3 0 900.8G 0 part
├─vgmain-lvroot 254:0 0 621.4G 0 lvm /
├─vgmain-lvmail 254:1 0 93.1G 0 lvm /var/vmail
├─vgmain-lvhome 254:2 0 93.1G 0 lvm /home
├─vgmain-lvtmp 254:3 0 18.6G 0 lvm /tmp
└─vgmain-lvvar 254:4 0 74.5G 0 lvm /var
sdb 8:16 0 931.5G 0 disk



Can I do this somehow by dding the existing data to the clean drive while having it plugged into the RAID controller and sat up as RAID 1? To clarify, let's say sda is the drive with my data, sdb is the drive which is not in use.




  • Plug sda into the mobo sata controller

  • Plug sdb into the RAID controller

  • Define sdb as RAID 1 drive

  • Boot from liveCD and dd contents of sda -> sdb

  • Plug sda into RAID controller, define as RAID1

  • RAID controller syncs the drives, (copies over sdb to sda) (?)

  • Boot without problems?


Will dd copy the drive in a way that mbr/partitions/etc. are preserved? Am I thinking in a completely stupid way of doing this?



I contacted the RAID controller manufacturer and asked if it has some kind of utility to convert a drive into 2 drives in RAID1, but they said no. If it's relevant in any way, the specific controller is a HighPoint RocketRAID 620 PCI-Express 2.0 x1 SATA III RAID card










share|improve this question















bumped to the homepage by Community 17 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.

















  • If you think software raid is a hassle, just wait until you get to experience the "joy" of hardware raid.

    – cas
    Jun 14 '16 at 8:08













  • @cas what do you mean? A HW RAID cannot be broken by the OS in a way a software RAID can easily be misconfigured, and upon reboot the system will fail to load (forcing me to drive 80km and fixing the server on spot instead of ssh'ing as I always do).

    – Axel Latvala
    Jun 14 '16 at 11:22











  • Yes, it can (and when it does, it'll be much harder to fix). It can also break in other fun and exciting ways - you'll absolutely love discovering that when your HW RAID controller dies, you can't just replace it with any other controller, often not even one from the same manufacturer....and the model you need hasn't been made for years. There's only one good reason to use HW RAID - and that's so you can have non-volatile write-cache for RAID5 or RAID6. If R5/R6 is not a requirement, HW RAID is a waste of money. And if you need the capacity of R5/R6, you're still better off with ZFS.

    – cas
    Jun 14 '16 at 14:40











  • IMO, the simplest and best thing for you to do is partition sbd exactly the same as sda, make sdb1 a degraded RAID1 (with either LVM or mdadm), rsync /boot to it, unmount /boot, add sda1 to the RAID1, and remount it as /boot. Don't forget to run update-grub. and grub-install /dev/sdb to install the grub boot-loader in the 2nd drive's MBR. sdb2 could be a second swap partition (don't bother with RAID0 for swap, linux already stripes swap devices that have the same priority). And add sdb3 as a mirror (i.e. RAID1) to the existing LVM volume group (currently consisting of only sda3).

    – cas
    Jun 14 '16 at 14:50
















1












1








1








I moved away from software RAID due to all the hassle it brings. After OS reinstall, I am left with only one drive. I ordered a hardware RAID controller today, and when the controller arrives, I'd like to plug in the identical drives into the RAID controller and set up RAID 1 WITHOUT losing any data or needing to reinstall the OS (Debian Jessie x86_64).



Output of lsblk:



NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 953M 0 part /boot
├─sda2 8:2 0 29.8G 0 part [SWAP]
└─sda3 8:3 0 900.8G 0 part
├─vgmain-lvroot 254:0 0 621.4G 0 lvm /
├─vgmain-lvmail 254:1 0 93.1G 0 lvm /var/vmail
├─vgmain-lvhome 254:2 0 93.1G 0 lvm /home
├─vgmain-lvtmp 254:3 0 18.6G 0 lvm /tmp
└─vgmain-lvvar 254:4 0 74.5G 0 lvm /var
sdb 8:16 0 931.5G 0 disk



Can I do this somehow by dding the existing data to the clean drive while having it plugged into the RAID controller and sat up as RAID 1? To clarify, let's say sda is the drive with my data, sdb is the drive which is not in use.




  • Plug sda into the mobo sata controller

  • Plug sdb into the RAID controller

  • Define sdb as RAID 1 drive

  • Boot from liveCD and dd contents of sda -> sdb

  • Plug sda into RAID controller, define as RAID1

  • RAID controller syncs the drives, (copies over sdb to sda) (?)

  • Boot without problems?


Will dd copy the drive in a way that mbr/partitions/etc. are preserved? Am I thinking in a completely stupid way of doing this?



I contacted the RAID controller manufacturer and asked if it has some kind of utility to convert a drive into 2 drives in RAID1, but they said no. If it's relevant in any way, the specific controller is a HighPoint RocketRAID 620 PCI-Express 2.0 x1 SATA III RAID card










share|improve this question














I moved away from software RAID due to all the hassle it brings. After OS reinstall, I am left with only one drive. I ordered a hardware RAID controller today, and when the controller arrives, I'd like to plug in the identical drives into the RAID controller and set up RAID 1 WITHOUT losing any data or needing to reinstall the OS (Debian Jessie x86_64).



Output of lsblk:



NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 931.5G 0 disk
├─sda1 8:1 0 953M 0 part /boot
├─sda2 8:2 0 29.8G 0 part [SWAP]
└─sda3 8:3 0 900.8G 0 part
├─vgmain-lvroot 254:0 0 621.4G 0 lvm /
├─vgmain-lvmail 254:1 0 93.1G 0 lvm /var/vmail
├─vgmain-lvhome 254:2 0 93.1G 0 lvm /home
├─vgmain-lvtmp 254:3 0 18.6G 0 lvm /tmp
└─vgmain-lvvar 254:4 0 74.5G 0 lvm /var
sdb 8:16 0 931.5G 0 disk



Can I do this somehow by dding the existing data to the clean drive while having it plugged into the RAID controller and sat up as RAID 1? To clarify, let's say sda is the drive with my data, sdb is the drive which is not in use.




  • Plug sda into the mobo sata controller

  • Plug sdb into the RAID controller

  • Define sdb as RAID 1 drive

  • Boot from liveCD and dd contents of sda -> sdb

  • Plug sda into RAID controller, define as RAID1

  • RAID controller syncs the drives, (copies over sdb to sda) (?)

  • Boot without problems?


Will dd copy the drive in a way that mbr/partitions/etc. are preserved? Am I thinking in a completely stupid way of doing this?



I contacted the RAID controller manufacturer and asked if it has some kind of utility to convert a drive into 2 drives in RAID1, but they said no. If it's relevant in any way, the specific controller is a HighPoint RocketRAID 620 PCI-Express 2.0 x1 SATA III RAID card







hardware raid conversion raid1






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Jun 13 '16 at 16:12









Axel LatvalaAxel Latvala

1065 bronze badges




1065 bronze badges






bumped to the homepage by Community 17 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.









bumped to the homepage by Community 17 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 17 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • If you think software raid is a hassle, just wait until you get to experience the "joy" of hardware raid.

    – cas
    Jun 14 '16 at 8:08













  • @cas what do you mean? A HW RAID cannot be broken by the OS in a way a software RAID can easily be misconfigured, and upon reboot the system will fail to load (forcing me to drive 80km and fixing the server on spot instead of ssh'ing as I always do).

    – Axel Latvala
    Jun 14 '16 at 11:22











  • Yes, it can (and when it does, it'll be much harder to fix). It can also break in other fun and exciting ways - you'll absolutely love discovering that when your HW RAID controller dies, you can't just replace it with any other controller, often not even one from the same manufacturer....and the model you need hasn't been made for years. There's only one good reason to use HW RAID - and that's so you can have non-volatile write-cache for RAID5 or RAID6. If R5/R6 is not a requirement, HW RAID is a waste of money. And if you need the capacity of R5/R6, you're still better off with ZFS.

    – cas
    Jun 14 '16 at 14:40











  • IMO, the simplest and best thing for you to do is partition sbd exactly the same as sda, make sdb1 a degraded RAID1 (with either LVM or mdadm), rsync /boot to it, unmount /boot, add sda1 to the RAID1, and remount it as /boot. Don't forget to run update-grub. and grub-install /dev/sdb to install the grub boot-loader in the 2nd drive's MBR. sdb2 could be a second swap partition (don't bother with RAID0 for swap, linux already stripes swap devices that have the same priority). And add sdb3 as a mirror (i.e. RAID1) to the existing LVM volume group (currently consisting of only sda3).

    – cas
    Jun 14 '16 at 14:50





















  • If you think software raid is a hassle, just wait until you get to experience the "joy" of hardware raid.

    – cas
    Jun 14 '16 at 8:08













  • @cas what do you mean? A HW RAID cannot be broken by the OS in a way a software RAID can easily be misconfigured, and upon reboot the system will fail to load (forcing me to drive 80km and fixing the server on spot instead of ssh'ing as I always do).

    – Axel Latvala
    Jun 14 '16 at 11:22











  • Yes, it can (and when it does, it'll be much harder to fix). It can also break in other fun and exciting ways - you'll absolutely love discovering that when your HW RAID controller dies, you can't just replace it with any other controller, often not even one from the same manufacturer....and the model you need hasn't been made for years. There's only one good reason to use HW RAID - and that's so you can have non-volatile write-cache for RAID5 or RAID6. If R5/R6 is not a requirement, HW RAID is a waste of money. And if you need the capacity of R5/R6, you're still better off with ZFS.

    – cas
    Jun 14 '16 at 14:40











  • IMO, the simplest and best thing for you to do is partition sbd exactly the same as sda, make sdb1 a degraded RAID1 (with either LVM or mdadm), rsync /boot to it, unmount /boot, add sda1 to the RAID1, and remount it as /boot. Don't forget to run update-grub. and grub-install /dev/sdb to install the grub boot-loader in the 2nd drive's MBR. sdb2 could be a second swap partition (don't bother with RAID0 for swap, linux already stripes swap devices that have the same priority). And add sdb3 as a mirror (i.e. RAID1) to the existing LVM volume group (currently consisting of only sda3).

    – cas
    Jun 14 '16 at 14:50



















If you think software raid is a hassle, just wait until you get to experience the "joy" of hardware raid.

– cas
Jun 14 '16 at 8:08







If you think software raid is a hassle, just wait until you get to experience the "joy" of hardware raid.

– cas
Jun 14 '16 at 8:08















@cas what do you mean? A HW RAID cannot be broken by the OS in a way a software RAID can easily be misconfigured, and upon reboot the system will fail to load (forcing me to drive 80km and fixing the server on spot instead of ssh'ing as I always do).

– Axel Latvala
Jun 14 '16 at 11:22





@cas what do you mean? A HW RAID cannot be broken by the OS in a way a software RAID can easily be misconfigured, and upon reboot the system will fail to load (forcing me to drive 80km and fixing the server on spot instead of ssh'ing as I always do).

– Axel Latvala
Jun 14 '16 at 11:22













Yes, it can (and when it does, it'll be much harder to fix). It can also break in other fun and exciting ways - you'll absolutely love discovering that when your HW RAID controller dies, you can't just replace it with any other controller, often not even one from the same manufacturer....and the model you need hasn't been made for years. There's only one good reason to use HW RAID - and that's so you can have non-volatile write-cache for RAID5 or RAID6. If R5/R6 is not a requirement, HW RAID is a waste of money. And if you need the capacity of R5/R6, you're still better off with ZFS.

– cas
Jun 14 '16 at 14:40





Yes, it can (and when it does, it'll be much harder to fix). It can also break in other fun and exciting ways - you'll absolutely love discovering that when your HW RAID controller dies, you can't just replace it with any other controller, often not even one from the same manufacturer....and the model you need hasn't been made for years. There's only one good reason to use HW RAID - and that's so you can have non-volatile write-cache for RAID5 or RAID6. If R5/R6 is not a requirement, HW RAID is a waste of money. And if you need the capacity of R5/R6, you're still better off with ZFS.

– cas
Jun 14 '16 at 14:40













IMO, the simplest and best thing for you to do is partition sbd exactly the same as sda, make sdb1 a degraded RAID1 (with either LVM or mdadm), rsync /boot to it, unmount /boot, add sda1 to the RAID1, and remount it as /boot. Don't forget to run update-grub. and grub-install /dev/sdb to install the grub boot-loader in the 2nd drive's MBR. sdb2 could be a second swap partition (don't bother with RAID0 for swap, linux already stripes swap devices that have the same priority). And add sdb3 as a mirror (i.e. RAID1) to the existing LVM volume group (currently consisting of only sda3).

– cas
Jun 14 '16 at 14:50







IMO, the simplest and best thing for you to do is partition sbd exactly the same as sda, make sdb1 a degraded RAID1 (with either LVM or mdadm), rsync /boot to it, unmount /boot, add sda1 to the RAID1, and remount it as /boot. Don't forget to run update-grub. and grub-install /dev/sdb to install the grub boot-loader in the 2nd drive's MBR. sdb2 could be a second swap partition (don't bother with RAID0 for swap, linux already stripes swap devices that have the same priority). And add sdb3 as a mirror (i.e. RAID1) to the existing LVM volume group (currently consisting of only sda3).

– cas
Jun 14 '16 at 14:50












1 Answer
1






active

oldest

votes


















0














Your procedure is correct. Your terminology could use small detail work though.



You want to declare the second,new disk to be a member of a new degraded RAID1 array.



Then boot with a liveCD, dd the Data over, and then declare the first,older disk to be a mirror of the above array.



Depending on how exactly GRUB locates the RootFS, you may need to edit your GRUB config, or run update-grub.



One thing to check: The RAID-Header may be on-disk, so maybe your RAID will be slightly smaller than the underlying physical drives






share|improve this answer


























  • Don't use dd for cloning disks, that's one of the slowest, least flexible way of doing it (for example, it will waste time copying unused disk space). Use Clonezilla. or DIY with rsync.

    – cas
    Jun 14 '16 at 8:06











  • @cas: Clonezilla uses partimage, which in turn needs to understand each specific filesystem block device layout. And rsync only copies filesystem content as files. Depending on your use-case, one/both of these may make you have to use dd.

    – Alex Stragies
    Jun 14 '16 at 8:31











  • Both of those facts are features not problems, and are exactly why I recommended using clonezilla or rsync. bit-for-bit copies of the OS disk may be required for primitive OSes like Windows, but not for Linux. Linux does not care where on the disk any file is, so a file copy will work without a problem. In fact, a file copy will automatically and completely defrag the files as it copies them to the target fs.

    – cas
    Jun 14 '16 at 8:34











  • @cas : You and I, and many others here, know that. But a new user might not. That new user will then wonder, why part-image wont efficiently transfer only the used space of -say- an encrypted blockdevice, or why the rsync-copy of a Windows-FS fails to boot. So dd in this case is the slower, but "safer" (=less to explain/understand) method

    – Alex Stragies
    Jun 14 '16 at 8:37













  • The OP was asking about linux filesystems, there was no mention of windows. a novice user is unlikely to even notice the issue with an encrypted device, and an experienced user will understand why. There's also no good reason to point novices at tools like dd (which are easy to make data-destroying mistakes with) rather than superior, safer tools like Clonezilla. or rsync (or cp -af or tar ... | tar ...)

    – cas
    Jun 14 '16 at 8:40
















Your Answer








StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f289488%2fconvert-non-raid-disk-with-data-into-raid-1-disk-hardware-controller%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














Your procedure is correct. Your terminology could use small detail work though.



You want to declare the second,new disk to be a member of a new degraded RAID1 array.



Then boot with a liveCD, dd the Data over, and then declare the first,older disk to be a mirror of the above array.



Depending on how exactly GRUB locates the RootFS, you may need to edit your GRUB config, or run update-grub.



One thing to check: The RAID-Header may be on-disk, so maybe your RAID will be slightly smaller than the underlying physical drives






share|improve this answer


























  • Don't use dd for cloning disks, that's one of the slowest, least flexible way of doing it (for example, it will waste time copying unused disk space). Use Clonezilla. or DIY with rsync.

    – cas
    Jun 14 '16 at 8:06











  • @cas: Clonezilla uses partimage, which in turn needs to understand each specific filesystem block device layout. And rsync only copies filesystem content as files. Depending on your use-case, one/both of these may make you have to use dd.

    – Alex Stragies
    Jun 14 '16 at 8:31











  • Both of those facts are features not problems, and are exactly why I recommended using clonezilla or rsync. bit-for-bit copies of the OS disk may be required for primitive OSes like Windows, but not for Linux. Linux does not care where on the disk any file is, so a file copy will work without a problem. In fact, a file copy will automatically and completely defrag the files as it copies them to the target fs.

    – cas
    Jun 14 '16 at 8:34











  • @cas : You and I, and many others here, know that. But a new user might not. That new user will then wonder, why part-image wont efficiently transfer only the used space of -say- an encrypted blockdevice, or why the rsync-copy of a Windows-FS fails to boot. So dd in this case is the slower, but "safer" (=less to explain/understand) method

    – Alex Stragies
    Jun 14 '16 at 8:37













  • The OP was asking about linux filesystems, there was no mention of windows. a novice user is unlikely to even notice the issue with an encrypted device, and an experienced user will understand why. There's also no good reason to point novices at tools like dd (which are easy to make data-destroying mistakes with) rather than superior, safer tools like Clonezilla. or rsync (or cp -af or tar ... | tar ...)

    – cas
    Jun 14 '16 at 8:40


















0














Your procedure is correct. Your terminology could use small detail work though.



You want to declare the second,new disk to be a member of a new degraded RAID1 array.



Then boot with a liveCD, dd the Data over, and then declare the first,older disk to be a mirror of the above array.



Depending on how exactly GRUB locates the RootFS, you may need to edit your GRUB config, or run update-grub.



One thing to check: The RAID-Header may be on-disk, so maybe your RAID will be slightly smaller than the underlying physical drives






share|improve this answer


























  • Don't use dd for cloning disks, that's one of the slowest, least flexible way of doing it (for example, it will waste time copying unused disk space). Use Clonezilla. or DIY with rsync.

    – cas
    Jun 14 '16 at 8:06











  • @cas: Clonezilla uses partimage, which in turn needs to understand each specific filesystem block device layout. And rsync only copies filesystem content as files. Depending on your use-case, one/both of these may make you have to use dd.

    – Alex Stragies
    Jun 14 '16 at 8:31











  • Both of those facts are features not problems, and are exactly why I recommended using clonezilla or rsync. bit-for-bit copies of the OS disk may be required for primitive OSes like Windows, but not for Linux. Linux does not care where on the disk any file is, so a file copy will work without a problem. In fact, a file copy will automatically and completely defrag the files as it copies them to the target fs.

    – cas
    Jun 14 '16 at 8:34











  • @cas : You and I, and many others here, know that. But a new user might not. That new user will then wonder, why part-image wont efficiently transfer only the used space of -say- an encrypted blockdevice, or why the rsync-copy of a Windows-FS fails to boot. So dd in this case is the slower, but "safer" (=less to explain/understand) method

    – Alex Stragies
    Jun 14 '16 at 8:37













  • The OP was asking about linux filesystems, there was no mention of windows. a novice user is unlikely to even notice the issue with an encrypted device, and an experienced user will understand why. There's also no good reason to point novices at tools like dd (which are easy to make data-destroying mistakes with) rather than superior, safer tools like Clonezilla. or rsync (or cp -af or tar ... | tar ...)

    – cas
    Jun 14 '16 at 8:40
















0












0








0







Your procedure is correct. Your terminology could use small detail work though.



You want to declare the second,new disk to be a member of a new degraded RAID1 array.



Then boot with a liveCD, dd the Data over, and then declare the first,older disk to be a mirror of the above array.



Depending on how exactly GRUB locates the RootFS, you may need to edit your GRUB config, or run update-grub.



One thing to check: The RAID-Header may be on-disk, so maybe your RAID will be slightly smaller than the underlying physical drives






share|improve this answer













Your procedure is correct. Your terminology could use small detail work though.



You want to declare the second,new disk to be a member of a new degraded RAID1 array.



Then boot with a liveCD, dd the Data over, and then declare the first,older disk to be a mirror of the above array.



Depending on how exactly GRUB locates the RootFS, you may need to edit your GRUB config, or run update-grub.



One thing to check: The RAID-Header may be on-disk, so maybe your RAID will be slightly smaller than the underlying physical drives







share|improve this answer












share|improve this answer



share|improve this answer










answered Jun 13 '16 at 16:55









Alex StragiesAlex Stragies

3,4601 gold badge17 silver badges42 bronze badges




3,4601 gold badge17 silver badges42 bronze badges
















  • Don't use dd for cloning disks, that's one of the slowest, least flexible way of doing it (for example, it will waste time copying unused disk space). Use Clonezilla. or DIY with rsync.

    – cas
    Jun 14 '16 at 8:06











  • @cas: Clonezilla uses partimage, which in turn needs to understand each specific filesystem block device layout. And rsync only copies filesystem content as files. Depending on your use-case, one/both of these may make you have to use dd.

    – Alex Stragies
    Jun 14 '16 at 8:31











  • Both of those facts are features not problems, and are exactly why I recommended using clonezilla or rsync. bit-for-bit copies of the OS disk may be required for primitive OSes like Windows, but not for Linux. Linux does not care where on the disk any file is, so a file copy will work without a problem. In fact, a file copy will automatically and completely defrag the files as it copies them to the target fs.

    – cas
    Jun 14 '16 at 8:34











  • @cas : You and I, and many others here, know that. But a new user might not. That new user will then wonder, why part-image wont efficiently transfer only the used space of -say- an encrypted blockdevice, or why the rsync-copy of a Windows-FS fails to boot. So dd in this case is the slower, but "safer" (=less to explain/understand) method

    – Alex Stragies
    Jun 14 '16 at 8:37













  • The OP was asking about linux filesystems, there was no mention of windows. a novice user is unlikely to even notice the issue with an encrypted device, and an experienced user will understand why. There's also no good reason to point novices at tools like dd (which are easy to make data-destroying mistakes with) rather than superior, safer tools like Clonezilla. or rsync (or cp -af or tar ... | tar ...)

    – cas
    Jun 14 '16 at 8:40





















  • Don't use dd for cloning disks, that's one of the slowest, least flexible way of doing it (for example, it will waste time copying unused disk space). Use Clonezilla. or DIY with rsync.

    – cas
    Jun 14 '16 at 8:06











  • @cas: Clonezilla uses partimage, which in turn needs to understand each specific filesystem block device layout. And rsync only copies filesystem content as files. Depending on your use-case, one/both of these may make you have to use dd.

    – Alex Stragies
    Jun 14 '16 at 8:31











  • Both of those facts are features not problems, and are exactly why I recommended using clonezilla or rsync. bit-for-bit copies of the OS disk may be required for primitive OSes like Windows, but not for Linux. Linux does not care where on the disk any file is, so a file copy will work without a problem. In fact, a file copy will automatically and completely defrag the files as it copies them to the target fs.

    – cas
    Jun 14 '16 at 8:34











  • @cas : You and I, and many others here, know that. But a new user might not. That new user will then wonder, why part-image wont efficiently transfer only the used space of -say- an encrypted blockdevice, or why the rsync-copy of a Windows-FS fails to boot. So dd in this case is the slower, but "safer" (=less to explain/understand) method

    – Alex Stragies
    Jun 14 '16 at 8:37













  • The OP was asking about linux filesystems, there was no mention of windows. a novice user is unlikely to even notice the issue with an encrypted device, and an experienced user will understand why. There's also no good reason to point novices at tools like dd (which are easy to make data-destroying mistakes with) rather than superior, safer tools like Clonezilla. or rsync (or cp -af or tar ... | tar ...)

    – cas
    Jun 14 '16 at 8:40



















Don't use dd for cloning disks, that's one of the slowest, least flexible way of doing it (for example, it will waste time copying unused disk space). Use Clonezilla. or DIY with rsync.

– cas
Jun 14 '16 at 8:06





Don't use dd for cloning disks, that's one of the slowest, least flexible way of doing it (for example, it will waste time copying unused disk space). Use Clonezilla. or DIY with rsync.

– cas
Jun 14 '16 at 8:06













@cas: Clonezilla uses partimage, which in turn needs to understand each specific filesystem block device layout. And rsync only copies filesystem content as files. Depending on your use-case, one/both of these may make you have to use dd.

– Alex Stragies
Jun 14 '16 at 8:31





@cas: Clonezilla uses partimage, which in turn needs to understand each specific filesystem block device layout. And rsync only copies filesystem content as files. Depending on your use-case, one/both of these may make you have to use dd.

– Alex Stragies
Jun 14 '16 at 8:31













Both of those facts are features not problems, and are exactly why I recommended using clonezilla or rsync. bit-for-bit copies of the OS disk may be required for primitive OSes like Windows, but not for Linux. Linux does not care where on the disk any file is, so a file copy will work without a problem. In fact, a file copy will automatically and completely defrag the files as it copies them to the target fs.

– cas
Jun 14 '16 at 8:34





Both of those facts are features not problems, and are exactly why I recommended using clonezilla or rsync. bit-for-bit copies of the OS disk may be required for primitive OSes like Windows, but not for Linux. Linux does not care where on the disk any file is, so a file copy will work without a problem. In fact, a file copy will automatically and completely defrag the files as it copies them to the target fs.

– cas
Jun 14 '16 at 8:34













@cas : You and I, and many others here, know that. But a new user might not. That new user will then wonder, why part-image wont efficiently transfer only the used space of -say- an encrypted blockdevice, or why the rsync-copy of a Windows-FS fails to boot. So dd in this case is the slower, but "safer" (=less to explain/understand) method

– Alex Stragies
Jun 14 '16 at 8:37







@cas : You and I, and many others here, know that. But a new user might not. That new user will then wonder, why part-image wont efficiently transfer only the used space of -say- an encrypted blockdevice, or why the rsync-copy of a Windows-FS fails to boot. So dd in this case is the slower, but "safer" (=less to explain/understand) method

– Alex Stragies
Jun 14 '16 at 8:37















The OP was asking about linux filesystems, there was no mention of windows. a novice user is unlikely to even notice the issue with an encrypted device, and an experienced user will understand why. There's also no good reason to point novices at tools like dd (which are easy to make data-destroying mistakes with) rather than superior, safer tools like Clonezilla. or rsync (or cp -af or tar ... | tar ...)

– cas
Jun 14 '16 at 8:40







The OP was asking about linux filesystems, there was no mention of windows. a novice user is unlikely to even notice the issue with an encrypted device, and an experienced user will understand why. There's also no good reason to point novices at tools like dd (which are easy to make data-destroying mistakes with) rather than superior, safer tools like Clonezilla. or rsync (or cp -af or tar ... | tar ...)

– cas
Jun 14 '16 at 8:40




















draft saved

draft discarded




















































Thanks for contributing an answer to Unix & Linux Stack Exchange!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f289488%2fconvert-non-raid-disk-with-data-into-raid-1-disk-hardware-controller%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...