Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
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 have some queries on increasing sapce in "Raid1" partition on centos 6
I have 2 HDD (sda & sdb) with four partition (swap, /boot, / and /opt), all are configured on Raid1. The four raid1 partition (md0, md1, md2, md3)on each HDD are taken from four "part" of each HDD
1. Is it possible to increase the space only on /opt ? (in this scenario im asking)
2. If possible, Can i do two equal partition on sdc and may i use it for sda4 & sdb4 to increase the space on md3 (/opt) ?
Hope my explanation is bit clear, please help on my query.
Since sdc would be a single disk it is a single point of failure so you would not get any RAID benefit by partitioning it and adding both partitions to a single RAID1 meta-disk (or to a filesystem no matter how you partition it).
If you're willing to take the risk of having no redundancy for /opt you could just use the entire sdc for a single partition and replace you're existing /opt with that. Alternatively you could make the sdc partition a subdirectory of /opt (e.g. /opt/myappdir) and move whatever needs the most space onto it while leaving everything else in your /opt.
Ideally you'd install yet another disk that you could pair with sdc for the new stuff.
Another way to get redundancy would be to reinstall using RAID5 for the 3 disks (assuming they're all the same size). You'd end up with the full space of 2 of the disks available which is what you'd have with a RAID1 with 2 disks and another disk not in RAID at all so the benefit of RAID5 would be having redundancy.
Last edited by MensaWater; 04-18-2017 at 08:03 AM.
>> Since sdc would be a single disk it is a single point of failure so you would not get any RAID benefit by partitioning it.
Im ok with this above statement. i ready to go forward
We cannot change the set up in the above format , because it is a live mail server and in /opt zimbra (a mail server application) is running..
my doubt is , md3 is taken from sda4, sdb4. i need to increase the sapce on sda4, sdb4 to get incease the space in md3. Since sda4, sdb4 are- type "part" is it possible to increse the sapce ?
>>Another way to get redundancy would be to reinstall using RAID5 for the 3 disks (assuming they're all the same size). You'd end up with the full space of 2 of the disks available which is what you'd have with a RAID1 with 2 disks and another disk not in RAID at all so the benefit of RAID5 would be having redundancy.
MensaWater, here we are using the sofware RAID, Can you please tell me how to move my configuration from RAID1 to RAID5, Can i do this with out any data ?
Your problem is that your existing setup is RAID1. If you add another disk (or partition) it simply becomes another copy without giving any increase in space (i.e. it merely increases redundancy).
As 2 of us have noted using the 3rd disk alone (even if you mirror 2 partitions on it) as a separate meta-disk will leave you without any real redundancy. If you say you can't take down time even for planned maintenance then not having redundancy is a bad idea.
My suggestion, if you are willing to forego redundancy is to move the largest item off of md3 to the new disk.
In /opt you can run "du -sk * |sort -rn" to see which is the largest subdirectory.
You can then make a new subdirectory called something else (e.g. mkdir /opt/zimbra.new if /opt/zimbra is your largest) and mount your new disk or partition (e.g. /dev/sdc1) as /opt/zimbra.new.
You'd be able to copy all the files from existing directory to the .new directory. You'd want to do final copy with any application using the existing directory shutdown. You can find what is using it with lsof (e.g. lsof /opt/zimbra).
You can then move the existing to .old (e.g. mv /opt/zimbra /opt/zimbra.old) and recreate the directory to be an empty mount point (e.g. mkdir /opt/zimbra).
You'd then set up your /etc/fstab to mount the device used (e.g. /dev/sdc1) as /opt/zimbra. You'd unmount the /opt/zimbra.new and remount as /opt/zimbra. You'd then remount the filesystem.
Again the above would allow you to have the additional space of the new device for whatever you moved but would NOT be redundant if it is a single drive (even if you use multiple partitions).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.