* Recovering XFS Partition of Type FAT16
@ 2011-07-04 10:23 Volkan YAZICI
2011-07-04 12:49 ` Dave Chinner
0 siblings, 1 reply; 6+ messages in thread
From: Volkan YAZICI @ 2011-07-04 10:23 UTC (permalink / raw)
To: xfs
Hi,
I have an XFS partition, which is
1) Mistakenly quick formatted as FAT16.
2) At first, I couldn't see in "fdisk -l" that it is set to FAT16,
instead of Linux. Hence, tried to fix it with xfs_recover. xfs_recover
returned 0, and mount operation succeeded; but mounted fs size
appeared as 20GB (despite it is 350GB) and almost every file was
missing.
3) Later, I set the type of /dev/sda1 (the only partition in /dev/sda)
to Linux, re-run xfs_recover, but nothing changed: Same fs size (20GB)
and same missing files.
I open the system with Knoppix, and below are the partition
diagnostics. I need urgent help to recover the files. I will be
really, really appreciated for any help! (If you need further
information, just drop me a mail.)
Best.
# fdisk -l
Disk /dev/sda: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x447c435f
Device Boot Start End Blocks Id System
/dev/sda1 * 1 38913 312568641 83 Linux
# mount | grep /dev/sda1
/dev/sda1 on /media/sda1 type xfs (rw,relatime,attr2,noquota)
# df -h | grep /dev/sda1
/dev/sda1 19G 4,2G 15G 23% /media/sda1
# xfs_info /mnt/sda1
meta-data=/dev/sda1 isize=256 agcount=4, agsize=1226963 blks
= sectsz=512 attr=2
data = bsize=4096 blocks=4907849, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0
log =internal bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recovering XFS Partition of Type FAT16
2011-07-04 10:23 Recovering XFS Partition of Type FAT16 Volkan YAZICI
@ 2011-07-04 12:49 ` Dave Chinner
2011-07-07 11:32 ` Volkan YAZICI
0 siblings, 1 reply; 6+ messages in thread
From: Dave Chinner @ 2011-07-04 12:49 UTC (permalink / raw)
To: Volkan YAZICI; +Cc: xfs
On Mon, Jul 04, 2011 at 10:23:55AM +0000, Volkan YAZICI wrote:
> Hi,
>
> I have an XFS partition, which is
>
> 1) Mistakenly quick formatted as FAT16.
> 2) At first, I couldn't see in "fdisk -l" that it is set to FAT16,
> instead of Linux. Hence, tried to fix it with xfs_recover. xfs_recover
> returned 0, and mount operation succeeded; but mounted fs size
> appeared as 20GB (despite it is 350GB) and almost every file was
> missing.
> 3) Later, I set the type of /dev/sda1 (the only partition in /dev/sda)
> to Linux, re-run xfs_recover, but nothing changed: Same fs size (20GB)
> and same missing files.
What is this xfs_recover tool you speak of? I've never heard of it,
I can't find any direct links to it in google (only forum posts from
years ago about how great it is) so I have no idea what you've done to
your filesystem...
> I open the system with Knoppix, and below are the partition
> diagnostics. I need urgent help to recover the files. I will be
> really, really appreciated for any help! (If you need further
> information, just drop me a mail.)
>
>
> Best.
>
>
> # fdisk -l
>
> Disk /dev/sda: 320.1 GB, 320072933376 bytes
> 255 heads, 63 sectors/track, 38913 cylinders
> Units = cylinders of 16065 * 512 = 8225280 bytes
> Sector size (logical/physical): 512 bytes / 512 bytes
> I/O size (minimum/optimal): 512 bytes / 512 bytes
> Disk identifier: 0x447c435f
>
> Device Boot Start End Blocks Id System
> /dev/sda1 * 1 38913 312568641 83 Linux
>
>
> # mount | grep /dev/sda1
> /dev/sda1 on /media/sda1 type xfs (rw,relatime,attr2,noquota)
>
>
> # df -h | grep /dev/sda1
> /dev/sda1 19G 4,2G 15G 23% /media/sda1
>
> # xfs_info /mnt/sda1
> meta-data=/dev/sda1 isize=256 agcount=4, agsize=1226963 blks
> = sectsz=512 attr=2
> data = bsize=4096 blocks=4907849, imaxpct=25
> = sunit=0 swidth=0 blks
> naming =version 2 bsize=4096 ascii-ci=0
> log =internal bsize=4096 blocks=2560, version=2
> = sectsz=512 sunit=0 blks, lazy-count=1
> realtime =none extsz=4096 blocks=0, rtextents=0
That looks like a newly made 20GB XFS filesystem, not the result of
repairing a 350GB filesystem...
If I were you, I'd be restoring from backups. You do have backups,
right?
Cheers,
Dave.
--
Dave Chinner
david@fromorbit.com
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recovering XFS Partition of Type FAT16
2011-07-04 12:49 ` Dave Chinner
@ 2011-07-07 11:32 ` Volkan YAZICI
2011-07-07 15:53 ` Eric Sandeen
0 siblings, 1 reply; 6+ messages in thread
From: Volkan YAZICI @ 2011-07-07 11:32 UTC (permalink / raw)
To: Dave Chinner; +Cc: xfs
On Mon, Jul 4, 2011 at 3:49 PM, Dave Chinner <david@fromorbit.com> wrote:
> On Mon, Jul 04, 2011 at 10:23:55AM +0000, Volkan YAZICI wrote:
>> I have an XFS partition, which is
>>
>> 1) Mistakenly quick formatted as FAT16.
>> 2) At first, I couldn't see in "fdisk -l" that it is set to FAT16,
>> instead of Linux. Hence, tried to fix it with xfs_recover. xfs_recover
>> returned 0, and mount operation succeeded; but mounted fs size
>> appeared as 20GB (despite it is 350GB) and almost every file was
>> missing.
>> 3) Later, I set the type of /dev/sda1 (the only partition in /dev/sda)
>> to Linux, re-run xfs_recover, but nothing changed: Same fs size (20GB)
>> and same missing files.
>
> What is this xfs_recover tool you speak of? I've never heard of it,
> I can't find any direct links to it in google (only forum posts from
> years ago about how great it is) so I have no idea what you've done to
> your filesystem...
Sorry, I was writing that mail from a friend's computer, and
mistakenly typed xfs_recover, instead of xfs_repair.
> That looks like a newly made 20GB XFS filesystem, not the result of
> repairing a 350GB filesystem...
Since I formatted it as FAT16 first, it truncated the fs to 20GB. Then
calling xfs_repair caused the whole XFS partition appear as of size
20GB.
> If I were you, I'd be restoring from backups. You do have backups,
> right?
I cannot understand why people are so tempted to ask this question. If
I would have such a backup, do you think I still would be bugging you?
But to answer your question, yes, I had a backup, but it suffered from
a hardware failure just 2 days before the actual disk.
Regards.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recovering XFS Partition of Type FAT16
2011-07-07 11:32 ` Volkan YAZICI
@ 2011-07-07 15:53 ` Eric Sandeen
2011-07-07 19:57 ` Volkan YAZICI
0 siblings, 1 reply; 6+ messages in thread
From: Eric Sandeen @ 2011-07-07 15:53 UTC (permalink / raw)
To: Volkan YAZICI; +Cc: xfs
On 7/7/11 6:32 AM, Volkan YAZICI wrote:
> On Mon, Jul 4, 2011 at 3:49 PM, Dave Chinner <david@fromorbit.com> wrote:
>> On Mon, Jul 04, 2011 at 10:23:55AM +0000, Volkan YAZICI wrote:
>>> I have an XFS partition, which is
>>>
>>> 1) Mistakenly quick formatted as FAT16.
>>> 2) At first, I couldn't see in "fdisk -l" that it is set to FAT16,
>>> instead of Linux. Hence, tried to fix it with xfs_recover. xfs_recover
>>> returned 0, and mount operation succeeded; but mounted fs size
>>> appeared as 20GB (despite it is 350GB) and almost every file was
>>> missing.
>>> 3) Later, I set the type of /dev/sda1 (the only partition in /dev/sda)
>>> to Linux, re-run xfs_recover, but nothing changed: Same fs size (20GB)
>>> and same missing files.
>>
>> What is this xfs_recover tool you speak of? I've never heard of it,
>> I can't find any direct links to it in google (only forum posts from
>> years ago about how great it is) so I have no idea what you've done to
>> your filesystem...
>
> Sorry, I was writing that mail from a friend's computer, and
> mistakenly typed xfs_recover, instead of xfs_repair.
>
>> That looks like a newly made 20GB XFS filesystem, not the result of
>> repairing a 350GB filesystem...
>
> Since I formatted it as FAT16 first, it truncated the fs to 20GB. Then
> calling xfs_repair caused the whole XFS partition appear as of size
> 20GB.
It sounds like something changed your partition table as well as your
filesystem. Putting the partition table back in place first probably
would have been the better first step, in retrospect.
I can't tell for sure, though, what you've done (did you reparition?
mkfs? with which tools? what was the xfs_repair output?) so I'm not
sure what to tell you at this point.
-Eric
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recovering XFS Partition of Type FAT16
2011-07-07 15:53 ` Eric Sandeen
@ 2011-07-07 19:57 ` Volkan YAZICI
2011-07-07 20:15 ` Eric Sandeen
0 siblings, 1 reply; 6+ messages in thread
From: Volkan YAZICI @ 2011-07-07 19:57 UTC (permalink / raw)
To: Eric Sandeen; +Cc: xfs
On Thu, Jul 7, 2011 at 6:53 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
> It sounds like something changed your partition table as well as your
> filesystem. Putting the partition table back in place first probably
> would have been the better first step, in retrospect.
>
> I can't tell for sure, though, what you've done (did you reparition?
> mkfs? with which tools? what was the xfs_repair output?) so I'm not
> sure what to tell you at this point.
I was struggling to boot an ISO image from a USB disk, hence I suspect
that I had probably set the type of the host machine partition
(/dev/sda1) to FAT16 with fdisk, instead of USB disk partition
(/dev/sdb1). Then in the next boot, Linux doesn't come up and
complained about XFS issues. Hence I rebooted the machine and repaired
the fs with xfs_repair. This time partition is mounted properly but a
significant portion of the disk content is missing. Then in the fdisk
-l output I realized that /dev/sda1 is set to FAT16. (Isn't it strange
that I can xfs_repair and mount a partition of type FAT16?) Later I
set the type of /dev/sda1 to Linux, but nothing changed. I called
xfs_repair again and tried mounting again, no luck: same fs size
(20GB), same missing contents.
For the xfs_repair output... Honestly, I don't remember and I don't
think I can reproduce the situation.
Best.
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Recovering XFS Partition of Type FAT16
2011-07-07 19:57 ` Volkan YAZICI
@ 2011-07-07 20:15 ` Eric Sandeen
0 siblings, 0 replies; 6+ messages in thread
From: Eric Sandeen @ 2011-07-07 20:15 UTC (permalink / raw)
To: Volkan YAZICI; +Cc: xfs
On 7/7/11 2:57 PM, Volkan YAZICI wrote:
> On Thu, Jul 7, 2011 at 6:53 PM, Eric Sandeen <sandeen@sandeen.net> wrote:
>> It sounds like something changed your partition table as well as your
>> filesystem. Putting the partition table back in place first probably
>> would have been the better first step, in retrospect.
>>
>> I can't tell for sure, though, what you've done (did you reparition?
>> mkfs? with which tools? what was the xfs_repair output?) so I'm not
>> sure what to tell you at this point.
>
> I was struggling to boot an ISO image from a USB disk, hence I suspect
> that I had probably set the type of the host machine partition
> (/dev/sda1) to FAT16 with fdisk, instead of USB disk partition
well, almost nothing cares about the partition type, really...
not kernel, anyway, and not mount ...
> (/dev/sdb1). Then in the next boot, Linux doesn't come up and
> complained about XFS issues. Hence I rebooted the machine and repaired
> the fs with xfs_repair. This time partition is mounted properly but a
> significant portion of the disk content is missing. Then in the fdisk
> -l output I realized that /dev/sda1 is set to FAT16. (Isn't it strange
> that I can xfs_repair and mount a partition of type FAT16?) Later I
no, not really, (almost) nothing cares about those couple bytes in the
partition table...
> set the type of /dev/sda1 to Linux, but nothing changed. I called
> xfs_repair again and tried mounting again, no luck: same fs size
> (20GB), same missing contents.
>
> For the xfs_repair output... Honestly, I don't remember and I don't
> think I can reproduce the situation.
And I'm afraid I can't really imagine how you got here; apparently
your partition got shrunk, at least - and maybe mkfs'd as FAT?
And I don't think repair will cope well with a truncated block device...
perhaps your handy partitioning tool helpfully mkfs'd for you a few
times, as well...?
-Eric
>
> Best.
>
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2011-07-07 20:15 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-04 10:23 Recovering XFS Partition of Type FAT16 Volkan YAZICI
2011-07-04 12:49 ` Dave Chinner
2011-07-07 11:32 ` Volkan YAZICI
2011-07-07 15:53 ` Eric Sandeen
2011-07-07 19:57 ` Volkan YAZICI
2011-07-07 20:15 ` Eric Sandeen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox