public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user] ext3 partition dissapeared :(
@ 2007-01-23 11:11 jcd
  2007-01-23 15:39 ` Alan McKinnon
       [not found] ` <1169747460.12582.3.camel@paulie.kitchen>
  0 siblings, 2 replies; 16+ messages in thread
From: jcd @ 2007-01-23 11:11 UTC (permalink / raw
  To: gentoo-user

Hi.
I'm in bad situation. I have two physical disks. First (DiskA) have
200GB and second (DiskB) have 160GB capacity. On DiskB I have Linux
partitions and some data partitions. On DiskA I had had 40GB NTFS
(Windows) and 160GB NTFS partitions (data), but I already deleted
Windows partition. So, I copied data from 160GB partition on DiskA to
temporary space on DiskB, then I deleted remaining NTFS partition on
DiskA and created one 200GB ext3 partition (I think so. In cfdsik I
chose partition type '83 Linux') and then formatted it 'mke2fs
-j /dev/sdb1'. Then I copied (moved :( ) all the data back to DiskA and
everuthing was fine. It was yesterday. Today I started PC and at startup
init said "Some local filesystems failed to mount". OK, in /etc/fstab I
have "/dev/sdb1 /mnt/zaloha ext3 noatime 0 2" ... it seems to be good. I
also tried to change ext2, but with both 'mount -a' says:
mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
       missing codepage or other error
       In some cases useful info is found in syslog - try
       dmesg | tail  or so.
In /var/log/messages I found just "VFS: Can't find ext3 filesystem on
dev sdb1" :((. When I try just 'mount /dev/sdb1 /mnt/zaloha',
at /mnt/zaloha I have mounted that old Windows partition that I already
deleted. Do you know any solution how can I get back my ext3 partition
to get back my data please? And what could be cause of this problem or
when I can find what is the cause? Thanks very very much.


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 11:11 [gentoo-user] ext3 partition dissapeared :( jcd
@ 2007-01-23 15:39 ` Alan McKinnon
  2007-01-23 16:05   ` Sigfrido V. Ortiz C.
  2007-01-23 16:17   ` jcd
       [not found] ` <1169747460.12582.3.camel@paulie.kitchen>
  1 sibling, 2 replies; 16+ messages in thread
From: Alan McKinnon @ 2007-01-23 15:39 UTC (permalink / raw
  To: gentoo-user

On Tuesday 23 January 2007 13:11, jcd wrote:
> Hi.
> I'm in bad situation. I have two physical disks. First (DiskA) have
> 200GB and second (DiskB) have 160GB capacity. On DiskB I have Linux
> partitions and some data partitions. On DiskA I had had 40GB NTFS
> (Windows) and 160GB NTFS partitions (data), but I already deleted
> Windows partition. So, I copied data from 160GB partition on DiskA to
> temporary space on DiskB, then I deleted remaining NTFS partition on
> DiskA and created one 200GB ext3 partition (I think so. In cfdsik I
> chose partition type '83 Linux') and then formatted it 'mke2fs
> -j /dev/sdb1'. Then I copied (moved :( ) all the data back to DiskA
> and everuthing was fine. It was yesterday. Today I started PC and at
> startup init said "Some local filesystems failed to mount". OK, in
> /etc/fstab I have "/dev/sdb1 /mnt/zaloha ext3 noatime 0 2" ... it
> seems to be good. I also tried to change ext2, but with both 'mount
> -a' says:
> mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
>        missing codepage or other error
>        In some cases useful info is found in syslog - try
>        dmesg | tail  or so.
> In /var/log/messages I found just "VFS: Can't find ext3 filesystem on
> dev sdb1" :((. When I try just 'mount /dev/sdb1 /mnt/zaloha',
> at /mnt/zaloha I have mounted that old Windows partition that I
> already deleted. Do you know any solution how can I get back my ext3
> partition to get back my data please? And what could be cause of this
> problem or when I can find what is the cause? Thanks very very much.

You've given lots of words, but very very little information, not even 
the commands you used to perform these actions. Without this info it 
becomes very hard to help you out.

Meantime, please provide the output of the following commands:

fdisk -l
fsck /dev/sdb1
mount /dev/sdb1 /some/mount/point

and we'll take it from there

alan

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 15:39 ` Alan McKinnon
@ 2007-01-23 16:05   ` Sigfrido V. Ortiz C.
  2007-01-23 20:55     ` Alan McKinnon
  2007-01-23 16:17   ` jcd
  1 sibling, 1 reply; 16+ messages in thread
From: Sigfrido V. Ortiz C. @ 2007-01-23 16:05 UTC (permalink / raw
  To: gentoo-user

Try fsck --help
then select the options related to recovery  and repair the system file
at least twice, then reboot your system with "shutdown -b now"

Based in my experience this occur after shutdown by power fault and not
by command.
The format must be fsck -p -f /dev/partition_name

the flag -p will repair automatically your system and the flag -f force
the revision even the file system appear like clean.
Good luck!!!
Sigfrido

alan@linuxholdings.co.za wrote:
> On Tuesday 23 January 2007 13:11, jcd wrote:
> 
>>Hi.
>>I'm in bad situation. I have two physical disks. First (DiskA) have
>>200GB and second (DiskB) have 160GB capacity. On DiskB I have Linux
>>partitions and some data partitions. On DiskA I had had 40GB NTFS
>>(Windows) and 160GB NTFS partitions (data), but I already deleted
>>Windows partition. So, I copied data from 160GB partition on DiskA to
>>temporary space on DiskB, then I deleted remaining NTFS partition on
>>DiskA and created one 200GB ext3 partition (I think so. In cfdsik I
>>chose partition type '83 Linux') and then formatted it 'mke2fs
>>-j /dev/sdb1'. Then I copied (moved :( ) all the data back to DiskA
>>and everuthing was fine. It was yesterday. Today I started PC and at
>>startup init said "Some local filesystems failed to mount". OK, in
>>/etc/fstab I have "/dev/sdb1 /mnt/zaloha ext3 noatime 0 2" ... it
>>seems to be good. I also tried to change ext2, but with both 'mount
>>-a' says:
>>mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
>>       missing codepage or other error
>>       In some cases useful info is found in syslog - try
>>       dmesg | tail  or so.
>>In /var/log/messages I found just "VFS: Can't find ext3 filesystem on
>>dev sdb1" :((. When I try just 'mount /dev/sdb1 /mnt/zaloha',
>>at /mnt/zaloha I have mounted that old Windows partition that I
>>already deleted. Do you know any solution how can I get back my ext3
>>partition to get back my data please? And what could be cause of this
>>problem or when I can find what is the cause? Thanks very very much.
> 
> 
> You've given lots of words, but very very little information, not even 
> the commands you used to perform these actions. Without this info it 
> becomes very hard to help you out.
> 
> Meantime, please provide the output of the following commands:
> 
> fdisk -l
> fsck /dev/sdb1
> mount /dev/sdb1 /some/mount/point
> 
> and we'll take it from there
> 
> alan
> 


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 15:39 ` Alan McKinnon
  2007-01-23 16:05   ` Sigfrido V. Ortiz C.
@ 2007-01-23 16:17   ` jcd
  2007-01-23 17:47     ` Hans-Werner Hilse
  1 sibling, 1 reply; 16+ messages in thread
From: jcd @ 2007-01-23 16:17 UTC (permalink / raw
  To: gentoo-user

Alan McKinnon píše v Út 23. 01. 2007 v 16:39 +0100:
> On Tuesday 23 January 2007 13:11, jcd wrote:
> > Hi.
> > I'm in bad situation. I have two physical disks. First (DiskA) have
> > 200GB and second (DiskB) have 160GB capacity. On DiskB I have Linux
> > partitions and some data partitions. On DiskA I had had 40GB NTFS
> > (Windows) and 160GB NTFS partitions (data), but I already deleted
> > Windows partition. So, I copied data from 160GB partition on DiskA to
> > temporary space on DiskB, then I deleted remaining NTFS partition on
> > DiskA and created one 200GB ext3 partition (I think so. In cfdsik I
> > chose partition type '83 Linux') and then formatted it 'mke2fs
> > -j /dev/sdb1'. Then I copied (moved :( ) all the data back to DiskA
> > and everuthing was fine. It was yesterday. Today I started PC and at
> > startup init said "Some local filesystems failed to mount". OK, in
> > /etc/fstab I have "/dev/sdb1 /mnt/zaloha ext3 noatime 0 2" ... it
> > seems to be good. I also tried to change ext2, but with both 'mount
> > -a' says:
> > mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
> >        missing codepage or other error
> >        In some cases useful info is found in syslog - try
> >        dmesg | tail  or so.
> > In /var/log/messages I found just "VFS: Can't find ext3 filesystem on
> > dev sdb1" :((. When I try just 'mount /dev/sdb1 /mnt/zaloha',
> > at /mnt/zaloha I have mounted that old Windows partition that I
> > already deleted. Do you know any solution how can I get back my ext3
> > partition to get back my data please? And what could be cause of this
> > problem or when I can find what is the cause? Thanks very very much.
> 
> You've given lots of words, but very very little information, not even 
> the commands you used to perform these actions. Without this info it 
> becomes very hard to help you out.
> 
> Meantime, please provide the output of the following commands:
> 
> fdisk -l
> fsck /dev/sdb1
> mount /dev/sdb1 /some/mount/point
> 
> and we'll take it from there
> 
> alan
> 

OK. Here it is (I confused First disk capacity, 250GB instead of 200GB):

------------------------------------------------------------------------
#fdisk -l /dev/sdb
Disk /dev/sdb: 250.0 GB, 250059350016 bytes
240 heads, 63 sectors/track, 32301 cylinders
Units = cylindry of 15120 * 512 = 7741440 bytes

 Device   Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       32301   244195528+  83  Linux
------------------------------------------------------------------------

------------------------------------------------------------------------
#fsck /dev/sdb1
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
Couldn't find ext2 superblock, trying backup blocks...
fsck.ext3: Bad magic number in super-block while trying to
open /dev/sdb1

The superblock could not be read or does not describe a correct ext2
filesystem.  If the device is valid and it really contains an ext2
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate
superblock:
    e2fsck -b 8193 <device>
------------------------------------------------------------------------

When I do "mount /dev/sdb1 /mnt/zaloha" at /mnt/zaloha I see that old
Windows NTFS partition that I already deleted (There are "Program
Files", "WINDOWS", ...). I don't understand why (somewhere I read that
ext3 start writing at the middle of the disk space to prevent
defragmentation).


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 16:17   ` jcd
@ 2007-01-23 17:47     ` Hans-Werner Hilse
  2007-01-23 20:55       ` Alan McKinnon
  0 siblings, 1 reply; 16+ messages in thread
From: Hans-Werner Hilse @ 2007-01-23 17:47 UTC (permalink / raw
  To: gentoo-user

Hi,

On Tue, 23 Jan 2007 17:17:58 +0100
jcd <jcd@seznam.cz> wrote:

> > > So, I copied data from 160GB partition on DiskA to
> > > temporary space on DiskB, then I deleted remaining NTFS partition on
> > > DiskA and created one 200GB ext3 partition (I think so. In cfdsik I
> > > chose partition type '83 Linux') and then formatted it 'mke2fs
> > > -j /dev/sdb1'. Then I copied (moved :( ) all the data back to DiskA
> > > and everuthing was fine.

Did you reboot between changing the partition layout and creating that
new partition (and moving data)? Otherwise the kernel wouldn't be aware
of the new partition layout. Well, if everything you wrote is
correct, that data should have ended up on that former Windows
partition and that partition should now be an ext3 one. But if you just
didn't care and mounted the old linux partition (sdb2 at that point in
time before the new partition layout), copied data and you _then_
rebooted -- then you would have written your data to a partition that
was only a reminiscence in the kernel's structures and not
corresponding to what cfdisk wrote to the HD. That would be an
explanation why the next boot failed.

> When I do "mount /dev/sdb1 /mnt/zaloha" at /mnt/zaloha I see that old
> Windows NTFS partition that I already deleted (There are "Program
> Files", "WINDOWS", ...). I don't understand why (somewhere I read that
> ext3 start writing at the middle of the disk space to prevent
> defragmentation).

Deleting the partition is something that only affects the boot sector.
Ext3 should in fact have overwritten this with it's first superblock.
So the mkext2fs you issued did definitively hit the wrong partition.

So my suggestion is: try "gpart -w ext2,1.5 /dev/sdb" to find your
partition (even better: write back the backup you've made from the old
partition table. Errrm...)

-hwh
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 17:47     ` Hans-Werner Hilse
@ 2007-01-23 20:55       ` Alan McKinnon
  2007-01-24 18:09         ` jcd
  2007-01-24 18:37         ` jcd
  0 siblings, 2 replies; 16+ messages in thread
From: Alan McKinnon @ 2007-01-23 20:55 UTC (permalink / raw
  To: gentoo-user

On Tuesday 23 January 2007 19:47, Hans-Werner Hilse wrote:

> Did you reboot between changing the partition layout and creating
> that new partition (and moving data)? Otherwise the kernel wouldn't
> be aware of the new partition layout. Well, if everything you wrote
> is correct, that data should have ended up on that former Windows
> partition and that partition should now be an ext3 one. But if you
> just didn't care and mounted the old linux partition (sdb2 at that
> point in time before the new partition layout), copied data and you
> _then_ rebooted -- then you would have written your data to a
> partition that was only a reminiscence in the kernel's structures and
> not
> corresponding to what cfdisk wrote to the HD. That would be an
> explanation why the next boot failed.
>
> > When I do "mount /dev/sdb1 /mnt/zaloha" at /mnt/zaloha I see that
> > old Windows NTFS partition that I already deleted (There are
> > "Program Files", "WINDOWS", ...). I don't understand why (somewhere
> > I read that ext3 start writing at the middle of the disk space to
> > prevent defragmentation).
>
> Deleting the partition is something that only affects the boot
> sector. Ext3 should in fact have overwritten this with it's first
> superblock. So the mkext2fs you issued did definitively hit the wrong
> partition.
>
> So my suggestion is: try "gpart -w ext2,1.5 /dev/sdb" to find your
> partition (even better: write back the backup you've made from the
> old partition table. Errrm...)

Some background here to elaborate on what Hans has said:

It looks like when you moved the data onto the new partition, it got 
written somewhere on the disk. However, the kernel's idea of how the 
partitions are laid out at that time and what fdisk just wrote to the 
disk probably don't agree and the kernel had got it wrong.... This does 
happen when you delete two or more partitions and create one large one.

That's the bad news. The good news is that unless you did something to 
wipe the disk clean, the data is there somewhere and you need to find 
it. Hans' gpart command will search the disk looking for the sequence 
of data that is found at the start of a filesystem, and will then make 
a smart estimate as to what the partition ought to look like.

The next good news is that you can create and delete partitions many 
times and still get the data back intact as long as you don't overwrite 
it. fdisk updates the partition table right at the start of the disk 
and does nothing else so you can always undo these changes. Until you 
are happy that everything is back it will be smart to mount this 
partition read-only so it can't be changed:

mount -o rw /dev/sdb1 /path/to/mount/point

You say in your original mail that after moving the data "everything was 
fine". What exactly do you mean by that:

1. The command ended without failure so you assume it moved stuff 
correctly, or
2. You proved the move was done by mounting the partition and all your 
files were there, or
3. Some other reason?

alan

-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 16:05   ` Sigfrido V. Ortiz C.
@ 2007-01-23 20:55     ` Alan McKinnon
  0 siblings, 0 replies; 16+ messages in thread
From: Alan McKinnon @ 2007-01-23 20:55 UTC (permalink / raw
  To: gentoo-user

On Tuesday 23 January 2007 18:05, Sigfrido V. Ortiz C. wrote:
> Try fsck --help
> then select the options related to recovery  and repair the system
> file at least twice, then reboot your system with "shutdown -b now"
>
> Based in my experience this occur after shutdown by power fault and
> not by command.
> The format must be fsck -p -f /dev/partition_name
>
> the flag -p will repair automatically your system and the flag -f
> force the revision even the file system appear like clean.
> Good luck!!!
> Sigfrido

Hi,

Please don't top post. If you know the fsck command then you know why I 
have asked this.

I wouldn't advise that the OP follows your advise - from the way he 
wrote his post it is very likely he doesn't know a whole lot about 
filesystems and fsck programs. So he will blindly enter your commands, 
forcing an action to occur and potentially causing further loss without 
him having much of a clue about what he has just done.

The force flag is useful, after you get an output from fsck and you know 
what it will do and are prepared to accept the loss. jcd isn't in that 
position.

jcd, what you should do is gather information about what happened and 
try figure it out. If you can't, lots of people here will decrypt it 
for you (as much as possible) then tell you what to do and explain what 
will happen as a result. 

The golden rule: don't ever run a file system checker blindly without 
some understanding of what it's doing.
>
> alan@linuxholdings.co.za wrote:
> > On Tuesday 23 January 2007 13:11, jcd wrote:
> >>Hi.
> >>I'm in bad situation. I have two physical disks. First (DiskA) have
> >>200GB and second (DiskB) have 160GB capacity. On DiskB I have Linux
> >>partitions and some data partitions. On DiskA I had had 40GB NTFS
> >>(Windows) and 160GB NTFS partitions (data), but I already deleted
> >>Windows partition. So, I copied data from 160GB partition on DiskA
> >> to temporary space on DiskB, then I deleted remaining NTFS
> >> partition on DiskA and created one 200GB ext3 partition (I think
> >> so. In cfdsik I chose partition type '83 Linux') and then
> >> formatted it 'mke2fs -j /dev/sdb1'. Then I copied (moved :( ) all
> >> the data back to DiskA and everuthing was fine. It was yesterday.
> >> Today I started PC and at startup init said "Some local
> >> filesystems failed to mount". OK, in /etc/fstab I have "/dev/sdb1
> >> /mnt/zaloha ext3 noatime 0 2" ... it seems to be good. I also
> >> tried to change ext2, but with both 'mount -a' says:
> >>mount: wrong fs type, bad option, bad superblock on /dev/sdb1,
> >>       missing codepage or other error
> >>       In some cases useful info is found in syslog - try
> >>       dmesg | tail  or so.
> >>In /var/log/messages I found just "VFS: Can't find ext3 filesystem
> >> on dev sdb1" :((. When I try just 'mount /dev/sdb1 /mnt/zaloha',
> >> at /mnt/zaloha I have mounted that old Windows partition that I
> >> already deleted. Do you know any solution how can I get back my
> >> ext3 partition to get back my data please? And what could be cause
> >> of this problem or when I can find what is the cause? Thanks very
> >> very much.
> >
> > You've given lots of words, but very very little information, not
> > even the commands you used to perform these actions. Without this
> > info it becomes very hard to help you out.
> >
> > Meantime, please provide the output of the following commands:
> >
> > fdisk -l
> > fsck /dev/sdb1
> > mount /dev/sdb1 /some/mount/point
> >
> > and we'll take it from there
> >
> > alan
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 20:55       ` Alan McKinnon
@ 2007-01-24 18:09         ` jcd
  2007-01-24 18:37         ` jcd
  1 sibling, 0 replies; 16+ messages in thread
From: jcd @ 2007-01-24 18:09 UTC (permalink / raw
  To: gentoo-user

Alan McKinnon píše v Út 23. 01. 2007 v 21:55 +0100:
> On Tuesday 23 January 2007 19:47, Hans-Werner Hilse wrote:
> 
> > Did you reboot between changing the partition layout and creating
> > that new partition (and moving data)? Otherwise the kernel wouldn't
> > be aware of the new partition layout. Well, if everything you wrote
> > is correct, that data should have ended up on that former Windows
> > partition and that partition should now be an ext3 one. But if you
> > just didn't care and mounted the old linux partition (sdb2 at that
> > point in time before the new partition layout), copied data and you
> > _then_ rebooted -- then you would have written your data to a
> > partition that was only a reminiscence in the kernel's structures and
> > not
> > corresponding to what cfdisk wrote to the HD. That would be an
> > explanation why the next boot failed.
> >
> > > When I do "mount /dev/sdb1 /mnt/zaloha" at /mnt/zaloha I see that
> > > old Windows NTFS partition that I already deleted (There are
> > > "Program Files", "WINDOWS", ...). I don't understand why (somewhere
> > > I read that ext3 start writing at the middle of the disk space to
> > > prevent defragmentation).
> >
> > Deleting the partition is something that only affects the boot
> > sector. Ext3 should in fact have overwritten this with it's first
> > superblock. So the mkext2fs you issued did definitively hit the wrong
> > partition.
> >
> > So my suggestion is: try "gpart -w ext2,1.5 /dev/sdb" to find your
> > partition (even better: write back the backup you've made from the
> > old partition table. Errrm...)
> 
> Some background here to elaborate on what Hans has said:
> 
> It looks like when you moved the data onto the new partition, it got 
> written somewhere on the disk. However, the kernel's idea of how the 
> partitions are laid out at that time and what fdisk just wrote to the 
> disk probably don't agree and the kernel had got it wrong.... This does 
> happen when you delete two or more partitions and create one large one.
> 
> That's the bad news. The good news is that unless you did something to 
> wipe the disk clean, the data is there somewhere and you need to find 
> it. Hans' gpart command will search the disk looking for the sequence 
> of data that is found at the start of a filesystem, and will then make 
> a smart estimate as to what the partition ought to look like.
> 
> The next good news is that you can create and delete partitions many 
> times and still get the data back intact as long as you don't overwrite 
> it. fdisk updates the partition table right at the start of the disk 
> and does nothing else so you can always undo these changes. Until you 
> are happy that everything is back it will be smart to mount this 
> partition read-only so it can't be changed:
> 
> mount -o rw /dev/sdb1 /path/to/mount/point
> 
> You say in your original mail that after moving the data "everything was 
> fine". What exactly do you mean by that:
> 
> 1. The command ended without failure so you assume it moved stuff 
> correctly, or
> 2. You proved the move was done by mounting the partition and all your 
> files were there, or
> 3. Some other reason?
> 
> alan
> 



-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-23 20:55       ` Alan McKinnon
  2007-01-24 18:09         ` jcd
@ 2007-01-24 18:37         ` jcd
  2007-01-25  7:54           ` Alan McKinnon
  1 sibling, 1 reply; 16+ messages in thread
From: jcd @ 2007-01-24 18:37 UTC (permalink / raw
  To: gentoo-user

> You say in your original mail that after moving the data "everything was 
> fine". What exactly do you mean by that:
> 
> 1. The command ended without failure so you assume it moved stuff 
> correctly, or
> 2. You proved the move was done by mounting the partition and all your 
> files were there, or
> 3. Some other reason?
> 
> alan

"Everything was fine" mean; I created partition and then formatted it
without any errors or warnings. There are messages from syslog:
-----------------------------------------------------------------------
Jan 22 23:43:16 localhost EXT3 FS on sdb1, internal journal
Jan 22 23:43:16 localhost EXT3-fs: mounted filesystem with ordered data
mode.
-----------------------------------------------------------------------
Then I copied my data to this new partition. I could access this data
from new partition without any problems. Next day:
-----------------------------------------------------------------------
Jan 23 10:23:46 localhost VFS: Can't find ext3 filesystem on dev sdb1.
-----------------------------------------------------------------------

> It looks like when you moved the data onto the new partition, it got 
> written somewhere on the disk. However, the kernel's idea of how the 
> partitions are laid out at that time and what fdisk just wrote to the 
> disk probably don't agree and the kernel had got it wrong.... This does 
> happen when you delete two or more partitions and create one large one.

Why it can happen when replacing two partitions with large one?

I tried gpart with this output:
-----------------------------------------------------------------------
#gpart /dev/sdb
Begin scan...
Possible partition(Windows NT/W2K FS), size(40959mb), offset(0mb)
Possible partition(Linux ext2), size(197512mb), offset(40959mb)
End scan.

Checking partitions...
Partition(OS/2 HPFS, NTFS, QNX or Advanced UNIX): primary 
Partition(Linux ext2 filesystem): primary 
Ok.

Guessed primary partition table:
Primary partition(1)
   type: 007(0x07)(OS/2 HPFS, NTFS, QNX or Advanced UNIX)
   size: 40959mb #s(83885696) s(63-83885758)
   chs:  (0/1/1)-(1023/239/63)d (0/1/1)-(5547/239/62)r

Primary partition(2)
   type: 131(0x83)(Linux ext2 filesystem)
   size: 197512mb #s(404505360) s(83885760-488391119)
   chs:  (1023/239/63)-(1023/239/63)d (5548/0/1)-(32300/239/63)r

Primary partition(3)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r

Primary partition(4)
   type: 000(0x00)(unused)
   size: 0mb #s(0) s(0-0)
   chs:  (0/0/0)-(0/0/0)d (0/0/0)-(0/0/0)r
-----------------------------------------------------------------------
I also tried it with data about cylinders, sectors and heads taken from 'fdisk -l /dev/sdb'.
It produces same output. But I created ext3 on whole disk, I'm sure.


-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-24 18:37         ` jcd
@ 2007-01-25  7:54           ` Alan McKinnon
  2007-01-25  9:12             ` Neil Bothwick
  2007-01-25 11:25             ` jcd
  0 siblings, 2 replies; 16+ messages in thread
From: Alan McKinnon @ 2007-01-25  7:54 UTC (permalink / raw
  To: gentoo-user

On Wednesday 24 January 2007 20:37, jcd wrote:

[snip]

> "Everything was fine" mean; I created partition and then formatted it
> without any errors or warnings. There are messages from syslog:
> ---------------------------------------------------------------------
>-- Jan 22 23:43:16 localhost EXT3 FS on sdb1, internal journal
> Jan 22 23:43:16 localhost EXT3-fs: mounted filesystem with ordered
> data mode.
> ---------------------------------------------------------------------
>-- Then I copied my data to this new partition. I could access this
> data from new partition without any problems. Next day:

OK, so we will assume that the data was written correctly

> ---------------------------------------------------------------------
>-- Jan 23 10:23:46 localhost VFS: Can't find ext3 filesystem on dev
> sdb1.
> ---------------------------------------------------------------------
>--
>
> > It looks like when you moved the data onto the new partition, it
> > got written somewhere on the disk. However, the kernel's idea of
> > how the partitions are laid out at that time and what fdisk just
> > wrote to the disk probably don't agree and the kernel had got it
> > wrong.... This does happen when you delete two or more partitions
> > and create one large one.
>
> Why it can happen when replacing two partitions with large one?

First thing to know, is that the PC has the most insane internal design 
of any electronic device ever made anywhere in the world at any time, 
ever. (Well, Thomson aircraft radios are actually worse, but you get 
the idea...). The result is that not everything makes sense... When the 
kernel boots, it reads the partition table off disk and knows that the 
first partition starts at cylinder 0 and the second partition starts at 
say cylinder 2000. The kernel doesn't update this information when you 
run fdisk, so if you delete two partitions and create one big one, the 
kernel can get confused. It's not hard to fix on the PC, but Linux runs 
on 20 architectures that are not all as crazy as Intel PCs, which might 
be why this oddity is still there are 15 years. Redhat have a utility 
called partprobe that gets everything back in sync after using fdisk, 
but I have yet to find it in Portage

> I tried gpart with this output:
> ---------------------------------------------------------------------
>-- #gpart /dev/sdb
> Begin scan...
> Possible partition(Windows NT/W2K FS), size(40959mb), offset(0mb)
> Possible partition(Linux ext2), size(197512mb), offset(40959mb)
> End scan.

[snip]

According to this you have an ext2/3 partition as the SECOND partition, 
not the first, and it does not cover the whole disk.

Are you absolutely sure you pressed "w" in fdisk after creating the 
partitions? It sure looks to me like your changes were not written to 
disk. Try mounting /dev/sdb2

alan
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-25  7:54           ` Alan McKinnon
@ 2007-01-25  9:12             ` Neil Bothwick
  2007-01-25  9:28               ` Alan McKinnon
  2007-01-25 11:25             ` jcd
  1 sibling, 1 reply; 16+ messages in thread
From: Neil Bothwick @ 2007-01-25  9:12 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 948 bytes --]

On Thu, 25 Jan 2007 09:54:51 +0200, Alan McKinnon wrote:

> When the 
> kernel boots, it reads the partition table off disk and knows that the 
> first partition starts at cylinder 0 and the second partition starts at 
> say cylinder 2000. The kernel doesn't update this information when you 
> run fdisk, so if you delete two partitions and create one big one, the 
> kernel can get confused. It's not hard to fix on the PC, but Linux runs 
> on 20 architectures that are not all as crazy as Intel PCs, which might 
> be why this oddity is still there are 15 years. Redhat have a utility 
> called partprobe that gets everything back in sync after using fdisk, 
> but I have yet to find it in Portage

You can do this with "hdparm -z". If it reports an error, you'll need to
reboot to ensure the kernel's partition table is up to date.


-- 
Neil Bothwick

There is absolutely no substitute for a genuine lack of preparation.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-25  9:12             ` Neil Bothwick
@ 2007-01-25  9:28               ` Alan McKinnon
  2007-01-25  9:40                 ` Neil Bothwick
  0 siblings, 1 reply; 16+ messages in thread
From: Alan McKinnon @ 2007-01-25  9:28 UTC (permalink / raw
  To: gentoo-user

On Thursday 25 January 2007 11:12, Neil Bothwick wrote:
> On Thu, 25 Jan 2007 09:54:51 +0200, Alan McKinnon wrote:
> > When the
> > kernel boots, it reads the partition table off disk and knows that
> > the first partition starts at cylinder 0 and the second partition
> > starts at say cylinder 2000. The kernel doesn't update this
> > information when you run fdisk, so if you delete two partitions and
> > create one big one, the kernel can get confused. It's not hard to
> > fix on the PC, but Linux runs on 20 architectures that are not all
> > as crazy as Intel PCs, which might be why this oddity is still
> > there are 15 years. Redhat have a utility called partprobe that
> > gets everything back in sync after using fdisk, but I have yet to
> > find it in Portage
>
> You can do this with "hdparm -z". If it reports an error, you'll need
> to reboot to ensure the kernel's partition table is up to date.

Ah, but I don't want to reboot to update the kernels' view of things. 
All I want to do is run partprobe and then carry on working. It should 
not be necessary to reboot to do this.

But Google just helped me find it - partprobe is in the parted package

alan



-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-25  9:28               ` Alan McKinnon
@ 2007-01-25  9:40                 ` Neil Bothwick
  0 siblings, 0 replies; 16+ messages in thread
From: Neil Bothwick @ 2007-01-25  9:40 UTC (permalink / raw
  To: gentoo-user

[-- Attachment #1: Type: text/plain, Size: 747 bytes --]

On Thu, 25 Jan 2007 11:28:03 +0200, Alan McKinnon wrote:

> > You can do this with "hdparm -z". If it reports an error, you'll need
> > to reboot to ensure the kernel's partition table is up to date.  
> 
> Ah, but I don't want to reboot to update the kernels' view of things. 

Who does?

> All I want to do is run partprobe and then carry on working. It should 
> not be necessary to reboot to do this.

Unfortunately, that's not always the case. hdparm -z sometimes allows you
to do this, but at least when it fails you are warned of the dangers of
carrying on without rebooting. Reboots are inconvenient, but data loss is
far worse.


-- 
Neil Bothwick

"Bother", said Pooh, as he put the message in the wrong conference

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-25  7:54           ` Alan McKinnon
  2007-01-25  9:12             ` Neil Bothwick
@ 2007-01-25 11:25             ` jcd
  2007-01-25 13:45               ` Hans-Werner Hilse
  1 sibling, 1 reply; 16+ messages in thread
From: jcd @ 2007-01-25 11:25 UTC (permalink / raw
  To: gentoo-user

> Are you absolutely sure you pressed "w" in fdisk after creating the 
> partitions? It sure looks to me like your changes were not written to 
> disk. Try mounting /dev/sdb2
> 
> alan

I used cfdisk and I'm sure that I allocated whole disk (I just deleted
remaining partition and created new one and just confirm size, because
it should take whole disk, and even if not, it souldn't create new
partition on empty disk beyond some other 'non-existing' partition so
I'm sure I made a good job of it) and saved changes (it prompted me for
writing new partition table). I haven't any /dev/sdb2, just /dev/sdb1.
It seems it is really bad situation for me :(. 

	So for future is there any way to log more detailed info about these
things (besides info about creating ext3 partition even info about size
of this partition)?

	Does kernel produce these messages?

	Should I run 'hdparm -z' after creating new patition in future?

	And because I don't want to tease you any more, please give me some
last solution what shoudl I do (forlorn hope).



-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
  2007-01-25 11:25             ` jcd
@ 2007-01-25 13:45               ` Hans-Werner Hilse
  0 siblings, 0 replies; 16+ messages in thread
From: Hans-Werner Hilse @ 2007-01-25 13:45 UTC (permalink / raw
  To: gentoo-user

Hi,

On Thu, 25 Jan 2007 12:25:20 +0100 jcd <jcd@seznam.cz> wrote:

> I used cfdisk and I'm sure that I allocated whole disk (I just deleted
> remaining partition and created new one and just confirm size, because
> it should take whole disk, and even if not, it souldn't create new
> partition on empty disk beyond some other 'non-existing' partition so
> I'm sure I made a good job of it) and saved changes (it prompted me
> for writing new partition table). I haven't any /dev/sdb2,
> just /dev/sdb1. It seems it is really bad situation for me :(.

No, it probably isn't.
In order to be sure next time, do a "cat /proc/partitions" after using
fdisk. That will show what the kernel thinks your partition layout is.

> 	So for future is there any way to log more detailed info
> about these things (besides info about creating ext3 partition even
> info about size of this partition)?

Just backup your partition table next time. That will cost only about
512 Byte (actually, less than that) and save you some stress.

> 	Should I run 'hdparm -z' after creating new patition in
> future?

Or reboot/kexec. Or use a similar functionality built into fdisk.

> 	And because I don't want to tease you any more, please give
> me some last solution what shoudl I do (forlorn hope).

I did already in my last answer. Extract that partition (i.e. copy it
onto another drive) or try to recreate a valid partition table. Gpart
told you where the partition is hiding.

-hwh
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

* Re: [gentoo-user] ext3 partition dissapeared :(
       [not found] ` <1169747460.12582.3.camel@paulie.kitchen>
@ 2007-01-25 18:33   ` Sigfrido V. Ortiz C.
  0 siblings, 0 replies; 16+ messages in thread
From: Sigfrido V. Ortiz C. @ 2007-01-25 18:33 UTC (permalink / raw
  To: gentoo-user

Congratulation, I'm happy too, It means that our community works!!!

jcd@seznam.cz wrote:
> Hi. Here are what I did:
> 
> gpart -W /dev/sdb
> hdparm -z /dev/sdb (Without any warnings)
> mount /dev/sdb2 /mnt/zaloha
> 
> and I get my data back. Thaks very very much everybody here. I learned
> many new things from your approach. "Ať žije Gentoo"
> 
-- 
gentoo-user@gentoo.org mailing list



^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2007-01-25 18:47 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-01-23 11:11 [gentoo-user] ext3 partition dissapeared :( jcd
2007-01-23 15:39 ` Alan McKinnon
2007-01-23 16:05   ` Sigfrido V. Ortiz C.
2007-01-23 20:55     ` Alan McKinnon
2007-01-23 16:17   ` jcd
2007-01-23 17:47     ` Hans-Werner Hilse
2007-01-23 20:55       ` Alan McKinnon
2007-01-24 18:09         ` jcd
2007-01-24 18:37         ` jcd
2007-01-25  7:54           ` Alan McKinnon
2007-01-25  9:12             ` Neil Bothwick
2007-01-25  9:28               ` Alan McKinnon
2007-01-25  9:40                 ` Neil Bothwick
2007-01-25 11:25             ` jcd
2007-01-25 13:45               ` Hans-Werner Hilse
     [not found] ` <1169747460.12582.3.camel@paulie.kitchen>
2007-01-25 18:33   ` Sigfrido V. Ortiz C.

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox