Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
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.
Not sure if this should be a HW or SW question, but basically having a hard time figuring out if I can have a drive up and running and then after the fact buy an identical drive and mirror it into a RAID1. Searching brings up yes, and no. I know how RAID works but I've never done it so not sure where to go. Just trying to be cheap for a couple weeks in between drive purchases.
btrfs will let you do that. As far as I know, none of the others will.
md will NOT do it UNLESS the partition is first initialized as a raid 0 with only one disk. The initialization of the partition as an md device will occupy some of the blocks that would otherwise be used as the superblock. Once initialized as a raid 0 I believe you can then modify it to a raid 1 in degraded mode, then add a second disk. The action of adding the second disk will then replicate the configuration, and copy the contents.
This is because md raids are emulating a raid controller device, and the raid handling is separate from the filesystem.
ah. My post above is all about software raid, not hardware raid.
A hardware raid controller would have its own handling. As to whether it would allow it or not, depends on the controller, and how the disks are handled. Most require some blocks to be used for the raid configuration, and if the controller is not being used in a raid configuration, then these blocks are not initialized, and you are back with the same limitations as with md raid.
Yes - I'm surprised your searching didn't find this.
Stick the new disk in, partition as appropriate (or not at all), create RAID1 with 2 devices and --missing using the new disk/partition.
Maybe have to reboot to get the new disk/partition(s) recognised. Check /proc/mdstat that everything is ok, mount it, mkfs, copy/rsync.
At this point, for a data disk, you can do a reboot and check it looks ok, then just trash the old disk, re-partition it and add it to the RAID. Simple - it will sync itself across. Fix fstab in need.
If it's your system/boot partitions we are talking about you need to be a littlelot more careful - bootloaders and initrd spring immediately to mind. And of course that is distro specific.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.