PDA

View Full Version : Copying Files from a Hard Drive in OpenSuSe to another



Mr. Orange
28-09-2009, 08:11 PM
Hey, I recently took out my 300Gb SATAII HDD from my HP Media Vault, and I need alot of the files on there, Windows 7 Won't let me access it without formatting, so I've plugged it onto Linux, and need to mount it somewhere..

I opened up the Partitioner and apparently it's mounted at /dev/sda, but /dev/sda doesnt exist
:(

Helior
28-09-2009, 08:30 PM
You tried the mount command? :O

$ mount /dev/sda /mnt/HPMV

if that doesn't work take a look in the fstab config file

$ grep /dev/sda /etc/fstab

see what that says.

Mr. Orange
28-09-2009, 08:36 PM
okay created the directory /mnt/HPMV using Nautilus then tried


mount /dev/sda /mnt/HPMV

then i get


mount: unknown filesystem type 'linux_raid_member'


then


grep /dev/sda /etc/fstab


doesn't say anything

Helior
28-09-2009, 08:39 PM
Hmmm, I'm very good at scripting, but not at things like mounting drives I'm afraid.

What's in your fstab file?

$cat /etc/fstab

Mr. Orange
28-09-2009, 08:45 PM
linux-h8v8:~ # cat /etc/fstab
/dev/disk/by-id/scsi-SATA_WDC_WD2500AAKS-_WD-WCAT15180651-part1 swap
swap defaults 0 0
/dev/disk/by-id/scsi-SATA_WDC_WD2500AAKS-_WD-WCAT15180651-part2 /
ext3 acl,user_xattr 1 1
proc /proc proc defaults 0 0
sysfs /sys sysfs noauto 0 0
debugfs /sys/kernel/debug debugfs noauto 0 0
usbfs /proc/bus/usb usbfs noauto 0 0
devpts /dev/pts devpts mode=0620,gid=5 0 0

sorry i had to type it all out..

Helior
28-09-2009, 08:47 PM
doesn't seem to see your drive at all :o

jonbanjo
28-09-2009, 08:49 PM
Can you put the disk back in the HP Media Vault to retrieve the files?

Mr. Orange
28-09-2009, 08:51 PM
probably because it has an unknown filesystem..? i guess i'll be plugging back into mediavault and hoping it works..

Mr. Orange
28-09-2009, 09:12 PM
ok, it doesnt... not really one of my good days today..
i put it back in. and the i turn it on, the LAN Light comes on... and i cant turn the mediavault off.. because the Ok Light isn't coming on.. the HDD access light comes on and it accesses the HDD.. briefly.. but thats it :(

Is there anyway in recovering those files?

jonbanjo
28-09-2009, 09:29 PM
doesn't seem to see your drive at all :o

fstab is only going to display mount points that have been set. It's not going to tell you if a disk is present. One method you could us (as root) is this:



worthy:/home/jon # parted -l
Model: ATA Maxtor 6L200M0 (scsi)
Disk /dev/sda: 204GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 4294MB 4294MB primary linux-swap , , , , , , , , , type=82, ,
2 4294MB 38.7GB 34.4GB primary ext3 boot, , , , , , , , , type=83, ,
3 38.7GB 204GB 165GB primary ext3 , , , , , , , , , type=83, ,


Model: ATA SAMSUNG HD161HJ (scsi)
Disk /dev/sdb: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 32.3kB 4302MB 4302MB primary linux-swap , , , , , , , , , type=82, ,
2 4302MB 160GB 156GB primary ext3 boot, , , , , , , , , type=83, ,


Model: Generic USB SD Reader (scsi)
Disk /dev/sdc: 513MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 119kB 512MB 512MB primary fat16 , , , , , , , , , type=06, ,

jonbanjo
28-09-2009, 09:30 PM
Is there anyway in recovering those files?

I wouldn't write the idea off yet but I don't know how to do it.

jonbanjo
28-09-2009, 09:33 PM
Oh, and one other comment re fstab. Entries for hard disks added by OpenSuse will be given as device-by-id. eg my entry for what is /dev/sdb2 reads like this in fstab.

/dev/disk/by-id/ata-SAMSUNG_HD161HJ_S0V3J9APB08386-part2 / ext3 acl,user_xattr 1 1

Mr. Orange
28-09-2009, 09:44 PM
well i know it's being recognised as /dev/sda from looking at the partition tables..
i just need linux to support the file system im mounting as, or is there a way to change the Filesystem without removing data?

mrgoose
24-10-2009, 05:54 PM
I usually put a bare drive in a USB Case - or use a USB to SATA/IDE cable. Then, when you connect via USB, HAL will recognise the volume automagically, generate a mountpoint in /meda/ something-or-other and you are in business!

If that fails then try this:-

First up, open a terminal any type:-

ls /dev/sd*

Usually dev/sda is partitioned into /dev/sda1 and /dev/sda5 (and possibly others) and is your main boot drive. I would expect the second drive to be /dev/sdb1 or something similar. Then assuming it is /dev/sdb1 the type the following in a terminal:-

sudo mkdir /mnt/disk
sudo mount /dev/sdb1 /mnt/disk
sudo chmod 777 /mnt/disk

Then use your normal file manager (Nautilus, Konqueror or whatever) to navigate your way to /mnt/disk and you should find your files there.

HTH. G.

Mr. Orange
24-10-2009, 06:47 PM
aye, but the drive isn't bare..., i just need to find a way to get the data from the disk

mrgoose
24-10-2009, 06:55 PM
Well, why don't you "bare" it and shove it in a USB case - if you'll pardon the expression. :)

Seriously, it's only a matter of undoing a few screws and two plug-in connectors. Once you have the bare drive in a USB case and know that your hardware can actually communicate with it, then you are more than half way there. Surely?

Seems to me that you are fighting a losing battle doing it any other way - or am I missing the bleedin' obvious here.

Best wishes, G.

Mr. Orange
24-10-2009, 06:55 PM
ahh sorry mr. goose... looks like i'll have to do it by usb anyway...
http://k0lee.com/hpmediavault/diskformat/index.html

Mr. Orange
24-10-2009, 06:56 PM
Well, why don't you "bare" it and shove it in a USB case - if you'll pardon the expression. :)

Seriously, it's only a matter of undoing a few screws and two plug-in connectors. Once you have the bare drive in a USB case and know that your hardware can actually communicate with it, then you are more than half way there. Surely?

Seems to me that you are fighting a losing battle doing it any other way - or am I missing the bleedin' obvious here.

Best wishes, G.

ohhh i thought you meant a empty hdd, not just a hdd on its own...

Mr. Orange
24-10-2009, 07:07 PM
i guess i can grab one of these
http://www.novatech.co.uk/novatech/prods/Components/HardDrives-External/HardDriveEnclosures/Novatech/NOV-HDDOCK.html and will work with Linux?

mrgoose
24-10-2009, 07:08 PM
Yup it seems I have missed the bleedin' obvious. It's a raid array, right? Which means that even if you do dismantle and connect via USB then it will almost certainly not be in a recognised format.

How are you actually connecting it to your PC?

FWIW, I've been browsing through the manual, which is generally about as much use as a chocolate fireguard:-
http://h10032.www1.hp.com/ctg/Manual/c00763627.pdf

However, it seems you can actually telnet and ssh the device, aparently:-
http://www.k0lee.com/hpmediavault/#telnet

Best wishes, G.

mrgoose
24-10-2009, 07:11 PM
@mclarenvj (http://forum.novatech.co.uk/member.php?u=8027)

I've not tried the Novatech one. But I bought a load of similar devices when I was in Hong Kong recently and they work fine. Absolute life-savers in fact! :thumbs: No home should be without one IMHO!

Best wishes, G.

Mr. Orange
24-10-2009, 07:13 PM
Yup it seems I have missed the bleedin' obvious. It's a raid array, right? Which means that even if you do dismantle and connect via USB then it will almost certainly not be in a recognised format.

Yup, when i connected the file system was "linux-raid-member"
as shown in my above post

mount: unknown filesystem type 'linux_raid_member'


How are you actually connecting it to your PC?

Well, i took it out of the HP Media Vault, and plugged it into one of my motherboard SATA connectors...



However, it seems you can actually telnet and ssh the device, aparently:-
http://www.k0lee.com/hpmediavault/#telnet

aye, but when i put the drive back into my HP Media Vault, the HP Media Vault 'OK' Light never comes on... so it's dead...

mrgoose
24-10-2009, 07:22 PM
Hmm, so what you are really trying to do is recover a broken RAID?

BW. G.

Mr. Orange
24-10-2009, 07:26 PM
Hmm, so what you are really trying to do is recover a broken RAID?

BW. G.

I guess so...
I think it broke when i decided to boot up windows 7 and try to access it.. :(
But now, atm, i'm downloading a live CD of OpenSuSe 11.2-RC1 and going to shutdown windows 7, and plug in the HDD, and boot up again

mrgoose
24-10-2009, 07:32 PM
How many disks in the HP device?

Have you checked the device's power supply and for any on-board fusible devices, low value resistors gone O/C etc?

Do you have access to a similar device?

Thing is, I doubt that any OS will read the disk directly if is part of a RAID. And 'doze is less likely to read it than 'nix.

You ether need to get the HP device powered up again, or you need to emulate its function some other way.

BW G.

Mr. Orange
24-10-2009, 07:34 PM
How many disks in the HP device?

Have you checked the device's power supply and for any on-board fusible devices, low value resistors gone O/C etc?

Do you have access to a similar device?

Thing is, I doubt that any OS will read the disk directly if is part of a RAID. And 'doze is less likely to read it than 'nix.

You ether need to get the HP device powered up again, or you need to emulate its function some other way.

BW G.

nope, can't see anything that isn't as it should be, that link i posted above to the K0lee website, that's saying a way to do it? or not ? :S

mrgoose
24-10-2009, 08:06 PM
Hmm I'm a bit out of my depth here because I have no experience of the HP box.

However it seems it uses a basic Linux RAID. Therefore it might be possible to put the disks (you didn't say how many BTW) in another similar working box and read the raid that way.

You might also find the following interesting (and I use the word loosely) reading. Seems the guy did actually get his data back in the end though.

http://www.intelligentedu.com/how_to_recover_from_a_broken_raid5.html

Finally, my mind keeps wandering back to the HP device itself. My albeit limited experience of similar devices is that problems in the power supply chain can cause the device to appear dead.

I would strongly urge you to check this with a meter and make sure that the power supply is working and that a voltage is actually supplied to the various voltage rails.

Best wishes, G.

Mr. Orange
24-10-2009, 08:15 PM
thanks mrgoose, i only have 1 HDD in my HP Media Vault(the original 300Gb)...
i've googled "linux_raid_member" and found this
http://ubuntu-utah.ubuntuforums.org/showpost.php?p=4503366&postcount=4
I'm about to try with the OpenSuse Live CD.. :D, it should hopefully work :)

Mr. Orange
24-10-2009, 08:20 PM
ok i've ran into a small problem... the disk is automatically being put into a RAID thingy... and i need to mount it, but i can't...
Is it safe for me to delete the RAID? or to mount the RAID?
sorry that it's confusing :S, i'll get some screenshots

EDIT: I'll be back after i eat dinner..

Mr. Orange
24-10-2009, 08:51 PM
http://img21.imageshack.us/img21/7579/devsda.png
ok, the HP MediaVault Drive is /dev/sda
Did Windows 7 Break it, because the Disk Label is 'MSDOS'?

mrgoose
24-10-2009, 08:53 PM
Hope you enjoyed your dinner. Just had mine too! Washed down with a bottle of McKewans Champion. Luvly!Jubly!:drink:

Back to the plot. Deleting the raid will almost certainly delete your data as well!

The golden rule with any data recovery is:-
DO NOT USE ANY SOFTWARE THAT WRITES BACK TO THE AFFECTED DISK!

Sorry to shout mate but I cannot emphasise that point strongly enough.

Ok it seems you cannot mount the drive because it is not a normal recognisable file system. Fortunately, your RAID is all on one disk and IMHO there is still a very reasonable chance you can, in fact, recover your the bulk of your data - if you are careful.

I think you might be able to try a couple of other techniques. Both of these are non-invasive and they both write extracted data to a separate volume. And they both work really well on Linux. And they are both free!

Firstly, it might be worth giving Christophe Greniers'Testdisk a whirl. That is pretty good at recovering damaged partitions etc, including Linux RAIDs - though I never used it for RAIDS myself...
http://www.cgsecurity.org/wiki/TestDisk

What sort of data is it? If they are standard files (docs, jpegs, mp3's etc) then you might be able to use data-carving technology such as Photorec - also written by Christophe Grenier. This ignores file-systems (pretty much) and instead looks for file "signatures" amidst all the jumble of data on a disk. I used this quite a bit for recovering data from disks with knackered partitions and I am astonished at what it can recover...
http://www.cgsecurity.org/wiki/PhotoRec

Best wishes, Garf.

Mr. Orange
24-10-2009, 09:10 PM
ok, whats the command to execute something in linux??? :S


then execute it with the device location of the MV1 drive.

Mr. Orange
24-10-2009, 09:18 PM
Hope you enjoyed your dinner. Just had mine too! Washed down with a bottle of McKewans Champion. Luvly!Jubly!:drink:

Back to the plot. Deleting the raid will almost certainly delete your data as well!

The golden rule with any data recovery is:-
DO NOT USE ANY SOFTWARE THAT WRITES BACK TO THE AFFECTED DISK!

Sorry to shout mate but I cannot emphasise that point strongly enough.

Ok it seems you cannot mount the drive because it is not a normal recognisable file system. Fortunately, your RAID is all on one disk and IMHO there is still a very reasonable chance you can, in fact, recover your the bulk of your data - if you are careful.

I think you might be able to try a couple of other techniques. Both of these are non-invasive and they both write extracted data to a separate volume. And they both work really well on Linux. And they are both free!

Firstly, it might be worth giving Christophe Greniers'Testdisk a whirl. That is pretty good at recovering damaged partitions etc, including Linux RAIDs - though I never used it for RAIDS myself...
http://www.cgsecurity.org/wiki/TestDisk

What sort of data is it? If they are standard files (docs, jpegs, mp3's etc) then you might be able to use data-carving technology such as Photorec - also written by Christophe Grenier. This ignores file-systems (pretty much) and instead looks for file "signatures" amidst all the jumble of data on a disk. I used this quite a bit for recovering data from disks with knackered partitions and I am astonished at what it can recover...
http://www.cgsecurity.org/wiki/PhotoRec

Best wishes, Garf.

agh, looks like i have to install opensuse then, i'll keep you updated, installation should only take about 20mins

mrgoose
24-10-2009, 09:27 PM
Take your time. Definitely RTFM before you dig in. Data recovery is a tricky old business but like I said, the data is there, it is just a matter of finding a way to extract it safely. In these situations I always keep a text file open on my desktop to make notes too, because I have become rather forgetful in my old age!

I'm very interested to learn how you get on.

Best wishes & good luck. G.

Mr. Orange
24-10-2009, 09:36 PM
RTFM = Read The ***** Manual?
well OpenSuse 11.1 took about 10mins to get up and running, just about to use the .rpm, to install TestDisk

Mr. Orange
24-10-2009, 10:08 PM
erm... what should i do now???
it's just finish the 'Quick Search' in this http://www.cgsecurity.org/wiki/TestDisk_Step_By_Step
http://img34.imageshack.us/img34/6059/testdisk.png

Mr. Orange
24-10-2009, 11:14 PM
ok, i pressed Enter and Wrote the Partition Table Structure... Rebooted... opened up Nautilus
and when i click on the '50.0GB Media' i get a error box saying
Cannot mount volume.
Unable to mount the volume.
Details:
mount: /dev/sda8: can't read superblock

I'm guessing it's kinda screwed...

mrgoose
25-10-2009, 12:22 AM
Sorry for not responding sooner, I had visitors.

WRT being screwed:- you are more screwed now than you were before you rewrote the partition table...

Like I said, the important thing in this instance is NOT to write anything to the disk.

However if all you done is write the partition table then your data is actually still there - probably. You just made it harder to get at - and more messy to sort out when you do get at it.

OK, try PhotoRec. It will try to carve out whatever is left and copy it to another volume. Please, please make sure PhotoRec is actually writing the recovered data to another volume. That is really, really important.

Also, since PhotoRec runs as root, it dumps the recovered data in a directory that can only be read by root. so you'll need to change its permissions in order to see what you have carved out. The file names will be different and the directory structure will be buggered, but its better than now't.

Best wishes, G.

Mr. Orange
25-10-2009, 09:11 AM
good morning :)
photorec is working...
1 main question, can it recover video files?
because it's finding pictures from my Ski Trip right now :D
and it's found a swf..
ooo its found an avi :D
shame it's going to take 6 hours to recover

Mechanics Fan
25-10-2009, 09:28 AM
shame it's going to take 6 hours to recover

Hopefully it will be 6 hours well spent if you recover your data. Good luck

mrgoose
25-10-2009, 10:39 AM
It might actually take rather longer than 6 hours I'm afraid. And it might also yield quite a few false positives. So patience is required and you will have quite a bit of sorting out to do once it is all done.

WRT video files. Yes it can. However, the larger the file, the more likely it is to be broken or corrupted. I find it is best at recovering jpegs, MP3's & "office" type docs in the range of 1 to 4 MiB

Have you looked at any of the recovered files yet?

Best wishes, G.

mrgoose
28-10-2009, 01:02 PM
...or are you still sorting it out?

Best wishes, G.