# Luks incorrect semaphore state // Failed to set a proper sta

## Salem

Hello,

not sure whats wrong. I can mount/umount my encrypted partitions without a problem, but i always get this error while mounting and unmounting:

```
semid 1671169: semop failed for cookie 0xd4d7f1a: incorrect semaphore state

Failed to set a proper state for notification semaphore identified by cookie value 223182618 (0xd4d7f1a) to initialize waiting for incoming notifications.
```

Other question. How can i fsck a luks partition? 

Thanks

----------

## frostschutz

can't help you with the semaphore issue. shouldn't happen I guess... problem with the kernel?

 *Quote:*   

> How can i fsck a luks partition?

 

there is no fsck for the luks metadata, it either works or it doesn't (there is no way to recover if the luks metadata is broken)

the encrypted filesystem, you can fsck like any other filesystem

instead of fsck /dev/sda1 you use fsck /dev/mapper/yourluksdevice (same device you used for mkfs and use for mounting that filesystem), that's all

----------

## kernelOfTruth

*BUMP*

any news on this ?

recently I'm also getting these messages

I upgraded to 2.6.38 - so it could be kernel-related

----------

## klz

* BUMP *

I also get this semop cookie semaphore state error. Just after i entered my passphrase for /dev/mapper/root during boot.

The system does boot, so its not a critical error -- still tho i would like to fix this. (Using kernel 2.6.39.1 and LUKS with ext4 for root-partition.)

Is the whole Luks-volume maybe slightly corrupted? 

Could a new luksFormat of the root-partition help?

I would prefer fixing it without formatting the partition again obviously.

----------

