The past two times I've mounted my external drive, FSCK has told the filesystem to replay journal transactions. Is this a sign that the drive is going bad or can I still get some more use from it? Is there a way to repair the drive? Is there a program that can check for sure if the drive is bad or going bad?
Edit: When I shut down I got 4 beeps (I think) and this is the message in journalctl for each partition:
Failed to deactivate: Invalid argument
firstname.lastname@example.org control process exited, code=exited status=1
Unit email@example.com entered a failed state
Last edited by b1tgl0w (2013-01-09 05:43:19)
It dose not sound like there is anything wrong with your hard drive
The reason the journal is being replayed is becuase the filesystem is not being shutdown correctly.
It looks like the systemd-cryptsetup UNIT file is not correctly unmouting the encrypted partition. Becuase the journal is being replayed we know the filesystem is not being umounted correctly.... it looks like the systemd-cryptsetup UNIT file trying umount the encrypted partition Before the filesystem is umounted, and that is way it is failing. You would not have the journal being replayed even if the /home filesystem was umounted after the systemd-cryptsetup UNIT file. So, we know that at no point on shutdown dose anything umount the /home filesystem. So, it is not a problem with things running out of order. It is a problem that the /home filesystem is just not being umounted at all.
I need to know more about your setup to tell you exactly what you need to do. However, you need to change the way things are setup, so /home is unmounted before the systemd-cryptsetup UNIT file tries to umount the encrypted parition.
I am farly sure that systemd umounts filesystems, so look into how it dose that and configure it to umount /home.
Last edited by hunterthomson (2013-01-10 10:33:14)
I ran /usr/lib/systemd/system-generators/systemd-cryptsetup-generator then copied /run/systemd/generator/systemd-cryptsetup@* to /etc/systemd/service/ and rebooted.
When I booted again, I ran sudo journalctl, and this time there were no errors but also nothing about the encrypted volumes being deactivated or unmounted. Is this normal or are the error messages possibly not getting logged?
I've never used that but just from the man page, is that how you are supposed to do it? It makes it sound as if that stuff should be automatically generated and not that you should need to copy it into systemd's permanent configuration. [But this is based purely on reading the man page which could be just misleading.]
Then again, I don't even have a /etc/systemd/service/ directory...
You're right. It's not how I should do it, the error messages in journalctl are back. Any ideas? (Any information that might be helpful?)
Have you read the man page? Try to figure out what it uses to generate that stuff and correct the source.
It uses crypttab. Crypttab is fine. I'm still looking into this issue. The journal replays have stopped, but the crypt devices still don't cleanly deactivate.
Last edited by b1tgl0w (2013-01-17 01:53:30)
Okay, I think I solved it: Had to add the shutdown hook to mkinitcpio.conf and run #mkinitcpio -p linux. I will officially mark this thread as solved after I shutdown the machine several more times and the problem is definitely fixed. Can anyone confirm that this could have been the source of the problem?
That did not work. Problem persists.
Edit: I reread your post, hunterthomson, and I'm looking into unmounting /dev/mapper/home before the cryptdevice is deactivated. Will report back.
Last edited by b1tgl0w (2013-01-18 23:51:56)
I've tried adding these files to /usr/lib/systemd/system-shutdown with no success:
[Unit] Description=/etc/rc.local.shutdown Compatibility After=rc-local.service [Service] Type=oneshot ExecStart=/etc/rc.local.shutdown StandardInput=tty RemainAfterExit=yes [Install] WantedBy=shutdown.target Also=rc-local.service
#!/bin/bash umount /var umount /home umount /media/WDDIsk
The latter file was automatically deleted. Also note that /etc/rc.local.shutdown looks the same as the above script.
I've also done some searching and other users have similar problems, but with cifs. Unfortunately the solutions in their posts did not work for me.
Can anyone help?
Last edited by b1tgl0w (2013-01-22 05:06:51)