Koozali.org: home of the SME Server
Legacy Forums => General Discussion (Legacy) => Topic started by: bjoyce on August 20, 2005, 04:53:46 AM
-
Hi, I have reinstalled my SME 6.0.1-01 on an existing install. I had my /home/e-smith/files/users directory mounted on a second hard drive. When I installed I asked for more options and single drive install. When I edit /etc/fstab to add the 2nd drive again I get this error.
[root@abel root]# mount -a
mount: wrong fs type, bad option, bad superblock on /dev/hdb1,
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?)
Here is my /etc/fstab file
LABEL=/ / ext3 usrquota,grpquota 1 1
LABEL=/boot /boot ext3 defaults 1 2
none /dev/pts devpts gid=5,mode=620 0 0
/dev/cdrom /mnt/cdrom iso9660 noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
none /proc proc defaults 0 0
none /dev/shm tmpfs defaults 0 0
/dev/hda2 swap swap defaults 0 0
/dev/hdb1 /mnt/hdb ext3 usrquota,grpquota 1 2
Does this mean my users information is all gone?
Is there any way to recover this withour restoring from a backup?
HELP???
thanks
Brad
-
It has been pointed out many times that if you have multiple hard drives in your system and you load or reload a system, all drives are wiped. You need to make sure the additional drives are not cabled during the install. You should be able to search the forums for more detail, I didn't do that.
JB
-
Its OK, I recovered the data using Stellar Phoenix Linux.
It seems the install only does a boot partition write and the recovery tool got all my data back (33GBytes worth) phew. I'm a happy chappy again.
Brad
-
Its OK, I recovered the data using Stellar Phoenix Linux.
It seems the install only does a boot partition write and the recovery tool got all my data back (33GBytes worth) phew. I'm a happy chappy again.
Brad
I hadn't heard of that linux distro. It might be worth while to write up a howto of what you did to get your data back. Every once in a while someone asks the same thing you did. Yours is the first that I have seen that was able to get the data back without have to restore.
JB
-
OK, for what its worth this is the proceedure I used to recover the info on my user data hard disk. I must say that my scripting is not that of an expert but it worked.
Stellar Phoenix Linux is a windows app that reads and recovers ext3 drives.
http://www.stellarinfo.com/linux-data-recovery.htm
I removed the ide drive from the sme box and fitted it to a USB external drive housing.
Stellar Phoenix Linux costs US$79, with this software I recovered the data.
It took several hours to scan the hard drive (40GB) and several hours to transfer the recoverd data to a spare hard drive (using a 2nd USB external drive housing.
I then fitted the hard drive back in SME and did the following steps (taken from 'How to add an extra hard disk to SME server)with some of my own mods.
fdisk /dev/hdb (slave ide on first ide bus)
n (to add partition)
p (to make a primary partition)
1 (1st partition)
w (to write partition info to disk)
mkfs -t ext2 /dev/hdb1 (format the hard disk partition)
tune2fs -j /dev/hdb1 (change to ext3)
Make a mount point for HDD
mkdir /mnt/hdb
pico /etc/fstab
(add the following line)
/dev/hdb1 /mnt/hdb ext3 usrquota,grpquota 1 2
mount the drive
mount -a
df -T
create subdirectory for users
mkdir /mnt/hdb/users
copy existing users to new hard drive
cp -rip /home/e-smith/files/users/* /mnt/hdb/users
check for differences
diff -r /home/e-smith/files/users /mnt/hdb/users
Rename users
mv /home/e-smith/files/users /home/e-smith/files/users1
create symbolic link to new drive
ln -s /mnt/hdb/users /home/e-smith/files/users
In the windows workstation that was used to recover the data. Share the directory where the infomation was saved making note of the username, password, windows computer name and share name.
make a mount point for the windows share
mkdir /mnt/windows
mount the windows share
mount -t smbfs -o username=(username of windows share),password=(password of windows share) //windowscomputer/sharename /mnt/windows
Check to see if it is mounted
df
Use this script to copy the user data from the recoverd data in the windows share. Make sure the of the path in the mounted windows share matches the one in this script.
#!/bin/sh
# Script to copy users directories from the backup to the user home
# directory
cd /home/e-smith/files/users
for i in *; do
echo $i
cp -R /mnt/windows/users/$i/home/* /home/e-smith/files/users/$i/home
done
Use the following script to modify permissions
#!/bin/sh
# Script to change ownership of users directories to the user
cd /home/e-smith/files/users
for i in *; do
echo $i
chown -R $i:$i $i
done
Use the following script to change user permissions
#!/bin/sh
# Script to copy users directories from the backup to the user home
# directory
cd /home/e-smith/files/users
for i in *; do
echo $i
chmod -R 700 $i
chmod -R 755 $i/home
chmod -R 755 $i/Maildir
chmod 644 $i/.procmailrc
chmod 644 $i/.qmail
done
-
I just inadvertedly did the same stunt, I usually ALLWAYS remove my data-hd
But I was so lucky that my data-hd only had one partition, taking up all space.
So I could simply go into fdisk and make a new partition, just taking the default values, (as the data-hd originally was partitioned using the default values) and then I could mount it at see all the data.
What a scare!