All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arno Wagner <arno@wagner.name>
To: dm-crypt@saout.de
Subject: Re: [dm-crypt] Filesystem unreadabe after resizing LUKS
Date: Thu, 30 Jan 2014 22:01:59 +0100	[thread overview]
Message-ID: <20140130210159.GA27307@tansi.org> (raw)
In-Reply-To: <CA+5H9QnQx8OQ+tC0k_FXmCgjvJ_MBmbsJHHwNyzEbK=5fwxPsQ@mail.gmail.com>

On Thu, Jan 30, 2014 at 16:24:27 CET, Pawel Chojnacki wrote:
> Hello,
> 
> Two days ago I tried to shrink my LUKS-encrypted /dev/sdb5 partition from
> 119 to 110 GB according to
> http://ubuntuforums.org/showthread.php?t=726724. Each step worked
> properly, but in the end I'm not able to mount the
> partition. I wanted to ask if you have any idea what may have caused that
> and how to fix it:
> 
> # cryptsetup luksOpen /dev/sdb5 neuro
> 
> accepts the proper password, doesn't recognize any other, and fails to
> mount the partition inside:
> 
> # mount /dev/mapper/neuro /mnt/
> mount: unknown filesystem type 'LVM2_member'

This means LUKS is fine, just the resize failed. 
I should pount out the clear "It should go without 
saying, resizing your crypt may result in data loss  
Be sure to BACK UP your data first." given in that posting.

I also have to say that this is one of the reasons I think that
lvm has no place in a normal installation: It just complicates
things.
 
[...]

> Testdisk recognizes the filesystems as FAT32/FAT12/NTFS and can't do much.
> Photorec on the other hand can seamlessly recover all data as long as it's
> told that the filesystem is ext4.

Is the data good? If so, this stronglyindicates that this is not
a nencryption problem.
 
> From what I understand, the first step in the resizing process - resize2fs
> -p /dev/mapper/neuro-root 9G - has gone wrong - even though all the tests
> done in the meantime worked.
> 
> I have a backup from 3 days ago, yet it's a question of honor for me to
> understand what has gone wrong and how to repair it. I will owe a beer to
> whoever helps me.

Ok, so at least you did not kill all data. The mystery. however seems 
to be in some other place than the encryption. You can try doing this
again and looking after each step what is on disk.

Arno
-- 
Arno Wagner,     Dr. sc. techn., Dipl. Inform.,    Email: arno@wagner.name
GnuPG: ID: CB5D9718  FP: 12D6 C03B 1B30 33BB 13CF  B774 E35C 5FA1 CB5D 9718
----
A good decision is based on knowledge and not on numbers. -  Plato

  parent reply	other threads:[~2014-01-30 21:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-01-30 15:24 [dm-crypt] Filesystem unreadabe after resizing LUKS Pawel Chojnacki
2014-01-30 16:22 ` Matthias Schniedermeyer
2014-01-30 21:01 ` Arno Wagner [this message]
2014-01-31  1:36   ` Robert Nichols
2014-01-31  3:17     ` Arno Wagner
2014-01-31  9:04       ` Pawel Chojnacki
2014-01-31  2:26   ` Sven Eschenberg

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20140130210159.GA27307@tansi.org \
    --to=arno@wagner.name \
    --cc=dm-crypt@saout.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.