Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
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.
I don't think you provided enough information for anyone to give you a detailed answer.
I haven't used Linux software RAID enough to know the answer even if you had given enough info. But I do know how to use google. The first hit when I tried google to get your answer looks pretty good:
The first step described there also looks like a very good step to get the additional data someone would need in order to give you a better answer. Post the output from
Code:
cat /proc/mdstat
Edit, now that I've read that whole link more carefully, I no longer think it is a good enough tutorial to get you through the whole process. But the first step of gathering relevant info is still a good idea while waiting for a better expert to help.
I also suggest posting the output from the following command as root:
I don't think you provided enough information for anyone to give you a detailed answer.
I haven't used Linux software RAID enough to know the answer even if you had given enough info. But I do know how to use google. The first hit when I tried google to get your answer looks pretty good:
The first step described there also looks like a very good step to get the additional data someone would need in order to give you a better answer. Post the output from
Code:
cat /proc/mdstat
Edit, now that I've read that whole link more carefully, I no longer think it is a good enough tutorial to get you through the whole process. But the first step of gathering relevant info is still a good idea while waiting for a better expert to help.
I also suggest posting the output from the following command as root:
[root@server3 ~]# fdisk -l
WARNING: The size of this disk is 3.0 TB (3000592982016 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).
Disk /dev/sda: 3000.5 GB, 3000592982016 bytes
64 heads, 32 sectors/track, 2861588 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sda1 2 32768 33553408 fd Linux raid autodetect
/dev/sda2 32769 33280 524288 fd Linux raid autodetect
/dev/sda3 33281 1081856 1073741824 fd Linux raid autodetect
/dev/sda4 1081857 2861588 1822445568 85 Linux extended
/dev/sda5 1081857 2861588 1822445567+ fd Linux raid autodetect
WARNING: The size of this disk is 3.0 TB (3000592982016 bytes).
DOS partition table format can not be used on drives for volumes
larger than 2.2 TB (2199023255040 bytes). Use parted(1) and GUID
partition table format (GPT).
Disk /dev/sdb: 3000.5 GB, 3000592982016 bytes
64 heads, 32 sectors/track, 2861588 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 2 32768 33553408 fd Linux raid autodetect
/dev/sdb2 32769 33280 524288 fd Linux raid autodetect
/dev/sdb3 33281 1081856 1073741824 fd Linux raid autodetect
/dev/sdb4 1081857 2861588 1822445568 85 Linux extended
/dev/sdb5 1081857 2861588 1822445567+ fd Linux raid autodetect
Disk /dev/md2: 1099.5 GB, 1099511562240 bytes
2 heads, 4 sectors/track, 268435440 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md2 doesn't contain a valid partition table
Disk /dev/md3: 1866.1 GB, 1866184130560 bytes
2 heads, 4 sectors/track, 455611360 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md3 doesn't contain a valid partition table
Disk /dev/md1: 536 MB, 536805376 bytes
2 heads, 4 sectors/track, 131056 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md1 doesn't contain a valid partition table
Disk /dev/md0: 34.3 GB, 34358624256 bytes
2 heads, 4 sectors/track, 8388336 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table
That info shows me your goal is a little trickier to reach than I would have expected. But it certainly is doable.
I looked at a few online descriptions of the process and I don't understand why they make it as difficult and dangerous as they do. I think it should be a little simpler than the online descriptions make it. But maybe there is some aspect of software RAID I'm misunderstanding.
You should be aware of four layers for /home and three layers for / and that resizing must affect all layers. There might be some GUI tool that does all the layers together (as there is for non RAID partitions) making all this easy. I don't know it.
You have a file system for /home. That file system is inside a RAID partition md3. That RAID partition is inside logical partitions sda5 and sdb5. Those logical partitions are inside extended partitions sda4 and sdb4.
Lacking knowledge of a tool that coordinates the whole process, I think you would need to:
1) shrink the file system inside md3
2) shrink the RAID partition md3
3) shrink/move the logical partitions, I think leaving the freed space inside the extended partitions sda5 and sdb5.
4) shrink the extended partitions sda4 and sdb4 leaving the freed space before them
Then
5) Extend the primary partitions sda3 and sdb3.
6) Extend the RAID partition md2.
7) Extend the filesystem inside md2.
For step 5, online info I have read instead suggests:
5a) remove one of sda3 or sdb3 from md2
5b) grow the one that was removed
5c) replace and resync it
5d) remove the other
5e) grow it
5f) replace and resync it.
I don't know if/why all that is needed.
That info shows me your goal is a little trickier to reach than I would have expected. But it certainly is doable.
I looked at a few online descriptions of the process and I don't understand why they make it as difficult and dangerous as they do. I think it should be a little simpler than the online descriptions make it. But maybe there is some aspect of software RAID I'm misunderstanding.
You should be aware of four layers for /home and three layers for / and that resizing must affect all layers. There might be some GUI tool that does all the layers together (as there is for non RAID partitions) making all this easy. I don't know it.
You have a file system for /home. That file system is inside a RAID partition md3. That RAID partition is inside logical partitions sda5 and sdb5. Those logical partitions are inside extended partitions sda4 and sdb4.
Lacking knowledge of a tool that coordinates the whole process, I think you would need to:
1) shrink the file system inside md3
2) shrink the RAID partition md3
3) shrink/move the logical partitions, I think leaving the freed space inside the extended partitions sda5 and sdb5.
4) shrink the extended partitions sda4 and sdb4 leaving the freed space before them
Then
5) Extend the primary partitions sda3 and sdb3.
6) Extend the RAID partition md2.
7) Extend the filesystem inside md2.
For step 5, online info I have read instead suggests:
5a) remove one of sda3 or sdb3 from md2
5b) grow the one that was removed
5c) replace and resync it
5d) remove the other
5e) grow it
5f) replace and resync it.
I don't know if/why all that is needed.
wow linux is hard man.
Am ready to give you my server pass and to make it for me.
contact me at b.sejdini(at)yahoo.com if you can help me with this.
Thanks
I expect it isn't that hard. I just don't know the easier way.
BTW, have you ever resized a software RAID on Windows XP (I have). That is different but way harder, plus it required using Linux tools.
Quote:
Am ready to give you my server pass and to make it for me.
contact me at b.sejdini(at)yahoo.com if you can help me with this.
One item I didn't mention in this thread (I did in your other thread). Most of that work cannot be done while your server is booted normally. You need to shut it down and boot something such as a Linux bootable CD, then do all the partition resizing while that CD is booted. That makes it a bit trickier (I don't think impossible) for you do give control to someone remotely to do the commands for you.
My own skill level is high enough to blunder through something like this in person (I have done many similar tasks that way) but not nearly high enough to deal with the extra challenge of working remotely.
Since the system is so new, what is wrong with the plan of wipe it all out and install Centos (or Ubuntu if you really prefer) from scratch partitioned whatever way you want?
But looking at your other thread also made me realize you don't really need/want to mess with resizing md3. You really want to delete md3.
You can easily copy all of /home from md3 to some other directory on md2. Later you can dismount and eliminate /home and rename that other directory as /home. Then delete md3, sda5, sda4, sdb5 and sdb4. I think all that might even be doable while the full system is booted normally (as long as ordinary users aren't logged in).
Then growing md2 should be somewhat simpler with sda4 and sdb4 completely gone. Growing md2 would still require being booted from something else.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.