Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux Hosts
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > Misc
Reload this Page [SOLVED] Failed partition resize: can I recover my data?
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

Misc Any questions or Linux discussion that does not fit in any of the other technical areas.

Closed Thread
 
Thread Tools Display Modes
Old 05-02-2008   #1 (permalink)
Daan
Linux Newbie
 
Daan's Avatar
 
Join Date: Aug 2005
Location: Amsterdam, The Netherlands
Posts: 184
Question [SOLVED] Failed partition resize: can I recover my data?

Hello,

During the process of resizing a partition with gparted, I got an error:

Code:
check filesystem on /dev/sdb2 for errors and (if possible) fix them  00:00    ( ERROR )
     	
e2fsck -f -y -v /dev/sdb2
     	
/dev/sdb2 is mounted.
e2fsck 1.40.2 (12-Jul-2007)
e2fsck: Cannot continue, aborting.
apparently causing me to loose the data that was on the partition.

The problem was that Ubuntu or Gnome had automatically mounted the partition sdb2, which is on a hard disk which is hooked up through usb. I now have one small partition and a lot of unallocated space on the drive. I meant to have one big partition with the data from the small partition on it, but it seems gone now! The device can be mounted but appears to be empty. However, gparted says 79% of the partition is in use.

Can I recover the data?

Maybe I should run the command e2fsck -f -y -v /dev/sdb2 again but without the partition mounted?

I have a partial backup, but all my storage space is now taken.

Here's the entire gparted_details.htm:

Code:
GParted 0.3.3

Libparted 1.7.1

Delete /dev/sdb3 (ext3, 87.48 GiB) from /dev/sdb  00:00    ( SUCCES )
     	
calibrate /dev/sdb3  00:00    ( SUCCES )
     	
path: /dev/sdb3
start: 58589055
end: 242051354
size: 183462300 (87.48 GiB)
delete partition  00:00    ( SUCCES )

========================================

Delete /dev/sdb1 (ext3, 27.94 GiB) from /dev/sdb  00:00    ( SUCCES )
     	
calibrate /dev/sdb1  00:00    ( SUCCES )
     	
path: /dev/sdb1
start: 63
end: 58589054
size: 58588992 (27.94 GiB)
delete partition  00:00    ( SUCCES )

========================================

Grow /dev/sdb2 from 74.50 GiB to 189.92 GiB  02:46:03    ( ERROR )
     	
calibrate /dev/sdb2  00:00    ( SUCCES )
     	
path: /dev/sdb2
start: 242051355
end: 398283479
size: 156232125 (74.50 GiB)
calculate new size and position of /dev/sdb2  00:01    ( SUCCES )
     	
requested start: 0
requested end: 398283479
requested size: 398283480 (189.92 GiB)
new start: 63
new end: 398283479
new size: 398283417 (189.92 GiB)
check filesystem on /dev/sdb2 for errors and (if possible) fix them  03:51    ( SUCCES )
     	
e2fsck -f -y -v /dev/sdb2
     	
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information

44050 inodes used (0.45%)
666 non-contiguous inodes (1.5%)
# of inodes with ind/dind/tind blocks: 19439/783/0
15405595 blocks used (78.89%)
0 bad blocks
1 large file

43834 regular files
207 directories
0 character device files
0 block device files
0 fifos
0 links
0 symbolic links (0 fast symbolic links)
0 sockets
--------
44041 files
e2fsck 1.40.2 (12-Jul-2007)
move partition to the left  00:01    ( SUCCES )
     	
old start: 242051355
old end: 398283479
old size: 156232125 (74.50 GiB)
new start: 63
new end: 156232187
new size: 156232125 (74.50 GiB)
move filesystem to the left  02:42:10    ( SUCCES )
     	
using internal algorithm
copy 156232125 sectors
finding optimal blocksize
     	
copy 32768 sectors using a blocksize of 64 sectors  00:02    ( SUCCES )
     	
32768 of 32768 copied
2.32211 seconds
copy 32768 sectors using a blocksize of 128 sectors  00:02    ( SUCCES )
     	
32768 of 32768 copied
2.48633 seconds
optimal blocksize is 64 sectors (32.00 KiB)
copy 156166589 sectors using a blocksize of 64 sectors  02:42:06    ( SUCCES )
     	
156166589 of 156166589 copied
156232125 sectors copied
check filesystem on /dev/sdb2 for errors and (if possible) fix them  00:00    ( ERROR )
     	
e2fsck -f -y -v /dev/sdb2
     	
/dev/sdb2 is mounted.
e2fsck 1.40.2 (12-Jul-2007)
e2fsck: Cannot continue, aborting.



========================================
__________________
OS's I use: Ubuntu Hardy Haron, Debian Etch, Debian Lenny, Windows XP, Windows Vista
Daan is offline  
Old 05-02-2008   #2 (permalink)
devils casper
Ghost
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, INDIA
Posts: 18,109
Boot up from PartedMagic LiveCD and run Testdisk. It recovers Partition Table in most cases.
__________________
New Users: Read This First
If you woke up breathing, Congratulations! You get another chance.

devils casper is offline  
Old 05-03-2008   #3 (permalink)
Daan
Linux Newbie
 
Daan's Avatar
 
Join Date: Aug 2005
Location: Amsterdam, The Netherlands
Posts: 184
Thanks Casper.

Why should I run testdisk from a live CD and not from my normal Ubuntu installation?
__________________
OS's I use: Ubuntu Hardy Haron, Debian Etch, Debian Lenny, Windows XP, Windows Vista
Daan is offline  
Old 05-03-2008   #4 (permalink)
Jonathan183
Linux Engineer
 
Join Date: Oct 2007
Location: Bristol, UK
Posts: 1,459
I don't think testdisk is installed by default and running from live CD should work for all drives in the system - no issues with things being mounted etc. It also minimizes the chance of data loss due to running the system.
Jonathan183 is offline  
Old 05-03-2008   #5 (permalink)
Daan
Linux Newbie
 
Daan's Avatar
 
Join Date: Aug 2005
Location: Amsterdam, The Netherlands
Posts: 184
That makes sense, thanks.
__________________
OS's I use: Ubuntu Hardy Haron, Debian Etch, Debian Lenny, Windows XP, Windows Vista
Daan is offline  
Old 05-03-2008   #6 (permalink)
Daan
Linux Newbie
 
Daan's Avatar
 
Join Date: Aug 2005
Location: Amsterdam, The Netherlands
Posts: 184
Thumbs up Thanks!

I got my data back using testdisk running from the PartedMagic live CD.

Thanks Capser and Jonathan!
__________________
OS's I use: Ubuntu Hardy Haron, Debian Etch, Debian Lenny, Windows XP, Windows Vista
Daan is offline  
Old 05-03-2008   #7 (permalink)
devils casper
Ghost
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, INDIA
Posts: 18,109
Glad to help you Daan !!
__________________
New Users: Read This First
If you woke up breathing, Congratulations! You get another chance.

devils casper is offline  
Closed Thread


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 03:09 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.0.0