dude67 Posted January 3, 2012 Report Share Posted January 3, 2012 I have a set of two 750 GB Samsung Spinpoints installed as RAID1. Now one of the drives' SMART reports "bad" during boot even though the raid still seems to work fine. I don't seem to find an identical 750GB drive - and even though I may be able to find a suitable 750 GB drive or install a 1 TB drive (and lose 250 GB of that space), I may want to update my array to 1 TB if possible. So my question is: is it possible and if so, how do I do it? Quote Link to comment Share on other sites More sharing options...
paul Posted January 3, 2012 Report Share Posted January 3, 2012 don't suppose you're using lvm on top of that raid set are you? lvmextend would do the trick Quote Link to comment Share on other sites More sharing options...
dude67 Posted January 3, 2012 Author Report Share Posted January 3, 2012 On this one set I'm not, I'm afraid. I could just install fresh Mageia1 on a new HD (let's say 1 TB) and then copy all from that 750 GB drive into the new one. But how can I set up (after copying the contents to the new hd) RAID1 (perhaps even with LVM) into an already installed hd? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted January 4, 2012 Report Share Posted January 4, 2012 It would be easy enough as you'd need to remove the faulty disk, and then add the new one. Add a partition to it marked as Raid Autodetect. Edit /etc/mdadm.conf so that the second disk is missing. Then you will need to add it to the array after the system has started. The array will then rebuild on the new disk. Then you edit /etc/mdadm.conf again to add back the config as it was before with the second disk. Of course, if you're replacing with a disk of the same size. I know you want larger. Therefore, you'd create Raid1 on the 1TB disk with the second disk missing, then LVM inside this. Copy the data to the disk. Then add another 1TB disk later similar in my procedure for replacing a faulty disk and adding it to your 1TB array. Quote Link to comment Share on other sites More sharing options...
dude67 Posted January 4, 2012 Author Report Share Posted January 4, 2012 OK, thanks. That sounds so terribly easy... :) But, could you explain this a little bit more detailed for me...? I will first remove the current 750 GB sda (reported bad in SMART) and replace it with a new 1 TB disk. Do I need to mark it as failed, or just remove the old one and insert the new one? Then I do not get this part: Add a partition to it marked as Raid Autodetect. I should add a partition to the new disk (1 TB) marked as Raid Autodetect? For the hole disk or to a portion of it? How do I mark the second disk as missing in /etc/mdadm.conf? Sorry, but this is little confusing. Perhaps I should sleep on it (and buy some new disks first) before trying to wrap my brain around this. :unsure: I'll get some new disks and try to get the bad disk replaced first. I'll post back after that. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted January 4, 2012 Report Share Posted January 4, 2012 Removing the disk and booting the machine, should leave you with the disk missing. Adding a partition with fdisk, or whichever you normally use :) and changing the type to Linux raid autodetect. You won't add the 1TB to the array, since it won't be the same size. You'll create a separate array with the 1TB disk, but with the second disk missing. Then, when you've copied the data from the old array to the new array, you can then remove the 750GB disk and add a second 1TB disk and then add this to the array. With /etc/mdadm.conf - if you have disks /dev/sdb and /dev/sdc as part of the array, and /dev/sdc is faulty, then you edit /etc/mdadm.conf and remove the info that corresponds with /dev/sdc and replace it with "missing". Look at my article I wrote ages ago: http://www.linuxsolutions.org/index.php?option=com_content&task=view&id=25&Itemid=26 in particular: Creating Arrays Since /dev/sda is in use, we cannot add this to the array yet, so we will build the array with /dev/sda offline, and only /dev/sdb active. This is how: mdadm --create /dev/md0 --level=1 --raid-devices=2 missing /dev/sdb1 mdadm --create /dev/md1 --level=1 --raid-devices=2 missing /dev/sdb2 mdadm --create /dev/md2 --level=1 --raid-devices=2 missing /dev/sdb3 mdadm --create /dev/md3 --level=1 --raid-devices=2 missing /dev/sdb5 mdadm --create /dev/md4 --level=1 --raid-devices=2 missing /dev/sdb6 here you can see, the part where I have /dev/sda missing but the array configured on /dev/sdb. When I then remove and replace /dev/sda with the new disk (eg 1TB), I would then add it later to the array. It's all in the link, it will tell you how to add the disk later, and then in /etc/mdadm.conf you replace missing with /dev/sda. Quote Link to comment Share on other sites More sharing options...
dude67 Posted January 8, 2012 Author Report Share Posted January 8, 2012 Thanks Ian for your help! I think that I will still postpone this HD replacement as I'm thinking of perhaps updating the entire PC. Quote Link to comment Share on other sites More sharing options...
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.