# [solved-please edit wiki]dm-crypt luks - drive failing

## virtguru

why is this page constantly changing? Sorry if Ive missed something here , smartd gave a notice that my /home is finally failing after 7 years . 

-its encrypted luks 

-its xfs 

-i have no lvm 

-i have no desire to go lvm 

what now is an ok procedure to encrypt a single drive with a single partition , i dont need lvm any containers or what not. 

i looked at the https://gitlab.com/cryptsetup/cryptsetup FAQ.

directly running it on /dev/sdc and then encrypting sdc only (no sdc1) and mounting /dev/sdc through dmcrypt works. data is there. 

Problem is my box when lightdm tries to access the new /home on /dev/mapper/home which is on /dev/sdc locks everything up. logging in any user will lock the box up (except root since root has /root)

am i missing something ? can we not now directly luks to /dev/sdX ? still need /dev/sdX1 ? cant remember how this was done a few years back- 

cheersLast edited by virtguru on Fri Aug 12, 2016 6:06 pm; edited 1 time in total

----------

## frostschutz

I would not use sdx directly, not for anything, regardless if it's a filesystem, LUKS, mdadm, LVM, ...

Always use a partition table. Otherwise sooner or later something will trip you up (as soon as any partition program creates a partition table, your LUKS header is shot).

There should be nothing wrong with using filesystem on LUKS, without LVM.

If your box locks up entirely it could also be a hardware issue.

----------

## virtguru

 *frostschutz wrote:*   

> I would not use sdx directly, not for anything, regardless if it's a filesystem, LUKS, mdadm, LVM, ...
> 
> Always use a partition table. Otherwise sooner or later something will trip you up (as soon as any partition program creates a partition table, your LUKS header is shot).
> 
> There should be nothing wrong with using filesystem on LUKS, without LVM.
> ...

 

I always backup the luks headers, its a rather large /home which i synced to /newdrive

/newdrive only luksformated on /dev/sdc directly as the faq (its not a hardware issue, I even formatted the new drive without luks on /dev/sdc and its fine, it doesnt lock up.

I would like to do it the old way luks on it but open the filesystem on /dev/sdc1 , although I cannot find any gentoo docs on this they have all evaporated since this was done years ago.

Any insight , Im re copying the last data off my old /home to backup but want to avoid any loss. 

Thanks

----------

## virtguru

Thanks frostschutz you did point me in the right direction I needed a partition table, sorry if a came over a bit cross its the state of our wiki.. Finally found the old way over on Arch wiki sigh , thanks for heads up

Cheers

----------

