-
Junior Member
registered user
Hmmm... One of the reasons I responded was that my understanding, based on what I've been able to find, is somewhat contradictory.
For example, from http://www.debianhelp.co.uk/ddcommand.htm
Using dd you can create backups of an entire harddisk or just a parts of it. This is also usefull to quickly copy installations to similar machines. It will only work on disks that are exactly the same in disk geometry, meaning they have to the same model from the same brand.
full hard disk copy
dd if=/dev/hdx of=/dev/hdy
dd if=/dev/hdx of=/path/to/image
dd if=/dev/hdx | gzip > /path/to/image.gz
Hdx could be hda, hdb etc. In the second example gzip is used to compress the image if it is really just a backup.
So if I understand that, copying a 300GB IDE Maxtor using dd would require me to purchase another set of 300GB IDE Maxtors. Am I mistaken?
Thanks again,
Seth
-
Administrator
Site Admin-
Originally Posted by
setht
So if I understand that, copying a 300GB IDE Maxtor using dd would require me to purchase another set of 300GB IDE Maxtors. Am I mistaken?
That is correct, you are mistaken. As you pointed out dd if=/dev/hdx of=/path/to/image would make a image of the device hdx (in this cast the 300 gig maxtor) on any partition with enough space to hold it. A 500 gig SATA would hold it nicely, a 750 gig SATA (unfortunately currently more expensive per gigabyte than the 500 gig disks) would hold two. I had not even thought about compression but that very likely would let you store two images on one 500 gig device. dd is very powerful and you could split an image across 2 files on different partitions (requires specifying starting and ending points of each part of the dump). You have lots of options.
---
Verifying of md5 checksum and burning a CD at slow speed are important.
-
Administrator
Site Admin-
Let me add that the warning you quoted, "It will only work on disks that are exactly the same in disk geometry, meaning they have to the same model from the same brand." only applies to moving an image between disks and keeping it useable (look at the context it is used it). It should be obvious that the seccond command in the example would never work if the source was a device (entire drive) and the destination was a file on a partition on the same size drive. I your case the drive geometry becomes the same when you put the image back on the same physical drive that it came from, the image on the larger drive is only temporary storage.
-
Junior Member
registered user
-
The only thing I can add is be sure what drive is the source and which is the destination or you will have just lost all the data.
When done PMing please post back just what commands and size of hdd's used and any other useful information.
-
Re: In the interests of stepping lightly:
Originally Posted by
setht
So I tried this:
$ sudo modprobe md
...and it just sorta did it. If I understand the man pages correctly, I'm basically telling the kernel "Prepare for a Software RAID." Yes?
$ sudo mdadm --assemble --auto=yes /dev/md0 /dev/hde1 /dev/hdf1 /dev/hdg1 /dev/hdh1
Did this, and it says:
mdadm: device 3 in /dev/md0 has wrong state in superbock, but /dev/hdh1 seems ok
mdadm: failed to RUN_ARRAY /dev/md0: Input/output error
...and, in the interests of not getting in deeper than I can handle, I calmly, humbly and appreciatively await further advice.
Thanks, greenfly!
If I'm reading the error correctly, it seems to be complaining about /dev/hdg1. Since a RAID5 can handle losing a single drive, you can actually rebuild this array in degraded mode. Just replace the partition name with "missing" so if I am correct and /dev/hdg1 is in fact the one with problems, you would type:
Code:
$ sudo mdadm --assemble --auto=yes /dev/md0 /dev/hde1 /dev/hdf1 /dev/hdh1 missing
Then see if the device comes up. If so you should be able to mount it. If not come back here with the error.
-
Junior Member
registered user
Once more into the breach, dear friends...
$ sudo mdadm --assemble --auto=yes /dev/md0 /dev/hde1 /dev/hdf1 /dev/hdg1 /dev/hdh1
Did this, and it says:
mdadm: device 3 in /dev/md0 has wrong state in superbock, but /dev/hdh1 seems ok
mdadm: failed to RUN_ARRAY /dev/md0: Input/output error
$ sudo mdadm --assemble --auto=yes /dev/md0 /dev/hde1 /dev/hdf1 /dev/hdh1 missing
mdadm: device /dev/md0 already active - cannot assemble it
$ sudo mkdir /mnt/md0
$sudo mount /dev/md0 /mnt/md0
mount: you must specify the filesystem type
$ sudo mount /dev/md0 /mnt/md0 -a
mount: you must specify the filesystem type
$ sudo mount /dev/md0 /mnt/md0 -a -t jfs
mount: wrong fs type, bad option, bad superblock on /dev/md0, missing codepage or other error (could this be the IDE device where you in fact use ide-scsi so that sr0 or sda or so is needed?) In some cases useful info is found in syslog - try dmesg | tail or so
$ dmesg | tail
--- rd:4 wd:3
disk 1, o:1, dev:hdf1
disk 2, o:1, dev:hdg1
disk 3, o:1, dev:hdh1
raid5: failed to run raid set md0
md: pers->run() failed...
EFS: 1.0a - http://aeschi.ch.eu.org/efs
EFS: cannot read volume header
EFS: cannot read volume header
JFS: nTxBlock = 7945, nTxLock - 63562
...so then I tried restarting it and doing the "missing" without doing the other stuff first; no dice. Then I tried assembling the array calling other disks "missing" and it still doesn't like "device 3" regardless of the order I type it in.
When I tried to build it from F, G, H and E (in that order) it said "device 3 has wrong state but /hdh1 seems ok" as usual; next:
$ dmesg | tail
raid5: device hdh1 operational as raid disk 3
raid5: device hdg1 operational as raid disk 2
raid5: cannot start dirty degraded array for md0
RAID5 conf printout:
--- rd:4 wd:3
disk 1, o:1, dev:hdf1
disk 2, o:1, dev:hdg1
disk 3, o:1, dev:hdh1
raid5: failed to run raid set md0
md: pers->run() failed...
just for giggles, I tried mounting it as jfs, hfs, and ntfs. At least I got a different error out of ntfs ("the device /dev/md0 doesn't have a valid NTFS. Maybe you selected the wrong device? Or the whole disk instead of a partition? Or the other way around?")
And that's about as far as I can get. Unfortunately I suddenly got a job down in LA so I'm getting on a plane in ten hours. I'll have this lovely little disaster to play with again in about a week... and yet again, I welcome any and all advice.
-
Re: Once more into the breach, dear friends...
...so then I tried restarting it and doing the "missing" without doing the other stuff first; no dice. Then I tried assembling the array calling other disks "missing" and it still doesn't like "device 3" regardless of the order I type it in.
When I tried to build it from F, G, H and E (in that order) it said "device 3 has wrong state but /hdh1 seems ok" as usual; next:
Okay, it's possible that the disk it is complaining about is okay, it's just that some of the superblocks in the array are out of date. Normally I try to avoid "--force" options, but in this case we've tried everything else, and there's a chance that if you tell mdadm to ignore the out-of-sync superblock it might just re-create the array. So, reboot just so that Knoppix is in a fresh state and follow my original instructions, except when you run mdadm this time, add --force to it:
Code:
$ sudo mdadm --assemble --force --auto=yes /dev/md0 /dev/hde1 /dev/hdf1 /dev/hdg1 /dev/hdh1
As always, try that and come back with your results.
-
Junior Member
registered user
Back in the saddle again...
Okay, it's possible that the disk it is complaining about is okay, it's just that some of the superblocks in the array are out of date. Normally I try to avoid "--force" options, but in this case we've tried everything else, and there's a chance that if you tell mdadm to ignore the out-of-sync superblock it might just re-create the array. So, reboot just so that Knoppix is in a fresh state and follow my original instructions, except when you run mdadm this time, add --force to it:
Code:
$ sudo mdadm --assemble --force --auto=yes /dev/md0 /dev/hde1 /dev/hdf1 /dev/hdg1 /dev/hdh1
As always, try that and come back with your results.
Well, a move to another state, a new job, a new laptop, an ISP blowing up on me (anyone else hosed by the cPanel update last week? Yeah, didn't think so... avoid Sitelutions like the plague) and I can actually get to work trying to get the server working again. It's only been, what? A month and a half?
So. Feeling sassy. Roll the dice, plug it in, type up sudo modprobe md and let 'er rip:
Code:
$ sudo mdadm --assemble --force --auto=yes /dev/md0 /dev/hde1 /dev/hdf1 /dev/hdg1 /dev/hdh1
mdadm: /dev/md0 has been started with 3 drives (out of 4).
Code:
sudo mkdir /mnt /md0
Code:
sudo mount /dev/md0 /mnt/md0
AND THERE IT WAS!!!!!
So. futzing around in Konquerer, looking at the somewhat shattered file structure. I had created five mounts in there; it appears the NAS (rebyte) had created a few more defaults. The defaults are still there.
One of my shares is up and happy.
The rest of my shares are shoved into a USERS file.
And they're locked.
SO:
1) How do I unlock the permissions on my shattered files so that I can get them the hell off? The stuff that isn't locked up is busily transferring to a spare LaCie Porsche 80GB right now... and I can't tell you guys how overjoyed I am to have them! But the media files (photos, videos, music files) are still locked up. How do I get to 'em?
2) When I fired the computer up the first time (had to shut it down because in transport a SATA cable had managed to rub up against the CPU fan and when the fan came on, it made a horrible racket) it said something about bad blocks and how it was running with only three drives; Does what I've been able to tell you guys tell you enough to determine if one of the drives up and failed or if it just has a bad block? If it up and failed, should I limit the amount of time I have the other drives running in case they decide to fail too?
My data is so close! I feel like I'm on the ragged edge of seeing it again! I'd hate to have it snatched away irrevocably now that I can see the light at the end of the tunnel...
I owe Greenfly, Harry and this forum in general a tremendous debt. Thanks so much for you help so far - please help me take it over the finish line...
Seth
-
Senior Member
registered user
Maybe you cannot get to your files because you do not have the authority to access them.
Type typing:
sudo konqueror &
into a terminal window and see if this session can access your files as "superuser" or root user.
Similar Threads
-
By VladD in forum Hardware & Booting
Replies: 2
Last Post: 04-27-2008, 03:35 AM
-
By jMon54 in forum General Support
Replies: 1
Last Post: 12-13-2004, 04:03 PM
-
By nishtya in forum The Lounge
Replies: 0
Last Post: 09-26-2004, 04:01 AM
-
By linuX-gamEr in forum Laptops
Replies: 1
Last Post: 04-18-2004, 01:37 PM
-
By georgetoon in forum General Support
Replies: 5
Last Post: 07-15-2003, 07:03 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Dell PowerEdge M610 Blade Server E5620@2.2GHZ (6x)8GB RAM (2x)146GB 15K SAS HDD
$75.00
DELL PowerEdge R730XD 24x 2.5" Server Dual 750W Dual Heatsink - BareBones TESTED
$299.99
Supermicro 4U 36 Bay Storage Server 2.4Ghz 8-C 128GB 1x1280W Rails TrueNAS ZFS
$721.06
H261-Z61 2U 24SFF AMD Server 8x EPYC 7551 256-Cores 256GB RAM 8x25G NIC 2x2200W
$2512.18
DELL PowerEdge R730 Server 2x E5-2690v3 2.6GHz =24 Cores 32GB H730 4xRJ45
$275.00
Dell PowerEdge R720XD Xeon E5-2680 V2 2.8GHz 20 Cores 256GB RAM 12x4TB
$510.00
Dell PowerEdge R720 Server - 2x8c CPU,256Gb RAM, 128Gb SSD/3x600Gb SAS, Proxmox
$340.00
Dell PowerEdge R730XD 28 Core Server 2X Xeon E5-2680 V4 H730 128GB RAM No HDD
$389.99
Dell PowerEdge R820 Server 4x E5-4620 2.2GHz 32-Core Total 256GB 0HD 2x 1100w
$315.00
1U Supermicro Pro Server X10DRU-i+ 2x Xeon E5-2620 V3 32GB DDR4 RAM 4x 10GE RAIL
$190.00