Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a Ubuntu server with the operating system installed on a raid1 created with two 500GB devices. the second drive failed. I now how to replace it, but my goal now is to move the operating system on a 4 Gb USB drive (as the whole server installation is 1.5 Gb). Maybe it looks like a crazy thing but I'm confident that a raid created with two USB drive can be more efficient in my scenario. This is not a critical server, used for testing purpose, but the goal is not to reinstall it from zero and use the OS as it is now in the 500gb device that still exists. Any idea how to do that?

share|improve this question

migrated from stackoverflow.com Oct 6 at 13:46

This question came from our site for professional and enthusiast programmers.

    
Thank you very much for the migration. –  Peter Horvath Oct 6 at 13:55

1 Answer 1

No, for the second spot it is not a bad idea, although this question had probably a better place on serverfault.com .

The usb disks are for the linux practically disks on /dev/sd?, just as any other. Probably you will have some problems with the bios bioting, and there will be a problem that after every disk failure (in case of the usb it will happen much often) there will be a full raid resync.

Anyways, your goal has practically 4 steps:

  1. You create the raid array from the usb disks, and resync that.
  2. Format it to your actual filesystem (probably ext4).
  3. Clone your system into them,
  4. Reboot into that.

Only the first step has with mdadm anything to do. You can create a raid mirror from two usb pendrives just as you did it from two disks:

mdadm --create /dev/md0 -n 2 -l 1 /dev/sdX /dev/sdY
mdadm --start /dev/md0

Probably you will have a lot other questions during the 3 other steps. This site, and the serverfaulr SE are waiting you with them.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.