Koozali.org: home of the SME Server

upgrade PATA to SATA harddisk problem

Offline David Yip

  • *
  • 18
  • +0/-0
upgrade PATA to SATA harddisk problem
« on: July 25, 2010, 07:40:15 PM »
Dear all:

I want to upgrade the PATA harddisk to SATA.

OLD Config:
PATA 250GB X2 in Raid 1

NEW Config:
SATA 500GB X2 in Raid 1

Main Board ASROCK P4i65

I follow the info http://wiki.contribs.org/Raid

   1.  Shut down and install larger drive in system.
   2. Boot up and manage raid to add new (larger) drive to system.
   3. Wait for raid to fully sync.
   4. Repeat steps 1-3 until all drives in system are upgraded to

larger capacity.
   5. Ensure all drives have been replace with larger drives and array

is in sync and redundant!
   6. Issue the following commands:

Shutdown , install the Sata 500GB X1 , remove PATA 250GB X1
System remain PATA X1 & SATA X1
Start with the PATA. OK & normal.
manage raid redundancy & wait. OK  & normal.

Shutdown , install the second SATA 500GB. Remove last PATA 250GB.
System remain SATA X2 & one of them is fully sync.
Start the server with the SATA which is synced complete.

The problem is here. Start the server & then stopped here with this
message.


Activating logical volumes
  Volume group "main" not found
ERROR: /bin/lvm exited abnormally! (pid 443)
Creating root device
Mounting root filesystem
mount: error 6 mounting ext3
mount: error 2 mounting none
Switching to new root
switchroot: mount failed: 22
umount /initrd/dev failed: 2
Kernel panic - not syncing: Attempted to kill init!

I also find some message running so fast but I catch is the SATA Drive

should be /dev/sda & /dev/sdb but now is /dev/hda & /dev/hdb.

I install back the PATA 250GB. & start again.
System remain PATA X1 & SATA X2
Start the server with PATA device.
It is OK & normal. (server find the device are /dev/hdc, /dev/sda, /dev/sdb)
I run the manage disk redundancy manually (use mdadm command)due to two
harddisk are not in the raid.
add the first SATA into the raid & wait.
finished & then add the second SATA into the raid & wait.
finished & find no problem. It is raid 1 with 3 harrdisk & status is
clean.

shutdown & remove the PATA harddisk agian.
Same error occured.

I think there is a harddisk detection problem & made the device name
changed. Then it cause the LVM2 can't start.
Just I think but I am not sure.

Please help me to fix it. Thanks in advance!

David Yip
LJ Computer Systems in Hong Kong


Offline geoff

  • ***
  • 61
  • +0/-0
Re: upgrade PATA to SATA harddisk problem
« Reply #1 on: July 26, 2010, 09:28:29 AM »
I prefer to Backup to USB Device, changeover the HDDs, reinstall SME 7.5.1 and restore from Backup.

Easy ....

Offline David Yip

  • *
  • 18
  • +0/-0
Re: upgrade PATA to SATA harddisk problem
« Reply #2 on: July 26, 2010, 11:35:06 AM »
Dear Geoff:

Thanks for your reply.

I know this is a way to try but the down time is much longer(It is a production email & file server). It takes more than several hours for nearly 240GB data. I think this method is the last method for me if no any other good method instead.

Thank you again!
David Yip

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: upgrade PATA to SATA harddisk problem
« Reply #3 on: July 26, 2010, 11:38:34 AM »
if you have a spare machine with enough disk space you could use Affa to do a double live migration.. it's a bit tricky but down time will be of minutes, not hours

Offline idp_qbn

  • *****
  • 347
  • +0/-0
Re: upgrade PATA to SATA harddisk problem
« Reply #4 on: July 26, 2010, 09:23:41 PM »
Hello David,
I vaguely remember this problem being solved with editing some config file(s) to reflect the change from IDE (PATA) to SATA eg changing hda to sda and so on. However, I can't find any reference to that now.

But, I did find this http://tinyurl.com/2g4hxkn in the forums - it may be of some help.

I must admit, when I did exactly this (swap from IDE to SATA) recently, I did what Stefano suggested:
1) Build another SME box running AFFA - use the new SATA disks if you want this to be your new production server.
2) wait for the AFFA to copy everything
3) Switch off the old SME
4) "rise" the AFFA box to SME server status (it is now a clone of your old system)

I wanted my "old" server to be the main server, so I rebuilt it with the new SATA disk, installed AFFA and ran it again, then did a "rise" to restore the old SME to full server status.

That's the "double live migration" Stefano mentioned.

In case that is unclear:
Two SME boxes - SMEserver and SME-AFFA
Run AFFA so SME-AFFA has a full backup of SMEserver
Switch off SMEserver.
"rise" SME-AFFA. It now acts as "SMEserver"
Rebuild the switched off SMEserver box with the new drives - call it SME-AFFA2 if you like.
Install AFFA and run it to make a copy of the new "SMEserver".
Switch off the new "SMEserver"
"rise" the "SME-AFFA2" box so it becomes "SMEserver"

A lot of this can be done in the background so actual down-time is minimal.
By the way, AFFA is an SME contrib found here http://wiki.contribs.org/Affa

Good luck - keep trying: it is not impossible.

Cheers
Ian
5
___________________
Sydney, NSW, Australia

Offline David Yip

  • *
  • 18
  • +0/-0
Re: upgrade PATA to SATA harddisk problem
« Reply #5 on: July 30, 2010, 05:08:55 PM »
Dear All:

I think I can use some "Double Live" or "Full restore after backup" to solve my problem.

But one important things is use PATA & SATA together in sme 7.5.1 server is not a good method.

I found some users will use 2 PATA & 4 SATA to build a raid 5 or 6.

May be need to remind all users not to do that because it will occur this kind of problem.
The software raid will be crash after all PATA(sometimes may be just 1 or 2) or in the other side all SATA down will make
the server can't boot. It cannot provide the redundancy for the server.

Thanks for all replies.
David Yip