Linux - HardwareThis forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I was previously attempt to clone my failing disk to a raid-1 array with aronis true image but failed because of the bad sectors near the end of the source disks. So i try to use dd from a livecd to do that.
as a noob to LVM, i didn't realized if there are disks with LVM volumes with exact same uuid, only one will shown in disk utility... in my case, the volumes on my source disk (/dev/sdc) was shown in disk utlility, under the category "Raid and other logicical volumes"(/dev/dm-0) which lead me to think that was referring to the raid array, my target.
Then I deleted volume on /dev/dm-0 and the dd'ed /dev/sdc to /dev/dm-0.... and you know, i'm doomed.
i now dd'ed the source disk to another single disk (/dev/sda), and managed to restore the LVM structure using meta data found on disk. But the partition tables seems messed up.
fdisk -l result as follows: (/dev/sda is the new cloned disk, sdb is the live usb disk)
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes
255 heads, 63 sectors/track, 243201 cylinders, total 3907029168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0006bb70
Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 3906248703 1952611328 8e Linux LVM
Disk /dev/sdb: 7948 MB, 7948206080 bytes
245 heads, 62 sectors/track, 1021 cylinders, total 15523840 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x20ac7dda
This doesn't look like a partition table
Probably you selected the wrong device.
If you have a backup of /etc/fstab anywhere, then that's something to start with. Personally (and I'm putting a hand out to get slapped here) I would be surprised if it's seeing the usb disk as part of a raid or perhaps even lvm structure. I would have thought it would have to be internal for that.
dd is only useful for disk copying if you are dd'ing onto an identical disk. cp -a otherwise. With dd, he directories will point to track/cylinder for file start, and if the track/cylinder is different . . . you get info in, rubbish out. cp -a copies the data and writes fresh data locations. I would go through /dev/sda, & sdb, mounting every partition ro, e.g.
mount -o ro /dev/sda1 /mnt/tmp
and see what you can read. Consider also what you want/need, and what files you can do without. Also do web searches e.g. "linux deleted dm-0 raid 1" "linux recover lost raid-1". I'm no raid expert, and avoid lvm like the plague. Perhaps now you know why :-P.
Looking at them now, sda is your disk cloned with dd, right? If it is identical CHS to your old disk, dd may work - Otherwise it's nonsense, although you may get stuff off it with photorec. In the off chance it's identical, try the lines below.
sdb has a sdb1 & sdb2. Frankly, sdb3 & sdb4 look like garbage entries. sdb1 is NTFS, sdb2 is FAT16
(-->dos 6.0 & windows 3.11 iirc).
mount -t ntfs-3g /dev/sdb1 /somewhere
mount -t msdos /dev/sdb2 /somewhere (or mebbe -t vfat)
If this gets nowhere , there is ntfs and dos tools (check sbin & /usr/sbin). If testdisk won't do write up the partition table, I have _no_ ideas for you. Game over.
yep, sda is the disk i cloned. with the same size of my dying source disk. I'm not quite sure about the CHS though, just a 2TB disk.
sdb is the usb disk i stored the knoppix live dvd where i run the testdisk & photorec.
So that /dev/Mapper stuff is the data you're trying to get at?
Check the CHS of sda, & it's original. If they are different, you can let photorec loose on it. Once you have done that, clean it off, ans you probably need space. Throw in the old disk and try a cp -a to sda and you might get something. sdb is not of interest.
If you look to /etc/fstab, do you have there any translation of partitions, or is it somewhere else? If you have photorec data saved, cd to there & try this line on it
grep dev\/Mapper\/VolGroup-lv * |less
I would expect you to be able to find the partition (uuid probably) of each chunk that is in the LVM/raid array. Make a list of what's important/vital and save that stuff off. Then lose the lvm, the rest of the data, and reinstall. If it's commercially important, call experts.
If you get the uuids, add them to /etc/fstab, like this
UUID=03ec5dd3-45c0-4f95-a363-61ff321a09ff /mnt/tmp auto defaults 0 0
You can then run 'mount -a' and it will try them :-D.
EDIT: If the kernel recognizes them, they are also in /dev/disk/by-uuid
Last edited by business_kid; 07-24-2013 at 04:15 AM.