Re: Recovering data from a Raid 1Sata HD
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Sun, Dec 27, 2015 at 02:48:45PM +0100, Pascal Hambourg wrote: > to...@tuxteam.de a écrit : > > > > On Wed, Dec 23, 2015 at 07:41:00AM -0300, Renaud OLGIATI wrote: > > > >> Or do I have to first create a (failed) array with mdadm ? > > > > For RAID 1 it shouldn't be necessary, AFAIR > > You cannot mount directly a RAID 1 partition with format 1.1 or 1.2 > because the RAID superblock gets in the way. You must mount it with > loop,offset (see my other reply in this thread) or assemble it as a > degraded array and mount the array. Ah -- thanks. That was the missing piece. Seems my RAID knowledge is a bit rusty, sorry. Regards - -- tomás -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlaA6fEACgkQBcgs9XrR2kabagCeOLlyX+aUKGLlZ96MPyQJ7rXf trIAnR7vJQFLnNX7YNRUr60FmXMtMWB5 =u/ht -END PGP SIGNATURE-
Re: Recovering data from a Raid 1Sata HD
to...@tuxteam.de a écrit : > > On Wed, Dec 23, 2015 at 07:41:00AM -0300, Renaud OLGIATI wrote: > >> Or do I have to first create a (failed) array with mdadm ? > > For RAID 1 it shouldn't be necessary, AFAIR You cannot mount directly a RAID 1 partition with format 1.1 or 1.2 because the RAID superblock gets in the way. You must mount it with loop,offset (see my other reply in this thread) or assemble it as a degraded array and mount the array.
Re: Recovering data from a Raid 1Sata HD
Felix Miata a écrit : > > A RAID1 partition normally cannot be mounted as an sdX# device. It can if the RAID superblock is located at the end of the partition. I.e. the superblock format is 0.9 (obsolete) or 1.0. However if the format is 1.1 or 1.2 (default), the superblock is located at or near the beginning of the partitition and offsets the beginning of the filesystem, preventing mount to identify it. But the filesystem can still be mounted with loop, by specifying the offset. Use "mdadm -E /dev/" to display the superblock format and the data offset. I don't remember if the offset is in 512-byte sectors, KiB or other unit. You must multiply the offet with the block size to get the offset in bytes. Then mount the filesystem with "-o loop,offset=".
Re: Recovering data from a Raid 1Sata HD
Or do I have to first create a (failed) array with mdadm ? Hi, assemble fail raid first: #mdadm -A /dev/mdX /dev/sdX /dev/sdY then check status: #cat /proc/mdstat or #mdadm --detail /dev/mdX If mdam does not start then you could use -f (force). After properly assembled raid you could mount it: #mkdir /recover #mount /dev/mdX /recover
Re: Recovering data from a Raid 1Sata HD
Yes you can mount the single raid1 disk. Your wheezy system should have recognized your drive as a md device when booted. Run the commend 'cat /proc/mdstat'. It will show you the current md devices and their status. This is what I get after connecting a drive to my system over a usb connection. It added drives /dev/sdg[1-3] to my system drive list (ls /dev/sd*). I had to assemble the drive partitions into md devices with the commands 'mdadm --assemble /dev/md5 /dev/sdg1', 'mdadm --assemble /dev/md6 /dev/sdg2' and 'mdadm --assemble /dev/md7 /dev/sdg3'. cat /proc/mdstat Personalities : [raid1] md7 : active (auto-read-only) raid1 sdg3[3] 211690544 blocks super 1.2 [3/1] [__U] md6 : active (auto-read-only) raid1 sdg2[3] 1048564 blocks super 1.2 [3/1] [__U] md5 : active (auto-read-only) raid1 sdg1[3] 31456184 blocks super 1.2 [3/1] [__U] md2 : active raid1 sda3[3] sdb3[5] 938881600 blocks super 1.2 [2/2] [UU] md1 : active raid1 sda2[3] sdb2[5] 4192192 blocks super 1.2 [2/2] [UU] md0 : active raid1 sda1[0] sdb1[1] 33554368 blocks [2/2] [UU] unused devices: Where my original system devices are md0, md1 and md2. You will also see that this is a degraded array with the notation [3/1] [__U] which means that the original array had 3 drives and now has one. If you have just booted the system with the drive connected it may have assembled the md devices for you. Look for the drive partitions for the old drive and you will see the md device your system has assigned to it. It might me something like /dev/md127, /dev/md126 and so on depending on how many partitions the drive has. Now mount the array with 'mount /dev/md5 /mnt/src' after creating the directory /mnt/src first. Of course your device names and drive names will be different. If the original array device was a swap partition (as my md6 above is) it will not mount. Once you are finished and have unmounted the array you should stop the array(s) with the command 'mdadm --stop /dev/md[5-7]'. Warning ... of course be careful and not try to stop the arrays your system is using. I think mdadm will warn you that the array is in use and cannot be stopped. Hope this helps. ...Bob
Re: Recovering data from a Raid 1Sata HD
On Wed, 23 Dec 2015 13:49:36 +0100 to...@tuxteam.de wrote: > Now you might want to try > sudo e2fsck -n /dev/sdi9 Does not like it either: root@ron:/home/ron # e2fsck -n /dev/sdi9 e2fsck 1.42.5 (29-Jul-2012) ext2fs_open2: Bad magic number in super-block e2fsck: Superblock invalid, trying backup blocks... e2fsck: Bad magic number in super-block while trying to open /dev/sdi9 I suppose I'll have to go the mdadm way... ;-3( Cheers, Ron. -- One seldom sees a monument to a committee. -- http://www.olgiati-in-paraguay.org --
Re: Recovering data from a Raid 1Sata HD
At the end, if all methods will fail, you could really try testdisk, it's free. You could go for other commercial options too, depending upon the necessity of the data. Regards Himanshu Shekhar
Re: Recovering data from a Raid 1Sata HD
On Wed, 23 Dec 2015 13:33:22 +0100 wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, Dec 23, 2015 at 09:49:54AM -0300, Renaud OLGIATI wrote: > > On Wed, 23 Dec 2015 11:11:08 + > > Lisi Reisz wrote: > > > > > On Wednesday 23 December 2015 10:23:41 to...@tuxteam.de wrote: > > > > -BEGIN PGP SIGNED MESSAGE- > > > > Hash: SHA1 > > > > > > > > On Wed, Dec 23, 2015 at 07:41:00AM -0300, Renaud OLGIATI wrote: > > > > > Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy > > > > > system. > > > > > > > > > > Is there a way to mount it on another Wheezy system to recover the > > > > > data ? > > > > > > > > > > I have tried to mount it, and get > > > > > > > > > > root@ron:/home/ron # mount -t ext4 /dev/sdi9 /media/eSata > > > > > mount: wrong fs type, bad option, bad superblock on /dev/sdi9, > > > > >missing codepage or helper program, or other error > > > > >In some cases useful info is found in syslog - try > > > > >dmesg | tail or so > > > > > > > > > > What file type should I give for the -t param of mount ? > > > > > > Try to omit the explicit file system ("-t ext4") in the mount > > > > invocation above: mount should be able to find out by itself -- > > > > unless you positively know that ext4 is right. > > > > > If it is demanding a file type, how about "-t auto"? > > > > root@ron:/home/ron # mount /dev/sdi9 /media/eSata > > mount: you must specify the filesystem type > > > > root@ron:/home/ron # mount -t auto /dev/sdi9 /media/eSata > > mount: you must specify the filesystem type > > That means mount can't guess what filesystem is on /dev/sdi9. I fear we > won't be better at it. But you could try something like: > > sudo dd if=/dev/sdi9 bs=1024 count=1 | file - > > Perhaps 'file' can shed some light onto it (it doesn't always) Thank, but I fear I remain un-enlightened: root@ron:/home/ron # dd if=/dev/sdi9 bs=1024 count=1 | file - 1+0 records in 1+0 records out 1024 bytes (1.0 kB) copied, 0.000693701 s, 1.5 MB/s /dev/stdin: data Cheers, Ron. -- One seldom sees a monument to a committee. -- http://www.olgiati-in-paraguay.org --
Re: Recovering data from a Raid 1Sata HD
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Dec 23, 2015 at 09:49:54AM -0300, Renaud OLGIATI wrote: > On Wed, 23 Dec 2015 11:11:08 + > Lisi Reisz wrote: > > > On Wednesday 23 December 2015 10:23:41 to...@tuxteam.de wrote: > > > -BEGIN PGP SIGNED MESSAGE- > > > Hash: SHA1 > > > > > > On Wed, Dec 23, 2015 at 07:41:00AM -0300, Renaud OLGIATI wrote: > > > > Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy > > > > system. > > > > > > > > Is there a way to mount it on another Wheezy system to recover the data > > > > ? > > > > > > > > I have tried to mount it, and get > > > > > > > > root@ron:/home/ron # mount -t ext4 /dev/sdi9 /media/eSata > > > > mount: wrong fs type, bad option, bad superblock on /dev/sdi9, > > > >missing codepage or helper program, or other error > > > >In some cases useful info is found in syslog - try > > > >dmesg | tail or so > > > > > > > > What file type should I give for the -t param of mount ? > > > > Try to omit the explicit file system ("-t ext4") in the mount > > > invocation above: mount should be able to find out by itself -- > > > unless you positively know that ext4 is right. > > > If it is demanding a file type, how about "-t auto"? > > root@ron:/home/ron # mount /dev/sdi9 /media/eSata > mount: you must specify the filesystem type > > root@ron:/home/ron # mount -t auto /dev/sdi9 /media/eSata > mount: you must specify the filesystem type That means mount can't guess what filesystem is on /dev/sdi9. I fear we won't be better at it. But you could try something like: sudo dd if=/dev/sdi9 bs=1024 count=1 | file - Perhaps 'file' can shed some light onto it (it doesn't always) Regards - -- tomás -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlZ6lJIACgkQBcgs9XrR2kYRQgCePkCV+fbq8Y9QKzkSBdQQFrzT GAgAn2cWIzhjNnpg68iKaCzAoVlsuNMT =LdsL -END PGP SIGNATURE-
Re: Recovering data from a Raid 1Sata HD
On Wed, 23 Dec 2015 11:11:08 + Lisi Reisz wrote: > On Wednesday 23 December 2015 10:23:41 to...@tuxteam.de wrote: > > -BEGIN PGP SIGNED MESSAGE- > > Hash: SHA1 > > > > On Wed, Dec 23, 2015 at 07:41:00AM -0300, Renaud OLGIATI wrote: > > > Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy > > > system. > > > > > > Is there a way to mount it on another Wheezy system to recover the data ? > > > > > > I have tried to mount it, and get > > > > > > root@ron:/home/ron # mount -t ext4 /dev/sdi9 /media/eSata > > > mount: wrong fs type, bad option, bad superblock on /dev/sdi9, > > >missing codepage or helper program, or other error > > >In some cases useful info is found in syslog - try > > >dmesg | tail or so > > > > > > What file type should I give for the -t param of mount ? > > Try to omit the explicit file system ("-t ext4") in the mount > > invocation above: mount should be able to find out by itself -- > > unless you positively know that ext4 is right. > If it is demanding a file type, how about "-t auto"? root@ron:/home/ron # mount /dev/sdi9 /media/eSata mount: you must specify the filesystem type root@ron:/home/ron # mount -t auto /dev/sdi9 /media/eSata mount: you must specify the filesystem type > Or had you thought of a Live CD to help recover the data? Will it mount better than my existing Wheezy ? Cheers, Ron. -- I read Playboy for the same reason I read National Geographic. To see the sights I'm never going to visit. -- http://www.olgiati-in-paraguay.org --
Re: Recovering data from a Raid 1Sata HD
On Wednesday 23 December 2015 10:23:41 to...@tuxteam.de wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > On Wed, Dec 23, 2015 at 07:41:00AM -0300, Renaud OLGIATI wrote: > > Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy > > system. > > > > Is there a way to mount it on another Wheezy system to recover the data ? > > > > I have tried to mount it, and get > > > > root@ron:/home/ron # mount -t ext4 /dev/sdi9 /media/eSata > > mount: wrong fs type, bad option, bad superblock on /dev/sdi9, > >missing codepage or helper program, or other error > >In some cases useful info is found in syslog - try > >dmesg | tail or so > > > > > > What file type should I give for the -t param of mount ? [snip] > Try to omit the explicit file system ("-t ext4") in the mount > invocation above: mount should be able to find out by itself -- > unless you positively know that ext4 is right. If it is demanding a file type, how about "-t auto"? Or had you thought of a Live CD to help recover the data? Lisi
Re: Recovering data from a Raid 1Sata HD
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Wed, Dec 23, 2015 at 07:41:00AM -0300, Renaud OLGIATI wrote: > Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy > system. > > Is there a way to mount it on another Wheezy system to recover the data ? > > I have tried to mount it, and get > > root@ron:/home/ron # mount -t ext4 /dev/sdi9 /media/eSata > mount: wrong fs type, bad option, bad superblock on /dev/sdi9, >missing codepage or helper program, or other error >In some cases useful info is found in syslog - try >dmesg | tail or so > > > What file type should I give for the -t param of mount ? The file system type the RAID 1 was originally working with. Looking at dmesg, as suggested in mount's error message is a good idea. Try to omit the explicit file system ("-t ext4") in the mount invocation above: mount should be able to find out by itself -- unless you positively know that ext4 is right. > Or do I have to first create a (failed) array with mdadm ? For RAID 1 it shouldn't be necessary, AFAIR regards - -- tomás -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlZ6di0ACgkQBcgs9XrR2kb9wwCdHi0Weh7pDLT7s10SL5g4V7wl dxsAnjdx0fz4GbxWrAmElSPt7XuKqupY =yZCV -END PGP SIGNATURE-
Re: Recovering data from a Raid 1Sata HD
Renaud (Ron) OLGIATI composed on 2015-12-23 07:41 (UTC-0300): > Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy > system. > Is there a way to mount it on another Wheezy system to recover the data ? > I have tried to mount it, and get > root@ron:/home/ron # mount -t ext4 /dev/sdi9 /media/eSata > mount: wrong fs type, bad option, bad superblock on /dev/sdi9, >missing codepage or helper program, or other error >In some cases useful info is found in syslog - try >dmesg | tail or so A RAID1 partition normally cannot be mounted as an sdX# device. > What file type should I give for the -t param of mount ? > Or do I have to first create a (failed) array with mdadm ? It's probably enough to see what /dev/md* device(s) got created when you attached it and mount an/the appropriate md device. The dmesg tail may give a clue. -- "The wise are known for their understanding, and pleasant words are persuasive." Proverbs 16:21 (New Living Translation) Team OS/2 ** Reg. Linux User #211409 ** a11y rocks! Felix Miata *** http://fm.no-ip.com/
Re: Recovering data from a Raid 1Sata HD
Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy system. Is there a way to mount it on another Wheezy system to recover the data ? I have tried to mount it, and get root@ron:/home/ron # mount -t ext4 /dev/sdi9 /media/eSata mount: wrong fs type, bad option, bad superblock on /dev/sdi9, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so What file type should I give for the -t param of mount ? Or do I have to first create a (failed) array with mdadm ? Cheers, Ron. -- What we do not understand we do not possess. -- Goethe -- http://www.olgiati-in-paraguay.org --
Re: Recovering data from a Raid 1Sata HD
Am Montag, 21. Dezember 2015, 17:06:49 schrieb Renaud OLGIATI: > Given a Sata HD that was part of a RAID1 array on a now defunct Wheezy > system. > > Is there a way to mount it on another Wheezy system to recover the data ? > > Cheers, > > Ron. If it was Raid-1 , mirroring, you should be able to mount it as any harddrive in a linux system. I suggest, to put it as the only one into a computer and then start from a linux livefile system like TRK, Knoppix, GRML or whatever. So it will not interfere with your system and you will have a completely preconfigured rescue system avaiilable. Good luck! Hans