I am working on our Debian server on which we have a Raid drive encrypted with 2 devices. I did this around 1.5 years back and have never rebooted since. Now, we want to reboot for some reasons, but I have to make sure that the password I have is the correct one, or we will be stuck. How can we verify the password for an encrypted-raid? Thank you.Raid details :  mdadm --detail /dev/md0   /dev/md0:        Version : 1.2  Creation Time : Thu Feb 11 14:43:40 2016     Raid Level : raid1     Array Size : 1953382336 (1862.89 GiB 2000.26 GB)  Used Dev Size : 1953382336 (1862.89 GiB 2000.26 GB)   Raid Devices : 2  Total Devices : 2    Persistence : Superblock is persistent    Update Time : Fri Mar 10 10:37:42 2017          State : clean  Active Devices : 2Working Devices : 2 Failed Devices : 0  Spare Devices : 0           Name : HOSTNAME:0  (local to host HOSTNAME)           UUID : 5c450558:44a2b1e9:83cb4361:9c74df8e         Events : 49    Number   Major   Minor   RaidDevice State       0       8        1        0      active sync   /dev/sda1       1       8       17        1      active sync   /dev/sdb1Thank you. Updatedmsetup table --showkeysCryptVol: 0 Large_Number crypt aes-cbc-essiv:sha256 RANDOM_TEXT  0 253:0 4096RaidVG-LVMVol: 0 Large_Number linear 9:0 2048
Debian : Verify disk encryption password for already mounted system
debian;encryption;raid;mdadm
mdadm does not encrypt, so what did you use? LUKS? With LUKS you can just see if cryptsetup luksAddKey /dev/md0 or similar will accept your password. Otherwise, if the container is still open, do a dmsetup table --showkeys that gives you all the parameters and master key which allows you to circumvent LUKS...I guess the correct way to test iscryptsetup --test-passphrase luksOpen /dev/luksdevice   --test-passphrase          Do not activate device, just verify passphrase.  This option  is          only  relevant  for  open action (the device mapping name is not          mandatory if this option is used).But I usually just use luksAddKey ;) who knows, maybe you actually do want to add another backup passphrase in case you forget one of them. Or add the same passphrase in two different keyboard layouts (if you do not use US keyboard by default).