Koozali.org: home of the SME Server

Please. How do you shrink a RAID 1. Moving to a SSD drive

Offline purvis

  • ****
  • 567
  • +0/-0
Please. How do you shrink a RAID 1. Moving to a SSD drive
« on: June 19, 2016, 01:05:50 AM »
Hi all,
I want to shrink a RAID 1 setup of my current drives to fit half the size of new SSD that I want to use.
The data on the RAID 1 is not a lot, less than 50Gig, maybe even 32 Gig.
The system is on metal. I originally installed clean with SME 8.? on a 500 gig hard drive to RAID 1, then replaced the drives with 1TB drives but never did expand the 500 to the full 1TB drives that are in RAID 1.

I have done some special adding of software along the way. So I would prefer the shrinking of the system to a new install.
I plan to use either 240 GIG or 480 GIG SSD drives now.

It seems worthy if possible to leave space on the SSD unallocated. I think they call this over provisioning a drive.
The information i have found on the forum seems scattered.
I have already done the backup of the files and used the web interface server-manager to backup the SME 8 server on the files I did not backup by simple copy from most the ibay folders.

Of course, I will remove a drive out of the RAID 1 to provide a safety net for what might go wrong.
I used the command line: sme raid=1 spaces=0   during the initial install of SME 8.
I would appreciate if somebody could lead me on how to reduce the system to something like a file system for a 120GIG drive.

So, in a nutshell I will.

Remove 1 of the 2 hard drives that are in RAID 1 and shelve it for backup.
Reduce/shrink the hard drive left in the machine to about 120 GIG.
Put in a 240Gig SSD drive.
Rebuild the RAID 1.
Remove the hard drive that I had reduced/shrunk.
Put in another 240Gig SSD drive.
Rebuild the RAID 1 to match that first SSD I put into service.
Basically this should leave me with half the SSD drives and I can grow the file system on the new SSD if necessary.

And just for what it worth. I do have SME 8 servers running on a couple of other SSD drives where they uses the whole SSD space from a new install.
I am using Samsung Pro 128 GIG and Intel 530 or 540 drives in the 180 or 240Gig sizes.
Thank you
 

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #1 on: June 19, 2016, 07:20:49 AM »
purvis

Do a full backup, install new SME OS onto smaller drive, restore from backup.
Easiest approach IMO.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #2 on: June 19, 2016, 08:00:21 AM »
Janet
that is not quiet an answer.
There is a method to do as i asked.
When a lot of modifications have been done to a system and to a redo over may not bring the system to the same setup.
That is not the easiest approach. That is a beginners cop out.
« Last Edit: June 19, 2016, 08:01:58 AM by purvis »

Offline TerryF

  • grumpy old man
  • *
  • 1,821
  • +6/-0
--
qui scribit bis legit

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #4 on: June 19, 2016, 11:45:15 AM »
Janet
that is not quiet an answer.
There is a method to do as i asked.
When a lot of modifications have been done to a system and to a redo over may not bring the system to the same setup.
That is not the easiest approach. That is a beginners cop out.


Purvis, you're wrong
Janet have you the right answer
If you followed the SME way to make customization all you have to do is backup and restore
Usually I create my custom scripta in a dir which is comprised in backup and then link them if needed
Another way to achieve what you want is to install a single disk machine then use rsync, but you must know what and where

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #5 on: June 19, 2016, 12:00:07 PM »
Terry. Thanks.
I saw that write up plus another on the web that might work. .
I actually did do a reinstall but there are other software like Avira for Linux installed on the server that took a great deal of work to get it all working correctly.
I am use to working hard and determined to get  the process to work on shrinking the drives.
Also there was a write up on the form on another similar situation on forum that maybe I can clean up to make this work.


Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #6 on: June 19, 2016, 12:16:13 PM »
BTW, this is the right moment to move to SME9

Offline janet

  • ****
  • 4,812
  • +0/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #7 on: June 19, 2016, 04:37:57 PM »
purvis

It is simple enough to follow a tutorial to decrease the RAID size, but you need to ensure that there is no data in the area of the drive that will be shrunk/deleted, & that is not so simple. A tool like GParted may help to move all data to a certain part of the drive surface & create a chunk of free space.

If you have configured sme server appropriately & added say /opt to your backup routine (if contribs are installed there) & added db settings or custom templates for your specific contrib configuration, then all that data will be included in backups.
Also you cannot easily (or at all for that matter) extract all configuration data from the various db files, sme server splits various aspects of user configuration data across multiple databases, so it is NOT POSSIBLE to extract that data, or certainly no-one has ever done it so far in the last 16 years that I am aware of.
A backup & restore IS the most effective way & perhaps ONLY way to really achieve the end goal you are after.
Of course you will need to reinstall contribs, that has ALWAYS been the case when restoring from backup to a new OS install.
If you save all the contrib rpms into a ibay (as is recommended practice) then you have everything you need in the backup.
Again of course you may need to update some contribs if you wish to update to a new version of sme server (eg 8 to 9), but if you restore to the same version (eg 8 to 8 ) then reinstalling contribs AFTER doing the restore from backup, will allow the contribs to pick up all the contrib configuration settings & data they have created previously.

If you have hand/manually edited configuration (conf) files, then that is not recommended practice, & those changes are not in backups, & that data will be difficult to transfer to another server. Best policy is to follow SME server recommended practices.

Perhaps you should read
https://wiki.contribs.org/Backup_server_config
and particularly
https://wiki.contribs.org/Backup_server_config#Backup_and_Restore_concepts.2C_issues_and_other_information
« Last Edit: June 19, 2016, 06:22:34 PM by janet »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Online Jean-Philippe Pialasse

  • *
  • 2,746
  • +11/-0
  • aka Unnilennium
    • http://smeserver.pialasse.com
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #8 on: June 19, 2016, 05:51:34 PM »
I tried the procedure 3 times ( 2 immediately failed, and the last took time to show it was also a failure), and considering the amount of time to make all the verification to not having it to fail, I would really recommend to avoid the procedure to shrink your raid.

The best approach to me if you have a really complicated over customized system would be install a new one and then rsync all the folders except dev sys and proc.

I second Stefano that a simple backup restore should do the trick and allow to use this opportunity to move to SME9, then you will be happy for a few year more, rather than to have to deal with the migration later after losing at least 50 to 100hours trying to shrink your volume and double checking all file are still there. Sadly, this could still let you discovering only 2 months later that some important files are corrupted and backups have already been overwritten.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #9 on: June 23, 2016, 09:55:32 PM »
I am sorry, my father was put in the hospital with a heart attack on Sunday and in the hospital too on Saturdayand pneumonia and my mother has dementia bad too.
I was out of pocket the too much. My father is out now.
Getting back to this subject.

Offline purvis

  • ****
  • 567
  • +0/-0
Re: Please. How do you shrink a RAID 1. Moving to a SSD drive
« Reply #10 on: June 23, 2016, 10:24:11 PM »
Janet thanks, your info is well read.
Yes, I have not learned to put rpms in an ibay which is super good advice. I will next time.
I have the server I am wanting to shrink down and at my location.
I had installed SME 8 on a new machine and made some standard changes that I have noted in a history file.

I only use RAID 1.
Some years back, I made a decision to install only on smaller hard drives and then rebuild the RAID onto larger drives.
If I needed to grow the volume, I had that option, but I did not start with a small enough hard drive as I should had because I did not see SSD drives coming.
I do like the SSD drives in that they give better performance and where the data is not changing too rapid on the drives, hopefully they will see less failure.
Boot up times are nice but not the most important thing here.
I have more digging to do before I try to accomplish the goal of shrinking. Not fully understanding software RAID and RAID in general with manual manipulation does not help.
Thanks to the hard work of others. Working with RAID 1 on SME for me has been a dream come true.

Stephano, I did put SME 9 into a virtual machine and working with it. As you know, something that is working is very hard to move from.