Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: jameswilson on April 28, 2012, 09:03:52 PM

Title: Resizing Hard drives
Post by: jameswilson on April 28, 2012, 09:03:52 PM
I have a sme quest on xen.
Its an online backup server purly for affa. It doesnt currently do anything but backup various systems.
I have recently added a sme server to our work network in addition to the SBS server we run at our office.

I have tried to increase the size of the disk to also backup our new server without success
i followed the guide here first
http://wiki.contribs.org/Raid#Upgrading_the_Hard_Drive_Size

then i noticed
Quote
Note: these instructions are only applicable if you have a RAID system with more than one drive. They are not applicable to a single-drive RAID 1 system, and increasing the useable space on such a system by cloning the existing single drive to a larger drive is not supported. See http://bugs.contribs.org/show_bug.cgi?id=5311

I know i should read them fully lol

So i followed the bug report and followed those instructions.
But i think i may have broken something. The machine runs fine but says it doesnt have a /dev/md2

Quote
[root@smebackupserver ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/main-root
                      492G  186G  282G  40% /
/dev/md1               99M   16M   78M  17% /boot
none                  513M     0  513M   0% /dev/shm
If i substitute /dev/md2 with main-root it complains.

So 2 things i guess. 1 how do i put this back so its md2 and can i / should i resize this way. I can add a second disk but when i did this it said it was synced but it wasnt. Im assuming this is cos of the md2 issue.

Many thanks

James
Title: Re: Resizing Hard drives
Post by: Jáder on April 29, 2012, 12:35:36 AM
what shows this command:
Code: [Select]
cat /proc/mdstat
when you have 2 HDDs and SME reports it's sinchronized ?

This is from a working SME8b7 with RAID1 ok:
Code: [Select]
[root@falcao ~]# cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb1[1] sda1[0]
      104320 blocks [2/2] [UU]
     
md2 : active raid1 sdb2[1] sda2[0]
      976655552 blocks [2/2] [UU]
     
unused devices: <none>
[root@falcao ~]#
[root@falcao ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/main-root
                      901G   86G  769G  10% /
/dev/md1               99M   25M   70M  26% /boot
tmpfs                1008M     0 1008M   0% /dev/shm
[root@falcao ~]#

And this is a failed RAID1 on a SME751:
Code: [Select]
[root@corvo ~]# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda3[0]
      1959808 blocks [2/1] [U_]
     
md3 : active raid1 sda2[0]
      76083776 blocks [2/1] [U_]
     
md1 : active raid1 sda1[0]
      104320 blocks [2/1] [U_]
     
unused devices: <none>
[root@corvo ~]#

Note the missing U replaced by a "_" on this one.
This tell you the second disk is failed/missing/not in RAID.

I'd guess you're using SME8... anyways... post your EXACT config, what command you tried and EXACT error message (copy and paste screen results).





Title: Re: Resizing Hard drives
Post by: janet on April 29, 2012, 01:29:13 AM
jameswilson

Quote
[root@smebackupserver ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/main-root
                      492G  186G  282G  40% /
/dev/md1               99M   16M   78M  17% /boot
none                  513M     0  513M   0% /dev/shm

That looks normal, & is the same as my sme7.5.1

Typically you need to rebuild the server with 2 larger drives in RAID1 with a clean install of the OS, and then restore from a backup created on the single disk machine, then reinstall your contribs (the contrib settings will be restored from the backup).
Make sure you include /opt in the backup if you have stuff installed there, see
http://wiki.contribs.org/Backup_with_dar#Adding.2FExcluding_Directories_and_Files_from_the_backup_list

You could also use the "Restore from Disk" method by mounting the old smaller disk in the new server temporarily. Make sure you run the necessary "pre" commands on the old server before removing the disk.
http://wiki.contribs.org/UpgradeDisk