Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: cactus on December 04, 2006, 08:09:48 PM
-
I have an old disk with a installation of SME Server 7 on it. I had some issues with this installation so I removed the disk and reinstalled on another disk, after that I restored my backup.
However I am missing some data, which I forgot to include in my backup. Is it possible to mount this HD, for instance as an USB drive or as a slave so I can copy the data from my old disk to my new installation?
I already put the disk in an external case an connected to the USB port of my server. When I plug it into my server the /var/log/message file reads like this:Dec 4 19:41:52 homer kernel: usb 1-2: new full speed USB device using address 2
Dec 4 19:41:55 homer kernel: SCSI subsystem initialized
Dec 4 19:41:55 homer kernel: Initializing USB Mass Storage driver...
Dec 4 19:41:55 homer kernel: scsi0 : SCSI emulation for USB Mass Storage devices
Dec 4 19:41:56 homer kernel: Vendor: WDC WD32 Model: 00JB-00KFA0 Rev: 08.0
Dec 4 19:41:56 homer kernel: Type: Direct-Access ANSI SCSI revision: 02
Dec 4 19:41:56 homer scsi.agent[5547]: disk at /devices/pci0000:00/0000:00:04.2/usb1/1-2/1-2:1.0/host0/target0:0:0/0:0:0:0
Dec 4 19:41:56 homer kernel: USB Mass Storage device found at 2
Dec 4 19:41:56 homer kernel: usbcore: registered new driver usb-storage
Dec 4 19:41:56 homer kernel: USB Mass Storage support registered.
Dec 4 19:41:56 homer kernel: SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
Dec 4 19:41:56 homer kernel: sda: assuming drive cache: write through
Dec 4 19:41:56 homer kernel: sda: sda1 sda2
Dec 4 19:41:56 homer kernel: Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
Dec 4 19:45:01 homer su(pam_unix)[5731]: session opened for user qmailr by (uid=0)
Dec 4 19:45:13 homer su(pam_unix)[5731]: session closed for user qmailr
Dec 4 19:45:43 homer kernel: FAT: invalid media value (0x00)
Dec 4 19:45:43 homer kernel: VFS: Can't find a valid FAT filesystem on dev sda.
Dec 4 19:46:20 homer kernel: VFS: Can't find ext3 filesystem on dev sda.
The partition table looks like this:
Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 13 104391 fd Linux raid autodetect
/dev/sda2 14 38913 312464250 fd Linux raid autodetect
The disk is somehow not automatically mounted as there is no entry in the /mnt or /media directory:
[root@homer media]# ls /mnt /media
/media:
cdrecorder floppy
/mnt:
floppy
and also mount does not show it:
[root@homer media]# mount
/dev/mapper/vg_primary-lv_root on / type ext3 (rw,usrquota,grpquota)
none on /proc type proc (rw)
none on /sys type sysfs (rw)
none on /dev/pts type devpts (rw,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw)
/dev/md1 on /boot type ext3 (rw)
none on /dev/shm type tmpfs (rw)
none on /proc/sys/fs/binfmt_misc type binfmt_misc (rw)
-
Try this:
mount -t ext3 /dev/sda2 /media/usbdisk
Per
-
Try this:
mount -t ext3 /dev/sda2 /media/usbdisk
Per
Thanks for your suggestion, but this unfortunateley gives the following output:[root@homer mnt]# rm -rf /media/usbdisk
[root@homer mnt]# mount -t ext3 /dev/sda2 /media/usbdisk
mount: mount point /media/usbdisk does not exist
When I creat the /media/usbdisk using mkdir and again trying to mount I get the following error:
[root@homer mnt]# mkdir /media/usbdisk
[root@homer mnt]# mount -t ext3 /dev/sda2 /media/usbdisk
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
or too many mounted file systems
Any suggestions? I really would like to recover this data.
-
I have before used Norton Ghost to make an image of a disk and then extract from the image with the Ghost software, but you will need the whole Ghost package installed on a windows to do that.
There are ways of fixing the file system, but i am no good to that, but can it mount sda1? That can give you a hint if you have a file system problem on sda2.
Per
-
how about trying...
fsck.ext3 /dev/sda2
or maybe just fsck /dev/sda2
-
I have before used Norton Ghost to make an image of a disk and then extract from the image with the Ghost software, but you will need the whole Ghost package installed on a windows to do that.
There are ways of fixing the file system, but i am no good to that, but can it mount sda1? That can give you a hint if you have a file system problem on sda2.
Per
If I mount sda1 using mount /dev/sda1 /mnt/USBtemp/
everything seems to be OK and the filelist looks like this:
total 19303
-rw-r--r-- 1 root root 48513 Oct 27 2005 config-2.6.9-22.0.1.EL
-rw-r--r-- 1 root root 48021 Oct 27 2005 config-2.6.9-22.0.1.ELsmp
-rw-r--r-- 1 root root 49517 Jul 8 02:43 config-2.6.9-34.0.2.EL
-rw-r--r-- 1 root root 49268 Jul 8 03:10 config-2.6.9-34.0.2.ELsmp
-rw-r--r-- 1 root root 50337 Aug 23 07:11 config-2.6.9-42.0.2.EL
-rw-r--r-- 1 root root 49930 Aug 23 07:32 config-2.6.9-42.0.2.ELsmp
drwxr-xr-x 2 root root 1024 Nov 18 23:49 grub
-rw-r--r-- 1 root root 1003969 Aug 18 17:32 initrd-2.6.9-22.0.1.EL.img
-rw-r--r-- 1 root root 994761 Aug 18 17:33 initrd-2.6.9-22.0.1.ELsmp.img
-rw-r--r-- 1 root root 1016151 Aug 18 19:20 initrd-2.6.9-34.0.2.EL.img
-rw-r--r-- 1 root root 1007396 Aug 18 19:20 initrd-2.6.9-34.0.2.ELsmp.img
-rw-r--r-- 1 root admin 1037624 Nov 8 21:47 initrd-2.6.9-42.0.2.EL.img
-rw-r--r-- 1 root admin 1028430 Nov 8 21:48 initrd-2.6.9-42.0.2.ELsmp.img
drwx------ 2 root root 12288 Aug 18 17:21 lost+found
-rw-r--r-- 1 root root 731197 Oct 27 2005 System.map-2.6.9-22.0.1.EL
-rw-r--r-- 1 root root 758541 Oct 27 2005 System.map-2.6.9-22.0.1.ELsmp
-rw-r--r-- 1 root root 733742 Jul 8 02:43 System.map-2.6.9-34.0.2.EL
-rw-r--r-- 1 root root 761137 Jul 8 03:10 System.map-2.6.9-34.0.2.ELsmp
-rw-r--r-- 1 root root 749489 Aug 23 07:11 System.map-2.6.9-42.0.2.EL
-rw-r--r-- 1 root root 766287 Aug 23 07:32 System.map-2.6.9-42.0.2.ELsmp
-rw-r--r-- 1 root root 1465200 Oct 27 2005 vmlinuz-2.6.9-22.0.1.EL
-rw-r--r-- 1 root root 1426548 Oct 27 2005 vmlinuz-2.6.9-22.0.1.ELsmp
-rw-r--r-- 1 root root 1473712 Jul 8 02:43 vmlinuz-2.6.9-34.0.2.EL
-rw-r--r-- 1 root root 1436516 Jul 8 03:10 vmlinuz-2.6.9-34.0.2.ELsmp
-rw-r--r-- 1 root root 1504411 Aug 23 07:11 vmlinuz-2.6.9-42.0.2.EL
-rw-r--r-- 1 root root 1444563 Aug 23 07:32 vmlinuz-2.6.9-42.0.2.ELsmp
This seems to me to be the boot images...
When I try the following commands:
how about trying...
fsck.ext3 /dev/sda2
or maybe just fsck /dev/sda2
I get the following result:[root@homer Panel]# fsck /dev/sda2
fsck 1.35 (28-Feb-2004)
e2fsck 1.35 (28-Feb-2004)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda2
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
[root@homer Panel]# e2fsck -b 8193 /dev/sda2
e2fsck 1.35 (28-Feb-2004)
e2fsck: Bad magic number in super-block while trying to open /dev/sda2
The superblock could not be read or does not describe a correct ext2
filesystem. If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
Not much luck there :-(
I will try this trick to see if that will work:I have before used Norton Ghost to make an image of a disk and then extract from the image with the Ghost software, but you will need the whole Ghost package installed on a windows to do that.
-
cactus
> I have an old disk with a installation of SME Server 7 on it.
> I had some issues with this installation
You don't say how bad those issues are. Does that disk run the installed sme OK ? Can you insert the disk into a spare box, configure that old copy of sme to be a server only on your network with a suitable local IP, and them use scp to copy files from the old server to the current server ?
on old server
cd /requiredpath
scp filename newserverIP:/path/filename
-
You don't say how bad those issues are. Does that disk run the installed sme OK ? Can you insert the disk into a spare box, configure that old copy of sme to be a server only on your network with a suitable local IP, and them use scp to copy files from the old server to the current server ?
I did not find a solution to mount the partitions using linux or something else, however as I had no spare box, but had a spare disk and an USB bracket I tried to boot up on my old hard disk. This went relatively fine. I was able to make a dar backup of the required data and restored that on my Windows machine. Thanks for all the tips... restored the last bit of my data now.
-
The current SME installation sets itself up on /dev/mapper/main-root - so to mount an installation you need to mount that device - not the standard hda sda etc.
I think from memory I mounted one on a knoppix type thingo - so I`m not sure how it would work given that SME already mounts /dev/mapper/main-root for it`s own filesystem.
-
#CHANGE ALL PARTITIONS TYPE TO LINUX
-boot from KNOPPIX
-open terminal
-su
-fdisk /dev/hda (where a is the hd of the old drive)
-t <to change type>
-L <to see hex codes for different FS types>
-83 (i think this is linux, but check in the list to be certain)
-w
-q
-exit
-exit
-reboot
#COPY HD INFO FROM OLD HD (ON HDA) TO NEW SYSTEM
-cd /
-mkdir /mnt/tmp
-mount /dev/hda2 /mnt/tmp
-
#CHANGE ALL PARTITIONS TYPE TO LINUX
-boot from KNOPPIX
-open terminal
-su
-fdisk /dev/hda (where a is the hd of the old drive)
-t <to change type>
-L <to see hex codes for different FS types>
-83 (i think this is linux, but check in the list to be certain)
-w
-q
-exit
-exit
-reboot
#COPY HD INFO FROM OLD HD (ON HDA) TO NEW SYSTEM
-cd /
-mkdir /mnt/tmp
-mount /dev/hda2 /mnt/tmp
You are right about 83 being the linux partition type, but are you sure this will work? I did this using booting into my new smeserver installation on another disk, with the old disk mounted in a USB bracket using single boot option for smeserver. However I was unable to mount the drive afterwards, might be because the drive was in a USB bracket although this seems unlikely to me.
-
#CHANGE ALL PARTITIONS TYPE TO LINUX
-boot from KNOPPIX
-open terminal
-su
-fdisk /dev/hda (where a is the hd of the old drive)
-t <to change type>
-L <to see hex codes for different FS types>
-83 (i think this is linux, but check in the list to be certain)
-w
-q
-exit
-exit
-reboot
#COPY HD INFO FROM OLD HD (ON HDA) TO NEW SYSTEM
-cd /
-mkdir /mnt/tmp
-mount /dev/hda2 /mnt/tmp
You are right about 83 being the linux partition type, but are you sure this will work? I did this using booting into my new smeserver installation on another disk, with the old disk mounted in a USB bracket using single boot option for smeserver. However I was unable to mount the drive afterwards, might be because the drive was in a USB bracket although this seems unlikely to me.
Was also discussed here...
http://forums.contribs.org/index.php?topic=33553.msg148172#msg148172
-
Was also discussed here...
http://forums.contribs.org/index.php?topic=33553.msg148172#msg148172
Thanks! :D