Unoffical empeg BBS

Quick Links: Empeg FAQ | RioCar.Org | Hijack | BigDisk Builder | jEmplode | emphatic
Repairs: Repairs

Topic Options
#356119 - 06/11/2012 22:21 Read XFS in Windows?
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
My Western Digital NAS didn't survive the recent move intact. It seems the controller board has died, though the drive still spins fine. I have it hooked up to my desktop now, running Windows 7.

The problem is that it's using an XFS file system.

Is there an easy way to read this from Windows? I've found about five different XFS file recovery programs, but they all range from around $30 to $100, but I'm not going to pay that for a one-time need.

What do I do?
_________________________
Matt

Top
#356121 - 06/11/2012 23:04 Re: Read XFS in Windows? [Re: Dignan]
Shonky
pooh-bah

Registered: 12/01/2002
Posts: 2009
Loc: Brisbane, Australia
VM running linux mapping the drive directly to the VM?
_________________________
Christian
#40104192 120Gb (no longer in my E36 M3, won't fit the E46 M3)

Top
#356125 - 07/11/2012 01:18 Re: Read XFS in Windows? [Re: Shonky]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
Boot a live Linux CD, mount the XFS volume read-only, mount the Windows drive (ntfs-3g) R/W, and copy your files over.

Top
#356132 - 07/11/2012 11:53 Re: Read XFS in Windows? [Re: Shonky]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
Originally Posted By: mlord
Boot a live Linux CD, mount the XFS volume read-only, mount the Windows drive (ntfs-3g) R/W, and copy your files over.

Okay, here's the annoying thing...my optical drives aren't working and my machine seems to be having issues booting to USB. So...
Originally Posted By: Shonky
VM running linux mapping the drive directly to the VM?

This is what I'd been trying, but it doesn't seem to be working.

After my original post, I went virtual. I mounted the Ubuntu install as a virtual CD, then installed it into a VirtualBox VM. It's up and running great, and will be a great way for me to get more familiar with Ubuntu.

But at the moment I can't seem to get it to mount the partition. I'm pretty sure I'm doing it right, but I won't be surprised if I'm not. I created a directory for the mount, then I entered the following:
Code:
mount -t xfs /dev/sda2 /mnt/windows

But this returns:
Code:
mount: wrong fs type, bad option, bad superblock on /dev/sda2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so

This has led me down a troubleshooting rabbit hole that's taken me nowhere. What do I do?
_________________________
Matt

Top
#356133 - 07/11/2012 12:14 Re: Read XFS in Windows? [Re: Dignan]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
If this was from a dedicated "NAS" box, then how many drives can the NAS hold? More than one, right?

In which case it probably always overlays a RAID of some kind onto the drive(s) before making filesystems. And doubly so if it used some kind of special hardware controller board for the drives.

What do these commands show you (run as "root" from within Ubuntu):

fdisk -l
cat /proc/partitions

Top
#356138 - 07/11/2012 12:50 Re: Read XFS in Windows? [Re: mlord]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
Nope, it was a single-drive NAS. This model, I'm pretty sure, but it could be the one before it.

After fdisk -l:

Code:
Disk /dev/sda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 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: 0x000c2ec5

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    15728639     7863296   83  Linux
/dev/sda2        15730686    16775167      522241    5  Extended
/dev/sda5        15730688    16775167      522240   82  Linux swap / Solaris

After cat /proc/partitions:

Code:
major minor  #blocks  name

   8        0    8388608 sda
   8        1    7863296 sda1
   8        2          1 sda2
   8        5     522240 sda5
  11        0    1048575 sr0
_________________________
Matt

Top
#356139 - 07/11/2012 12:54 Re: Read XFS in Windows? [Re: Dignan]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
Oh...now that I look at what you had me post, I'm assuming I'm having trouble because the VM has created a virtual disk with the assignment of sda? How do I give it access to the disk that's showing up in Windows as the actual sda? Or should I be trying to get my optical drives working now? smile

I've attached a shot of what I have in Disk Management.


Attachments
management.jpg




Edited by Dignan (07/11/2012 12:55)
_________________________
Matt

Top
#356141 - 07/11/2012 13:11 Re: Read XFS in Windows? [Re: Dignan]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
The mount command you show attempts /dev/sda2, but your fdisk listing shows that the filesystem is on /dev/sda1...

Peter

Top
#356142 - 07/11/2012 13:14 Re: Read XFS in Windows? [Re: peter]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
Originally Posted By: peter
The mount command you show attempts /dev/sda2, but your fdisk listing shows that the filesystem is on /dev/sda1...

Yeah, I'm not sure how to address the difference between the virtual machine and the host desktop's hard drives... I assume that as far as the VM knows there are no other hard drives other than the virtual one that gets mounted at boot...
_________________________
Matt

Top
#356143 - 07/11/2012 13:25 Re: Read XFS in Windows? [Re: Dignan]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
Oh right, sorry, yes, /dev/sda isn't even your drive. And the fact that yours isn't in /proc/partitions means that yes, it doesn't have a standard partition table. I assume that if you type dmesg, it does mention that it's found the physical drive? perhaps as /dev/sdb?

Peter

Top
#356144 - 07/11/2012 13:43 Re: Read XFS in Windows? [Re: peter]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
Originally Posted By: peter
Oh right, sorry, yes, /dev/sda isn't even your drive. And the fact that yours isn't in /proc/partitions means that yes, it doesn't have a standard partition table. I assume that if you type dmesg, it does mention that it's found the physical drive? perhaps as /dev/sdb?


Probably not. I expected to see /dev/sdb (with or without subpartitions) in /proc/partitions

Top
#356145 - 07/11/2012 13:52 Re: Read XFS in Windows? [Re: mlord]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
I've attached the huge list of stuff that dmesg returned.


Attachments
dmesg.txt (233 downloads)

_________________________
Matt

Top
#356146 - 07/11/2012 14:05 Re: Read XFS in Windows? [Re: Dignan]
mlord
carpal tunnel

Registered: 29/08/2000
Posts: 14482
Loc: Canada
Nothing new there. Your VM doesn't have access to the drive yet.

Top
#356147 - 07/11/2012 14:44 Re: Read XFS in Windows? [Re: mlord]
canuckInOR
carpal tunnel

Registered: 13/02/2002
Posts: 3212
Loc: Portland, OR
Has the USB controller in the virtual machine been enabled? VirtualBox doesn't, IIRC, enable that by default.

Top
#356148 - 07/11/2012 15:52 Re: Read XFS in Windows? [Re: canuckInOR]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
Which of the drives in your Disk Manager picture is the one we're talking about? How is it attached to your PC -- USB? eSATA?

Peter

Top
#356155 - 08/11/2012 02:30 Re: Read XFS in Windows? [Re: peter]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
Originally Posted By: mlord
Nothing new there. Your VM doesn't have access to the drive yet.

Yeah, I guess I'm trying to figure out how to do that.

Originally Posted By: canuckInOR
Has the USB controller in the virtual machine been enabled? VirtualBox doesn't, IIRC, enable that by default.

I'll look for that setting, but...

Originally Posted By: peter
Which of the drives in your Disk Manager picture is the one we're talking about? How is it attached to your PC -- USB? eSATA?

D'oh! Sorry. Yeah, we're looking at the first drive, the one that's all chopped up into multiple partitions, and we're looking at the last partition of that drive. I found some instructions online that said the fourth partition on the first SATA drive would be sda2, but I don't know how you get "2" for the fourth partition. Wouldn't it be "3?"

And the drive is connected to SATA just like the others.
_________________________
Matt

Top
#356156 - 08/11/2012 02:54 Re: Read XFS in Windows? [Re: Dignan]
drakino
carpal tunnel

Registered: 08/06/1999
Posts: 7868
sda is the first SCSI/SATA attached drive in the virtual machine, which should be the virtual disk the VM created. The external drive formatted XFS will be something else, such as sdb once it's properly passed into the VM.

Since it's attached via SATA, you need to pass it in as a raw disk:

http://www.virtualbox.org/manual/ch09.html#rawdisk

Top
#356157 - 08/11/2012 07:52 Re: Read XFS in Windows? [Re: Dignan]
peter
carpal tunnel

Registered: 13/07/2000
Posts: 4172
Loc: Cambridge, England
Originally Posted By: Dignan
I found some instructions online that said the fourth partition on the first SATA drive would be sda2, but I don't know how you get "2" for the fourth partition. Wouldn't it be "3?"

Your internet has been deceiving you. The four primary partitions are sda1 to sda4 (or sdb1 to sdb4, etc.), though they're numbered in the order they're defined in the partition table, not in the order they appear on the disk -- it'd be legit but decidedly odd for sda1 to be the one at the end, for instance.

Peter

Top
#356179 - 08/11/2012 20:16 Re: Read XFS in Windows? [Re: mlord]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
Originally Posted By: mlord
Boot a live Linux CD, mount the XFS volume read-only, mount the Windows drive (ntfs-3g) R/W, and copy your files over.

Okay, so I rummaged through my pile of boxes, finally found a DVD burner, and made an Ubuntu live disc and booted to it. I didn't need to mount the existing drives because they came up automatically, and I was easily able to mount the NAS drive with no troubles whatsoever. I copied all the data off and now I'll wipe the drive for use as a regular NTFS disc.

Thanks for the help, folks. I'm still interested in trying out the Ubuntu VM, so I'll play around with that.


Edited by Dignan (08/11/2012 20:17)
_________________________
Matt

Top
#356183 - 09/11/2012 01:16 Re: Read XFS in Windows? [Re: Dignan]
JBjorgen
carpal tunnel

Registered: 19/01/2002
Posts: 3583
Loc: Columbus, OH
Well done!
_________________________
~ John

Top
#356186 - 09/11/2012 10:29 Re: Read XFS in Windows? [Re: JBjorgen]
Dignan
carpal tunnel

Registered: 08/03/2000
Posts: 12318
Loc: Sterling, VA
Originally Posted By: JBjorgen
Well done!

Thank you! But as usual I'm glad I got the help here, and I learned a good deal as well.
_________________________
Matt

Top