LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   partition resize, loss of data? (https://www.linuxquestions.org/questions/linux-general-1/partition-resize-loss-of-data-444246/)

MetalStorm 05-12-2006 07:23 PM

partition resize, loss of data?
 
I had an ext2 partition that I wanted to resize (increase), after some searching on google I followed roughly this procedure.

fdisk to delete the old partition
fdisk to create a new partition with the new size.
resize2fs to resize the file system to the whole of the partition.
e2fsck

I was quite supprised that all appeared to be well when I mounted the file system again.
But... It's gone a bit wierd.
From Nautilus I can't access any directories further down than the second level e.g., Nautilus will display the contents of /mnt/hd and even the contents of /mnt/hd/somedir but it'll go no further than that. However I can see the contents of those directories and browse the files from the terminal.
It's a bit confusing but I'm glad I don't have to go and find the backup as the data is obviously still there.

Any ideas how I can fix it so that Nautilus can read the directories again?

Cheers,
stu.

Brian1 05-12-2006 08:22 PM

What you did doesn't seem write. You deleted the partition then created a new one but larger?
If so then I would say the filesystem table is corrupt.

Not sure what to do to fix it if possiable. My only idea is to do exactly what you did before but restore the to the orginal partition size. No guarentee. If any of the data that you can get too and need I would back up before doing this again. If this works and restores the partition then use parted or the gui qtparted to resize the partition.

Really then only idea is copy the files off and redo the partition.

Curious what web site did you follow this from?

Brian1

MetalStorm 05-12-2006 08:47 PM

Thanks for the reply Brian.

I actually got the idea from the resize2fs man page after trying to figure out how fdisk was used to resize partitions. http://man.linuxquestions.org/?query...ction=0&type=2

I did try with parted first, but it didn't like it.
Quote:

Error: File system has an incompatible feature enabled.

MetalStorm 05-12-2006 08:59 PM

Agh, fixed. Something strange with the permissions that had the files showing up as 0 bytes.
When I realised the only difference between me being in terminal and using Nautilus was that I was root on the terminal, I attacked the entire mounted file system with chmod -R and it's showing up correctly now.

syg00 05-12-2006 09:05 PM

What you did was fine - and the sensible way to do it. So long as you make sure you get the two partition to start on the same cylinder.

Don't understand the ownership issues - never had it happen.
As for parted, I find it *very* unreliable - use the method you chose.


All times are GMT -5. The time now is 02:16 AM.