* "Unformat" a ReiserFS partition : a testimony :-) @ 2003-03-24 19:36 Nicolas Vanderavero 2003-03-25 0:16 ` Yury Umanets 0 siblings, 1 reply; 8+ messages in thread From: Nicolas Vanderavero @ 2003-03-24 19:36 UTC (permalink / raw) To: reiserfs-list Hello, while reinstalling a Debian on a new hard drive, I made the mistake to format in reiserfs my good old /home which was on /dev/sda7 instead of formatting the new /dev/hda7. Gasp ! Eight gigabytes lost ... Or ... maybe it was not totally lost :-) I immediately made a dump of the partition with 'dd' and started grepping some known text on it. It seemed that no data was really lost. I didn't know what to do. So I read the man pages and found the reiserfsck command quite interesting :-) Ok, I am a total newbie to filesystems and to ReiserFS. So maybe it will sound trivial to you, but just in case it happens to anyone else, I just wanted to say that running a reiserfsck --rebuild-tree -S on my partition was enough to unformat it. I ended up with some file in lost+found, but a 'file *' is enough to discover what they are. So, maybe it would be usefull to add an entry in the "Example of using" section of the man page of reiserfsck, saying something like : "If you reformatted by mistake a reiserFS partition, you can try to unformat it by running reiserfsck --rebuild-tree -S on it". Anyway, thank you for developing this filesystem. Nicolas Vanderavero. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "Unformat" a ReiserFS partition : a testimony :-) 2003-03-24 19:36 "Unformat" a ReiserFS partition : a testimony :-) Nicolas Vanderavero @ 2003-03-25 0:16 ` Yury Umanets 2003-03-25 0:48 ` Manuel Krause 2003-03-25 17:25 ` Vitaly Fertman 0 siblings, 2 replies; 8+ messages in thread From: Yury Umanets @ 2003-03-25 0:16 UTC (permalink / raw) To: Nicolas Vanderavero; +Cc: reiserfs-list Nicolas Vanderavero wrote: > Hello, Hello Nicolas, > > > while reinstalling a Debian on a new hard drive, I made the mistake to > format in reiserfs my good old /home which was on /dev/sda7 instead of > formatting the new /dev/hda7. Gasp ! Eight gigabytes lost ... > > Or ... maybe it was not totally lost :-) I immediately made a dump of > the partition with 'dd' and started grepping some known text on it. It > seemed that no data was really lost. I didn't know what to do. So I > read the man pages and found the reiserfsck command quite interesting :-) You have lost the super block and probably old root node. I said "probably" because it might be not used in teh time you did format. > > > Ok, I am a total newbie to filesystems and to ReiserFS. So maybe it > will sound trivial to you, but just in case it happens to anyone else, > I just wanted to say that running a reiserfsck --rebuild-tree -S on my > partition was enough to unformat it. I ended up with some file in > lost+found, but a 'file *' is enough to discover what they are. The first thing you should do in cases like this is to make backup. I hope you'll find eight gigabytes for that. Now you may feel free to do anything with you old partition. Then you should to do --rebuild-sb and try to fsck the partition with --check key. Then follow to fsck sugestions. These should be enought for getting you partition back. > > > So, maybe it would be usefull to add an entry in the "Example of > using" section of the man page of reiserfsck, saying something like : > "If you reformatted by mistake a reiserFS partition, you can try to > unformat it by running reiserfsck --rebuild-tree -S on it". Sounds good. Probably Vitaly should consider about that for including it in the next fsck -pre. > > > Anyway, thank you for developing this filesystem. > Nicolas Vanderavero. > > > > > > P.S. Please read http://www.namesys.com/support.html. Can you as for support? -- Yury Umanets ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "Unformat" a ReiserFS partition : a testimony :-) 2003-03-25 0:16 ` Yury Umanets @ 2003-03-25 0:48 ` Manuel Krause 2003-03-25 1:26 ` Yury Umanets 2003-03-25 17:25 ` Vitaly Fertman 1 sibling, 1 reply; 8+ messages in thread From: Manuel Krause @ 2003-03-25 0:48 UTC (permalink / raw) To: Yury Umanets; +Cc: Nicolas Vanderavero, reiserfs-list On 03/25/2003 01:16 AM, Yury Umanets wrote: > Nicolas Vanderavero wrote: > >> Hello, > > Hello Nicolas, > >> while reinstalling a Debian on a new hard drive, I made the mistake to >> format in reiserfs my good old /home which was on /dev/sda7 instead of >> formatting the new /dev/hda7. Gasp ! Eight gigabytes lost ... >> >> Or ... maybe it was not totally lost :-) I immediately made a dump of >> the partition with 'dd' and started grepping some known text on it. It >> seemed that no data was really lost. I didn't know what to do. So I >> read the man pages and found the reiserfsck command quite interesting :-) > > You have lost the super block and probably old root node. I said > "probably" because it might be not used in teh time you did format. Can you be more clear on this? In which cases does SB get used? Or, how would this change Nicholas scenario in practical use? E.g. would a blank mount (just mount+umount) change the story so that the partition would not be recoverable? >> >> Ok, I am a total newbie to filesystems and to ReiserFS. So maybe it >> will sound trivial to you, but just in case it happens to anyone else, >> I just wanted to say that running a reiserfsck --rebuild-tree -S on my >> partition was enough to unformat it. I ended up with some file in >> lost+found, but a 'file *' is enough to discover what they are. > > The first thing you should do in cases like this is to make backup. I > hope you'll find eight gigabytes for that. Now you may feel free to do > anything with you old partition. Then you should to do --rebuild-sb and > try to fsck the partition with --check key. Then follow to fsck sugestions. > > These should be enought for getting you partition back. > >> So, maybe it would be usefull to add an entry in the "Example of >> using" section of the man page of reiserfsck, saying something like : >> "If you reformatted by mistake a reiserFS partition, you can try to >> unformat it by running reiserfsck --rebuild-tree -S on it". > > Sounds good. Probably Vitaly should consider about that for including it > in the next fsck -pre. >> >> Anyway, thank you for developing this filesystem. >> Nicolas Vanderavero. >> > P.S. Please read http://www.namesys.com/support.html. Can you as for > support? BTW, I think he found and published a new "feature" (that many would like to have in handy in those cases!) and did *not* ask for support. Shouldn't you pay him 25$, now?! ;-)) Thanks and best regards, Manuel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "Unformat" a ReiserFS partition : a testimony :-) 2003-03-25 0:48 ` Manuel Krause @ 2003-03-25 1:26 ` Yury Umanets 2003-03-25 2:03 ` Manuel Krause 0 siblings, 1 reply; 8+ messages in thread From: Yury Umanets @ 2003-03-25 1:26 UTC (permalink / raw) To: Manuel Krause; +Cc: Nicolas Vanderavero, reiserfs-list Manuel Krause wrote: > On 03/25/2003 01:16 AM, Yury Umanets wrote: > >> Nicolas Vanderavero wrote: >> >>> Hello, >> >> >> Hello Nicolas, >> >>> while reinstalling a Debian on a new hard drive, I made the mistake >>> to format in reiserfs my good old /home which was on /dev/sda7 >>> instead of formatting the new /dev/hda7. Gasp ! Eight gigabytes lost >>> ... >>> >>> Or ... maybe it was not totally lost :-) I immediately made a dump >>> of the partition with 'dd' and started grepping some known text on >>> it. It seemed that no data was really lost. I didn't know what to >>> do. So I read the man pages and found the reiserfsck command quite >>> interesting :-) >> >> >> You have lost the super block and probably old root node. I said >> "probably" because it might be not used in teh time you did format. > > > Can you be more clear on this? In which cases does SB get used? Or, > how would this change Nicholas scenario in practical use? E.g. would a > blank mount (just mount+umount) change the story so that the partition > would not be recoverable? I'm sure that usual mount+umount cannot do bad things like this. But why did you ask me about that? I mean that Nicolas has explicitly formatted his partition by means of using mkreiserfs. And I know that mkreiserfs creates new super block at 16 block and also leaf for root node, first bitmap and journal. As old bitmap is corrupted, --rebuild-tree -S will be apparently needed. > > >>> >>> Ok, I am a total newbie to filesystems and to ReiserFS. So maybe it >>> will sound trivial to you, but just in case it happens to anyone >>> else, I just wanted to say that running a reiserfsck --rebuild-tree >>> -S on my partition was enough to unformat it. I ended up with some >>> file in lost+found, but a 'file *' is enough to discover what they are. >> >> >> The first thing you should do in cases like this is to make backup. I >> hope you'll find eight gigabytes for that. Now you may feel free to >> do anything with you old partition. Then you should to do >> --rebuild-sb and try to fsck the partition with --check key. Then >> follow to fsck sugestions. >> >> These should be enought for getting you partition back. >> >>> So, maybe it would be usefull to add an entry in the "Example of >>> using" section of the man page of reiserfsck, saying something like >>> : "If you reformatted by mistake a reiserFS partition, you can try >>> to unformat it by running reiserfsck --rebuild-tree -S on it". >> >> >> Sounds good. Probably Vitaly should consider about that for including >> it in the next fsck -pre. >> >>> >>> Anyway, thank you for developing this filesystem. >>> Nicolas Vanderavero. >>> >> P.S. Please read http://www.namesys.com/support.html. Can you as for >> support? > So the plan is the following: (1) Backup your data. (2) Rebuild super block if it had some special like relocated journal. (3) Rebuild tree with partition scanning --rebuild-tree -S. This should reanimate your old partition but expect, that you will found some of your data in the /lost+found directory. > > BTW, I think he found and published a new "feature" (that many would > like to have in handy in those cases!) and did *not* ask for support. > Shouldn't you pay him 25$, now?! ;-)) > > Thanks and best regards, > > Manuel > > > -- Yury Umanets ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "Unformat" a ReiserFS partition : a testimony :-) 2003-03-25 1:26 ` Yury Umanets @ 2003-03-25 2:03 ` Manuel Krause 2003-03-25 9:29 ` Yury Umanets 0 siblings, 1 reply; 8+ messages in thread From: Manuel Krause @ 2003-03-25 2:03 UTC (permalink / raw) To: Yury Umanets; +Cc: reiserfs-list On 03/25/2003 02:26 AM, Yury Umanets wrote: > Manuel Krause wrote: >> On 03/25/2003 01:16 AM, Yury Umanets wrote: >>> Nicolas Vanderavero wrote: [...] >>> >>>> while reinstalling a Debian on a new hard drive, I made the mistake >>>> to format in reiserfs my good old /home which was on /dev/sda7 >>>> instead of formatting the new /dev/hda7. Gasp ! Eight gigabytes lost >>>> ... >>>> >>>> Or ... maybe it was not totally lost :-) I immediately made a dump >>>> of the partition with 'dd' and started grepping some known text on >>>> it. It seemed that no data was really lost. I didn't know what to >>>> do. So I read the man pages and found the reiserfsck command quite >>>> interesting :-) >>> >>> You have lost the super block and probably old root node. I said >>> "probably" because it might be not used in teh time you did format. >> >> Can you be more clear on this? In which cases does SB get used? Or, >> how would this change Nicholas scenario in practical use? E.g. would a >> blank mount (just mount+umount) change the story so that the partition >> would not be recoverable? > > I'm sure that usual mount+umount cannot do bad things like this. But why > did you ask me about that? I mean that Nicolas has explicitly formatted No, sorry, for bothering again with my unclear questions. I meant mounts happening just after a mkreiserfs run in failure and wanted to make sure for myself that they don't destroy more. (Rest of the story: Acoustically a mount after mkreiserfs does MORE on disk than a mount of a previously mounted fs. So I just only thought of a first mount changing Nicholas' circumstances before successful recovery.) > his partition by means of using mkreiserfs. And I know that mkreiserfs > creates new super block at 16 block and also leaf for root node, first > bitmap and journal. > > As old bitmap is corrupted, --rebuild-tree -S will be apparently needed. [...] > So the plan is the following: > > (1) Backup your data. > (2) Rebuild super block if it had some special like relocated journal. > (3) Rebuild tree with partition scanning --rebuild-tree -S. > > This should reanimate your old partition but expect, that you will found > some of your data in the /lost+found directory. [...] Thank you, Manuel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "Unformat" a ReiserFS partition : a testimony :-) 2003-03-25 2:03 ` Manuel Krause @ 2003-03-25 9:29 ` Yury Umanets 0 siblings, 0 replies; 8+ messages in thread From: Yury Umanets @ 2003-03-25 9:29 UTC (permalink / raw) To: Manuel Krause; +Cc: reiserfs-list Manuel Krause wrote: > On 03/25/2003 02:26 AM, Yury Umanets wrote: > >> Manuel Krause wrote: >> >>> On 03/25/2003 01:16 AM, Yury Umanets wrote: >>> >>>> Nicolas Vanderavero wrote: >>> > [...] > >>>> >>>>> while reinstalling a Debian on a new hard drive, I made the >>>>> mistake to format in reiserfs my good old /home which was on >>>>> /dev/sda7 instead of formatting the new /dev/hda7. Gasp ! Eight >>>>> gigabytes lost ... >>>>> >>>>> Or ... maybe it was not totally lost :-) I immediately made a dump >>>>> of the partition with 'dd' and started grepping some known text on >>>>> it. It seemed that no data was really lost. I didn't know what to >>>>> do. So I read the man pages and found the reiserfsck command quite >>>>> interesting :-) >>>> >>>> >>>> You have lost the super block and probably old root node. I said >>>> "probably" because it might be not used in teh time you did format. >>> >>> >>> Can you be more clear on this? In which cases does SB get used? Or, >>> how would this change Nicholas scenario in practical use? E.g. would >>> a blank mount (just mount+umount) change the story so that the >>> partition would not be recoverable? >> >> >> I'm sure that usual mount+umount cannot do bad things like this. But >> why did you ask me about that? I mean that Nicolas has explicitly >> formatted > > > No, sorry, for bothering again with my unclear questions. > > I meant mounts happening just after a mkreiserfs run in failure and > wanted to make sure for myself that they don't destroy more. > (Rest of the story: Acoustically a mount after mkreiserfs does MORE on > disk than a mount of a previously mounted fs. So I just only thought of > a first mount changing Nicholas' circumstances before successful > recovery.) Probably you mean journal replaying in new filesystem on mount? If so, then it is not big deal, due to journal is created empty. > > >> his partition by means of using mkreiserfs. And I know that >> mkreiserfs creates new super block at 16 block and also leaf for root >> node, first bitmap and journal. >> >> As old bitmap is corrupted, --rebuild-tree -S will be apparently needed. > > [...] > >> So the plan is the following: >> >> (1) Backup your data. >> (2) Rebuild super block if it had some special like relocated journal. >> (3) Rebuild tree with partition scanning --rebuild-tree -S. >> >> This should reanimate your old partition but expect, that you will >> found some of your data in the /lost+found directory. > > [...] > > Thank you, You are wellcome. > > > Manuel > > > -- Yury Umanets ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "Unformat" a ReiserFS partition : a testimony :-) 2003-03-25 0:16 ` Yury Umanets 2003-03-25 0:48 ` Manuel Krause @ 2003-03-25 17:25 ` Vitaly Fertman 2003-03-25 17:40 ` Yury Umanets 1 sibling, 1 reply; 8+ messages in thread From: Vitaly Fertman @ 2003-03-25 17:25 UTC (permalink / raw) To: Yury Umanets, Nicolas Vanderavero; +Cc: reiserfs-list Hi, On Tuesday 25 March 2003 03:16, Yury Umanets wrote: > Nicolas Vanderavero wrote: > > Hello, > > Hello Nicolas, > > > while reinstalling a Debian on a new hard drive, I made the mistake to > > format in reiserfs my good old /home which was on /dev/sda7 instead of > > formatting the new /dev/hda7. Gasp ! Eight gigabytes lost ... > > > > Or ... maybe it was not totally lost :-) I immediately made a dump of > > the partition with 'dd' and started grepping some known text on it. It > > seemed that no data was really lost. I didn't know what to do. So I > > read the man pages and found the reiserfsck command quite interesting :-) > > You have lost the super block and probably old root node. I said > "probably" because it might be not used in teh time you did format. superblock, bitmaps, journal content and almost always one block which usualy is not old root node, but the very first leaf on the fs with a part/the whole root directory. > > Ok, I am a total newbie to filesystems and to ReiserFS. So maybe it > > will sound trivial to you, but just in case it happens to anyone else, > > I just wanted to say that running a reiserfsck --rebuild-tree -S on my > > partition was enough to unformat it. I ended up with some file in > > lost+found, but a 'file *' is enough to discover what they are. Right. > The first thing you should do in cases like this is to make backup. I > hope you'll find eight gigabytes for that. Now you may feel free to do > anything with you old partition. Then you should to do --rebuild-sb and > try to fsck the partition with --check key. Then follow to fsck sugestions. :)) no, Yura, reiserfs is in a good state after mkreiserfs and --rebuild-sb / --check will say 'all is fine, enjoy'. Plus, -S is used in cases when fs is ok, but some data are lost, so you may want to backup not the whole partition, but only cp important data somewhere from the mounted fs (to avoid their corruption while rebuilding with -S option what may occure). > These should be enought for getting you partition back. > > > So, maybe it would be usefull to add an entry in the "Example of > > using" section of the man page of reiserfsck, saying something like : > > "If you reformatted by mistake a reiserFS partition, you can try to > > unformat it by running reiserfsck --rebuild-tree -S on it". --scan-whole-partition does what is written in man page - scan the whole partition, not only used space - and brings back all what was found. That means that have just created reiserfs partition with all copeid data on it will be recovered, all not overwritten data from the previous reiserfs will be recovered. There were also some data which were deleted once and the space they occupied has not been reused - get recoved also. All data with the same key go to the same file/dir and old versions of files will be merged with new versions, or deleted file will be merged with the new one - this may lead to data corruption. And while building the tree for all these found data you can run out of disk space. So it is not an undelete feature and not unformat feature, although can be used pretty efficiently for these 2 purpose _just_after_ a wrong remove / format. Or just after fsck --rebuild-tree, if fsck has not recovered some important data due to bitmap corruption. As a result, -S is more like a hack - it is not undelete, unformat, undo, but you can try to recover smth from unused space, valid data can become corrupted while being merged with old data, so it should be used with high caution and it is not for wide-usage anyway. > P.S. Please read http://www.namesys.com/support.html. Can you as for > support? It seems that Nicolas does not need our support as he wrote about his result how he had successfully unformatted the fs. -- Thanks, Vitaly Fertman ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: "Unformat" a ReiserFS partition : a testimony :-) 2003-03-25 17:25 ` Vitaly Fertman @ 2003-03-25 17:40 ` Yury Umanets 0 siblings, 0 replies; 8+ messages in thread From: Yury Umanets @ 2003-03-25 17:40 UTC (permalink / raw) To: Vitaly Fertman; +Cc: Nicolas Vanderavero, reiserfs-list Vitaly Fertman wrote: >Hi, > >On Tuesday 25 March 2003 03:16, Yury Umanets wrote: > > > > >>P.S. Please read http://www.namesys.com/support.html. Can you as for >>support? >> >> >It seems that Nicolas does not need our support as he wrote about his >result how he had successfully unformatted the fs. > > > I'm sorry, it was deep night here and probably I was not carefull enough when read Nikolas email. -- Yury Umanets ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-03-25 17:40 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2003-03-24 19:36 "Unformat" a ReiserFS partition : a testimony :-) Nicolas Vanderavero 2003-03-25 0:16 ` Yury Umanets 2003-03-25 0:48 ` Manuel Krause 2003-03-25 1:26 ` Yury Umanets 2003-03-25 2:03 ` Manuel Krause 2003-03-25 9:29 ` Yury Umanets 2003-03-25 17:25 ` Vitaly Fertman 2003-03-25 17:40 ` Yury Umanets
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.