LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-20-2015, 08:37 AM   #1
Pernicion
LQ Newbie
 
Registered: Jul 2015
Posts: 2

Rep: Reputation: Disabled
CentOS 7: Partition resizing issue where now there is a lost+found folder full of num


Set up
Running a home server with a 2TB HDD. Running VMWare ESXi 5.5 that has 2 guest OS; CentOS 7 and Windows Server 2012 R2.
There are 3 virtual disks (VMDK) thickly provisioned:
  • 20GB CentOS 7 install
  • 40GB Windows 2012 install
  • ~1.9TB data disk for CentOS 7

Original issue
I left no space on the data store when creating the data disk which meant after shutting the Windows VM, there was no room for the swap file to boot it back up. Due to the size of the disk, there was also no room to perform a copy of the data disk to then be able safely convert it.

Attempted solution
Tried to find a way of slightly decreasing the size of the data virtual disk to give Windows enough space to load. Hole punched VMDK following this guide:
https://www.virten.net/2014/11/howto...ual-disk-vmdk/

In CentOS:

Code:
cd /mnt/data 
dd bs=1M count=8192 if=/dev/zero of=zero
In ESXi:

Code:
cd /vmfs/volumes/ds1/vma 
vmkfstools -K vma_1.vmdk
Then attempted to shrink the partition after reading the following guide: https://www.howtoforge.com/linux_res...xt3_partitions

Code:
umount /dev/sdb1
e2fsck /dev/sdb1
Here I got a message saying "bad magic number in super-block"
I tried the below which didnt work:

Code:
e2fsck -b 32768 /dev/sdb1
Followed by:

Code:
mke2fs -S /dev/sdb1
Before running the above command my file system was still intact - I could still see the individual folder names when mounting the disk. Now I just had an empty lost+found folder.
I then believed that maybe this issue was happening because my file system was actually XFS and not EXT4. So I tried:

Code:
xfs_repair /dev/sdb1
Current and even worse issue
Now inside the lost+found folder its full of numbered folders. One of which has "Led Zeppelin" on it indicating that the underlying data is perhaps still there.
I have stopped tinkering with it now as I don't want to make it any worse, even though I realise the data is probably already corrupt.
Does anybody know of anything else I can try? Unfortunately the partition contains all of my data, most of which is not backed up elsewhere.

Last edited by Pernicion; 07-20-2015 at 02:26 PM. Reason: Fix formatting
 
Old 07-20-2015, 10:11 PM   #2
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,784

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
What you've got is what you've got. That "mke2fs -S" basically scribbled all over the xfs filesystem, corrupting both filesystem metadata and the contents of some files. All you can do now is try to copy whatever (if any) files remain and try to make sense out of what's in lost+found. You might be able to recover some more files with photorec (it's not just for recovering pictures), but you'll probably get mostly file fragments, and in any event the original filenames will be lost.
 
Old 02-03-2016, 09:47 AM   #3
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
testdisk is another option that may help, but be very careful with testdisk as it can rewrite your disk whole partition table.

Last edited by colorpurple21859; 02-03-2016 at 09:49 AM.
 
Old 02-03-2016, 10:00 AM   #4
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
You by chance didn't run BleachBitch on it did you?
 
Old 02-03-2016, 10:01 AM   #5
rknichols
Senior Member
 
Registered: Aug 2009
Distribution: Rocky Linux
Posts: 4,784

Rep: Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214Reputation: 2214
It is likely that in the 6 months since this thread began the OP has exhausted his efforts at recovery.
 
Old 02-03-2016, 10:02 AM   #6
Habitual
LQ Veteran
 
Registered: Jan 2011
Location: Abingdon, VA
Distribution: Catalina
Posts: 9,374
Blog Entries: 37

Rep: Reputation: Disabled
doh!
 
Old 02-03-2016, 11:46 AM   #7
colorpurple21859
LQ Veteran
 
Registered: Jan 2008
Location: florida panhandle
Distribution: Slackware Debian, Fedora, others
Posts: 7,392

Rep: Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594Reputation: 1594
I didn't catch the date when I posted
 
  


Reply



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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
The 'Lost+Found' folder on usb HD clifford227 Linux - Newbie 3 08-23-2010 08:21 PM
Booting Centos 5.4 Issue: "CentOS CD Not found in any of the media drives. Please i g.navink Red Hat 1 04-07-2010 04:12 PM
I deleted lost+found folder on ext3 partition - any issues? slacky Linux - General 4 05-01-2008 10:09 AM
Resizing Centos (ext3/LVM) partition alexpacio Linux - Software 6 08-11-2007 01:39 AM
partition full, need help with resizing keever Linux - Hardware 4 11-06-2006 08:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:14 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration