Koozali.org: home of the SME Server

SOLVED: Raid (why don't I ever learn...?)

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
SOLVED: Raid (why don't I ever learn...?)
« on: February 08, 2011, 12:30:57 PM »
Hello!


Situation on a server (with 2 x 160GB disks):



Code: [Select]

# cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda2[0]
      156143680 blocks [2/1] [U_]
     
md1 : active raid1 sda1[0]
      104320 blocks [2/1] [U_]





Code: [Select]
# mdadm --detail --verbose /dev/md1
/dev/md1:
        Version : 00.90.01
  Creation Time : Sun Apr 26 22:44:37 2009
     Raid Level : raid1
     Array Size : 104320 (101.89 MiB 106.82 MB)
    Device Size : 104320 (101.89 MiB 106.82 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 1
    Persistence : Superblock is persistent


    Update Time : Tue Feb  8 11:52:12 2011
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0


           UUID : ed21ddc6:eb1c9806:88dd4ce6:0ab01c75
         Events : 0.7324


    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       0        0        -      removed







Code: [Select]
# mdadm --detail --verbose /dev/md2
/dev/md2:
        Version : 00.90.01
  Creation Time : Sun Apr 26 22:44:37 2009
     Raid Level : raid1
     Array Size : 156143680 (148.91 GiB 159.89 GB)
    Device Size : 156143680 (148.91 GiB 159.89 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 2
    Persistence : Superblock is persistent


    Update Time : Tue Feb  8 12:17:32 2011
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0


           UUID : 5067b892:4028cee7:9a3ca544:4997f94a
         Events : 0.16225638


    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       0        0        -      removed










Call me stupid if you like, but I'm  just simply unable to follow the logics in pages like http://wiki.contribs.org/SME_Server:Documentation:Technical_Manual:Chapter5 so PLEASE could someone give me a clue on what to do???


Background:


This situation was created after I tried to follow the instructions at http://wiki.contribs.org/SME_Server:Documentation:Technical_Manual:Chapter5#Upgrading_the_Hard_Drive_Size


I swapped one of the disks to a larger one, and no automatic rebuild started...


The result on server (with one 160GB and one 1TB disk) was:



Code: [Select]
cat /proc/mdstat
Personalities : [raid1]
md2 : active raid1 sda2[0]
      156143680 blocks [2/1] [U_]
     
md1 : active raid1 sda1[0]
      104320 blocks [2/1] [U_]


(Hmm, same result as above...)


Since no automatic rebuild started up, and I couldn't afford to have the server down for a long time, I simply shut down and reinstalled the two original diska again.


So now I'm afraid I have created a small mess?


1. How shoud I proceed to get the situation back in order with the two existing 160 GB disks?


2. How should I proceed to switch to 2 x 1 TB disk later????




By the way: The server is a Dell T105.


Any clue is greatly appreciated!!!


« Last Edit: February 09, 2011, 12:43:42 PM by jumba »

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Raid (why don't I ever learn...?)
« Reply #1 on: February 08, 2011, 02:11:40 PM »
jumba

Quote
I swapped one of the disks to a larger one, and no automatic rebuild started...

No auto rebuild will ever happen if you swap in a new drive.

You have to manually instigate the drive being added to the array, by logging into the console as admin and then select Manage drives (or similar) menu.

Auto rebuild only occurs with drives that are already in sync which for some reason come out of sync eg a forced power outage.

Follow the instructions you referred to again keeping in mind what I said above.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Raid (why don't I ever learn...?)
« Reply #2 on: February 08, 2011, 02:25:12 PM »
Thank you. As I mentioned earlier, I have now re-inserted the two original 160 GB disks in the server.

Logging in as admin, I learn this:

Code: [Select]
Personalities : [raid1]
md2 : active raid1 sda2[0]
      156143680 blocks [2/1] [U_]
     
md1 : active raid1 sda1[0]
      104320 blocks [2/1] [U_]

Unused devices: <none>

The rest of the text is in Swedish, but it reads something like this:

"The number of free disks must equal one.

Manual intervention might be neccesary.

Present disk status:

Installed disks: sdc sda sdb

Used disks: sda

Free disks: sdc sdb"




...Now that I write this, I just realize that there might be a usb-disk connected to that server as well (sdc...?)

OK, I'll give them a call and ask them to disconnect that usb-disk...

This usb-disk might be part of the problem???


Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Raid (why don't I ever learn...?)
« Reply #3 on: February 09, 2011, 02:45:53 AM »
jumba

You broke the array when you removed the smaller disk & tried to add (incorrectly) the larger disk. Now you have reconnected the smaller drive again but the array is still broken ie the system does not know about the second drive anymore.

To add any used drive to an array you MUST erase (ideally) the partitions, so the drive is clean when you reconnect it physically to the drive.

I'm pretty sure the correct dd command to use is shown in the RAID Howto, otherwise search here.

After reconnecting the clean 160Gb (or whatever size drive you want to use), you still need to instigate the system to re-add the drive to the RAID array. As mentioned already, login as admin to console and select Manage drives menu.

Yes it would be best to remove any USB drive while rebuilding arrays.
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline jumba

  • *****
  • 291
  • +0/-0
  • Donations: July 2007 - $ 20.00
    • Smeserver på svenska!
Re: Raid (why don't I ever learn...?)
« Reply #4 on: February 09, 2011, 12:43:16 PM »
Hi Mary!

I've managed to sort out the situation. What I did was to DISCONNECT that external USB-disk.
After that, I repeated the steps I tried yesterday: Swapped one of the small 160GB disks to a 1TB disk.
Started up the server, logged in as admin and now (without that USB-disk connected) all webt acording to the manual.

So now that particular server is up and running with a 2x1TB RAID.

(Maybe this should be added to the manual, just in case someone else encounter the same situation...?)

Many thanks!




Offline ber

  • *****
  • 239
  • +0/-0
Re: SOLVED: Raid (why don't I ever learn...?)
« Reply #5 on: February 12, 2011, 05:46:13 AM »
Hi Jumba/Mary,

I agree as Jumba has noted...

I had the same problem and all it was, was the external USB Disk.- simple solution but a nightmare trying to troubleshoot.

Should be noted on the manual definitely...
« Last Edit: February 12, 2011, 10:11:33 AM by ber »