Koozali.org: home of the SME Server

mount parameters for old server-disk

Offline utti

  • 9
  • +0/-0
    • http://www.mankkaaya.fi
mount parameters for old server-disk
« on: July 06, 2007, 10:45:02 AM »
Hi everybody.

My problem is mount parameters. I've upgrading my server .. more memory and bigger harddisk. I've installed server to the bigger disk and tought that mounting old one and copy web/user files there is no problem ... but...

When I look with fdisk I see hda1, hda2 and hdb1,hdb2. Two disk with two partitions. Ok.
Now I can mount hdb1 and see that it is old servers boot partition. But mounting to hdb2 makes errors: wrong mounting prameters, etc ..
I've tried all possible parameters but none works.

I think that problem is software-raid system that is ON. ( md partitions )

Can somebody tell what's wrong or what parameters I need to mount hdb2 partition.

...Lasse...
...

Offline Stefano

  • *
  • 10,836
  • +2/-0
Re: mount parameters for old server-disk
« Reply #1 on: July 06, 2007, 11:30:25 AM »
Quote from: "utti"
Hi everybody.

My problem is mount parameters. I've upgrading my server .. more memory and bigger harddisk. I've installed server to the bigger disk and tought that mounting old one and copy web/user files there is no problem ... but...

When I look with fdisk I see hda1, hda2 and hdb1,hdb2. Two disk with two partitions. Ok.
Now I can mount hdb1 and see that it is old servers boot partition. But mounting to hdb2 makes errors: wrong mounting prameters, etc ..
I've tried all possible parameters but none works.

I think that problem is software-raid system that is ON. ( md partitions )

Can somebody tell what's wrong or what parameters I need to mount hdb2 partition.

...Lasse...


Hi

was the old server a 6.xor a 7.x?

in the first case you should not have problems.. in the second one, I've noticed there are problems with lvm.

Ciao

Stefano

tarball

mount parameters for old server-disk
« Reply #2 on: July 07, 2007, 02:37:39 AM »
Have you tried mounting it as a USB disk?

mount -t ext3 /dev/sda1 /directory

works for me, or see http://mirror.contribs.org/smeserver/contribs/dmay/smeserver/7.x/smeserver-usb-disk-howto.htm

Power up/connect  the disk AFTER the server has booted to be sure it isn't trying to add it to the RAID.

HTH,

tarball

Offline ldkeen

  • *
  • 401
  • +0/-0
Re: mount parameters for old server-disk
« Reply #3 on: July 07, 2007, 12:44:44 PM »
Quote from: "utti"

I think that problem is software-raid system that is ON. ( md partitions )

Can somebody tell what's wrong or what parameters I need to mount hdb2 partition.

...Lasse...

Yep,
Assuming that the old disk was a smeserver Ver 7.0 or later
That's your problem, basically you have to rename the volume group on the old drive (so that when you mount it it doesn't conflict with your existing volume group) and then mount it. Here's the procedure:
Boot from SME Server 7.1 install CD
press F5
type "sme rescue" at the command prompt and hit enter
Note: don't start the network and skip mounting the filesystem.
Code: [Select]
#mdadm -AR /dev/md5 /dev/hdx2
#lvm vgscan
#lvm vgs -v
#lvm vgchange -a n
#lvm vgrename orig_vg_name new_vg_name
#exit

Now remove the CD and reboot
Code: [Select]
#mdadm -AR /dev/md5 /dev/hdx2
#vgscan
#vgchange -a y new_vg_name
#mkdir /mnt/tmp
#mount /dev/new_vg_name/root /mnt/tmp

You should now be able to view all your old data under /mnt/tmp and if required you can use CopyFromDisk to restore the data as follows:
Code: [Select]
1. perform signal-event pre-backup on the old disk (probably too late now :-)
2. /sbin/e-smith/db configuration setprop backup Program CopyFromDisk status enabled
3. /sbin/e-smith/signal-event pre-restore
4. /sbin/e-smith/signal-event restore-tape /mnt/tmp
5. /sbin/e-smith/signal-event post-upgrade
6. /sbin/e-smith/signal-event reboot.

When finished simply reboot and you system will be back to normal.
Regards, Lloyd

Offline utti

  • 9
  • +0/-0
    • http://www.mankkaaya.fi
mount parameters for old server-disk
« Reply #4 on: July 09, 2007, 09:00:20 AM »
Thanks Idkeen !!!!

It worked like a charm .... restore sql-tables, copy files etc... 5 minutes and I was ready :-)

Thank You again.

..lasse..
...