LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices

Reply
 
Search this Thread
Old 05-27-2011, 10:31 AM   #1
Willard
LQ Newbie
 
Registered: Nov 2009
Posts: 17

Rep: Reputation: 0
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.
 
Old 05-27-2011, 10:46 AM   #2
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Hanover, Germany
Distribution: Gentoo
Posts: 15,402
Blog Entries: 2

Rep: Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993Reputation: 3993
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.
 
  


Reply

Tags
cryptsetup, fsck, lvm


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
fsck and root file system xj25vm Slackware 4 10-20-2011 01:11 PM
On boot the fsck of 2TB file-system fails thllgo Linux - Server 5 02-16-2011 05:46 PM
fsck damaged my file system Dr_Death_UAE Linux - General 10 02-03-2010 08:21 AM
is fsck checking file system on bootup necessary samwise17 Slackware 3 12-08-2007 11:20 PM
[LFS 61][failed fsck] with reiser file system mr_demilord Linux From Scratch 3 10-13-2005 04:56 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration