LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (https://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   fsck a file system on a dm-crypt'ed partition (https://www.linuxquestions.org/questions/linux-hardware-18/fsck-a-file-system-on-a-dm-crypted-partition-883056/)

Willard 05-27-2011 10:31 AM

fsck a file system on a dm-crypt'ed partition
 
Greetings.

Short: How do I run fsck on a file system residing in a block device created using dm-crypt?

Long: The partition setup of my Asus eee netbook is as follows:
  • /dev/sda1: boot partition
  • /dev/sda2: dm-crypt'ed partition (see below)
  • /dev/sda4: boot booster partition.

I made the block device obtained by dm-crypt'ing /dev/sda2 into a LVM physical volume. This volume has three partitions (their function should be obvious from their name).
Code:

willard@sleipnir:~
> ls -l /dev/mapper
total 0
crw------- 1 root root 10, 59 2011-05-27 16:54 control
lrwxrwxrwx 1 root root      7 2011-05-27 16:54 sda2_crypt -> ../dm-0
lrwxrwxrwx 1 root root      7 2011-05-27 16:54 valholl-home -> ../dm-3
lrwxrwxrwx 1 root root      7 2011-05-27 16:54 valholl-root -> ../dm-2
lrwxrwxrwx 1 root root      7 2011-05-27 16:54 valholl-swap -> ../dm-1

When standing up from my chair just earlier, I accidentally dropped my netbook on a wooden floor. The fall was about half a meter, and the fall was slowed slightly.

The netbook works; I am writing this message using my netbook. I have tried rebooting, and nothing weird happened. Presumably, an impact detector made my hard drive park its head.

But I am paranoid. I would like to know whether I damaged my drive, so I can buy a new one before the possible damage starts having consequences.

So, I want to fsck file systems on partitions managed by LVM, on a block device within a dm-crypt'ed partition. Do you folks have any idea on how to do this?

Thanks in advance,
Willard.

TobiSGD 05-27-2011 10:46 AM

Just don't use fsck to test the drive, use the manufacturers diagnostic tool, this way you don't have to fiddle with the partitions at all.


All times are GMT -5. The time now is 12:23 PM.