LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   mdadm problems with growing an existing array (https://www.linuxquestions.org/questions/fedora-35/mdadm-problems-with-growing-an-existing-array-329413/)

mjcramer 06-01-2005 10:39 PM

mdadm problems with growing an existing array
 
Hi, I'm wondering if anyone can help me with a RAID issue. Recently I added another drive to my RAID, replacing one that had failed. This replacement drive was a bigger drive than the previous, in fact the previous drive was the last of the smaller drives that I had to replace. Having now an array of 40G drives instead of 30G, I thought I could grow my RAID using the

mdadm --grow -s <size> /dev/md0

command to utilize the extra space. Well, now this worked, but the filesystem underneath all this is now messed up. Most directories I try to access yield an I/O error with an

inode_doinit_with_dentry: getxattr returned 5 for dev=md0 ino=5723207

error. Did I screw up royally here? What can I do to get to my data. I'm afraid to fsck it now, because that asks me to do all kinds of inode twiddling.

What should I do?

-cramer

Petevs 07-11-2005 07:11 PM

When I 've replaced a smaller drive with a bigger one and wanted
to 'clone' the working drive in the array I run this



sfdisk -d /dev/hda | sfdisk /dev/hdb

where a= exiting/working drive in array and b = new drive you want to sync.

By doing this you don't use the new drives total capacity but it
saves time.
Pete

mjcramer 07-11-2005 08:28 PM

growing an array with mdadm
 
Yes, but that is not what I need. First of all, the drive I'm replacing has failed, and therefore cannot be accessed. Second, I know how to replace and recover a drive in a RAID, what I actually want to do is to grow the array once all the replacement drives have become bigger. This can be done using the 'mdadm' command - I actually don't know the complete syntax and I'm not near a linux box at this time, but the man page for mdadm documents it well. The man page also says that growing the array does NOT necessarily grow the filesystem built on top of the array.

SOOOOOOOO...

What I want to know is how to grow the filesystem without majorly mucking everything up. It's too late for me now, because I already majorly mucked up the RAID and lost most of my data, but for the future I want to know how to do this properly. The only thing I can really think of is to insert the new drive into the array and let it recover fully. Then, copy the whole filesystem onto another drive or onto some backup somewhere. Then, rebuild the filesystem on the RAID to the bigger size. However depending on the size of the RAID, this might not be feasible given one's backup resources.

Any information on this topic, is of course, very welcome...


All times are GMT -5. The time now is 03:11 PM.