Koozali.org: home of the SME Server

How do I mount my backup drive?

darkgumby

How do I mount my backup drive?
« on: March 23, 2004, 04:36:49 PM »
I have SME 6.0 running at a client site.
I use the 'dd' command to backup the full system drive to a removable drive nightly. The removable drives are swapped on a regular basis so there are historical backups.

This works very well for creating a bootable recovery disk in the event of a full system failure.
Yesterday I got a call with a request to restore a few files that a user accidently deleted from an ibay.
I figured no problem. I would ssh in, mount the backup drive, copy the files back to the production drive, and be done. I tested this restore method back when I first setup the server and it worked fine.
Now for some reason I cannot mount the backup drive.

Production drive is /dev/hda, backup is /dev/hdc

fstab -l /dev/hda/
   Device Boot    Start       End    Blocks   Id  System
/dev/hda1   *         1        13    104391   83  Linux
/dev/hda2            14        46    265072+  82  Linux swap
/dev/hda3            47     30515 244742242+  83  
Linux

fstab -l /dev/hdc/
   Device Boot    Start       End    Blocks   Id  System
/dev/hdc1   *         1        13    104391   83  Linux
/dev/hdc2            14        46    265072+  82  Linux swap
/dev/hdc3            47     30515 244742242+  83  Linux

I created /mnt/backup and added this to /etc/fstab.
/dev/hdc3  /mnt/backup  ext3  defaults

Whenever I attempt to 'mount /mnt/backup' I get this error message:
mount: wrong fs type, bad option, bad superblock on /dev/hdc3,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)

Any ideas on how I can mount the backup drive so I can recover some files?

Offline byte

  • *
  • 2,183
  • +2/-0
How do I mount my backup drive?
« Reply #1 on: March 23, 2004, 05:23:08 PM »
is your backup device EXT2 and not EXT3?
--[byte]--

Have you filled in a Bug Report over @ http://bugs.contribs.org ? Please don't wait to be told this way you help us to help you/others - Thanks!

Anonymous

How do I mount my backup drive?
« Reply #2 on: March 23, 2004, 08:36:27 PM »
It is an exact disk image of the production drive so it is ext3.

Michiel

Re: How do I mount my backup drive?
« Reply #3 on: March 24, 2004, 10:37:19 PM »
Quote from: "darkgumby"
mount: wrong fs type, bad option, bad superblock on /dev/hdc3,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)


First of all your entry in fstab should be: "/dev/hdc3 /mnt/backup ext3 defaults 1 2", but I would be surprised if that was causing your problem.

Unfortunately there are many other (often trivial) reasons which can cause this error message. For instance, you would get this message if the disk wasn't connected correctly to the ide interface (duh).

I would start with checking "sfdisk lg" to see if partition /dev/hdc3 exists.

If you don't see any reports for /dev/hdc3, check the BIOS and if needed the cables.

If you do see the partitions you would expect, type "df -TP /dev/hdc3"  to see if it is indeed a ext3 partition.

Let us know what results you get from the above tests.

Michiel

darkgumby

How do I mount my backup drive?
« Reply #4 on: March 25, 2004, 05:38:42 AM »
I'm pretty sure that the drive is connected properly. I have not yet been on site to check but the following shows that there is a /dev/hdc connected. The drive is in a removeable IDE cage but since it shows up it's obviously connected. The backup script runs fine.

I have fixed the fstab entry it now reads:
/dev/hdc3  /mnt/backup  ext3  defaults 1 2

sfdisk -lg returns:
/dev/hda: 30515 cylinders, 255 heads, 63 sectors/track

Disk /dev/hda: 30515 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls   #blocks   Id  System
/dev/hda1   *      0+     12      13-   104391   83  Linux
/dev/hda2         13      45      33    265072+  82  Linux swap
/dev/hda3         46   30514   30469  244742242+  83  Linux
/dev/hda4          0       -       0         0    0  Empty
/dev/hdc: 30515 cylinders, 255 heads, 63 sectors/track

Disk /dev/hdc: 30515 cylinders, 255 heads, 63 sectors/track
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls   #blocks   Id  System
/dev/hdc1   *      0+     12      13-   104391   83  Linux
/dev/hdc2         13      45      33    265072+  82  Linux swap
/dev/hdc3         46   30514   30469  244742242+  83  Linux
/dev/hdc4          0       -       0         0    0  Empty

df -TP /dev/hdc3 returns:
Filesystem    Type 1024-blocks      Used Available Capacity Mounted on
/dev/hdc3        -   240900672   6123412 222540148       3%

mount /mnt/backup still returns:
mount: wrong fs type, bad option, bad superblock on /dev/hdc3,
       or too many mounted file systems
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?

Anonymous

How do I mount my backup drive?
« Reply #5 on: March 25, 2004, 08:37:56 AM »
Quote from: "darkgumby"
df -TP /dev/hdc3 returns:
Filesystem    Type 1024-blocks      Used Available Capacity Mounted on
/dev/hdc3        -   240900672   6123412 222540148       3%


df -TP /dev/hdc3 should have returned:
Filesystem    Type 1024-blocks      Used Available Capacity Mounted on
/dev/hdc3      ext3  240900672   6123412 222540148       3%

In other words, it looks like your partition is not ext3. Try ext2 in your fstab to see if that fixes the problem.

Michiel

Anonymous

How do I mount my backup drive?
« Reply #6 on: March 25, 2004, 03:33:47 PM »
df -TP /dev/hda3 returns:
Filesystem    Type 1024-blocks      Used Available Capacity Mounted on
/dev/hda3     ext3   240900672   6123692 222539868       3% /

df -TP /dev/hdc3 returns:
Filesystem    Type 1024-blocks      Used Available Capacity Mounted on
/dev/hdc3        -   240900672   6123692 222539868       3%

/dev/hdc is supposed to be an image of /dev/hda. I use the following command to do a nightly image.:
dd if=/dev/hda of=/dev/hdc bs=1024

I have booted this image in the past and it worked fine. I also was able to mount the backup drive while the production drive was in place and copy files from it.

Any other ideas before I go on site and start ripping the hardware apart?

Michiel

How do I mount my backup drive?
« Reply #7 on: March 25, 2004, 04:51:44 PM »
Quote from: "Anonymous"
/dev/hdc3        -   240900672   6123692 222539868       3%


Clearly the filesystem is not ext3, so there is your problem. Could it be that last time you tested it, it was on a SME 5.5 machine? If I'm not mistaken, ext3 was introduced in 5.6 and I could imagine that dd doesn't know about ext3.

Did you try to mount it as ext2? If that doesn't work, I suggest you try to change the partition type to ext3.

Warning: Try this first on /dev/hdc1, since that should be a copy of /boot. If you screw it up, nothing of value is lost :-D

Run "tune2fs -j /dev/hdc1" to change the partition type to ext3 and see if that fiexes it.

If not, you could try:
"fdisk /dev/hdc" and change the partition type to 83 (select "t" "1" "83"). Reboot and run again tune2fs.

If it still doesn't work, someone smarter than I will have to jump in, or you'll have to drive to your customer's site. Make sure you take the latest Knopix CD with you.

Michiel

darkgumby

How do I mount my backup drive?
« Reply #8 on: March 25, 2004, 05:18:22 PM »
I tested it under 6.0 with this exact hardware.

I did try to mount it as ext2 and no luck.

What I am going to do first is setup a similar system at home and work with it to see if I can duplicate the problem and then find a solution. I don't want to experiment on the production machine any more than necessary.

Thanks for all of your suggestions Michiel. If anyone else has any insight into this issue it is much appreciated.

I will post the results of my testing and what I end up doing to get the restore procedure working again. Maybe what I learn can help others.