Given a block device, how can I get its "parent"?
A example would be a LUKS virtual decrypted device (/dev/mapper/decrypted), whose parent would be the encrypted block device (/dev/sdb)
For non-interactive work, this can be done using dmsetup deps, which lists the block device's dependencies. By default, it'll return the major:minor device numbers, but you can provide additional options to output a name:
dmsetup deps -o devname /dev/mapper/decrypted
For doing this interactively, the best way is just to use lsblk, which outputs a nicely formatted graph:
└─sda8 8:8 0 43.9G 0 part
└─sda8_crypt 253:2 0 43.9G 0 crypt
├─vgpersonal-home 253:3 0 83G 0 lvm
dmsetup deps is not very complete: For example when I specify a logical volume, I just get the name of the disk partition (like sda8). Is there a command to get all parents, children, and siblings? Re-using dmsetup does not work: For example dmsetup deps -o devname /dev/sda8 falsely claims Device sda8 not found. Of course it exists!
/dev/sda8 is very likely representing hardware, not a devicemapper blockdevice, so dmsetup can't possibly work there (as it states, the device doesn't exist, as far as devicemapper is concerned). Did you try using lsblk, which I mentioned in the answer?
lsblk :)