For backup purposes, I have "snapshotted" a LVM partition. This partition was crypted so I have opened this Luks partition (snapshot) in order to do my backup.
The problem is that I have forgotten to delete the snapshot, thus it reached 100% usage.
When I try to delete the snapshot:
lvremove /dev/mapper/vgx-LogVolDBSnapshot
/dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 375809572864: Input/output error
/dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 375809630208: Input/output error
/dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 0: Input/output error
/dev/vgx/LogVolDBSnapshot: read failed after 0 of 4096 at 4096: Input/output error
/dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 375807475712: Input/output error
/dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 375807533056: Input/output error
/dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 0: Input/output error
/dev/mapper/SnapshotDecrypted: read failed after 0 of 4096 at 4096: Input/output error
Logical volume vgx/LogVolDBSnapshot is used by another device.
That's quite normal, I have to close my Luks partition in first:
cryptsetup -v luksClose /dev/mapper/SnapshotDecrypted
Cannot read device /dev/mapper/vgx-LogVolDBSnapshot.
Command failed with code 15: Cannot read device /dev/mapper/vgx-LogVolDBSnapshot.
How can I close or delete my Luks partition in order to be able to delete the snapshot ?
Can I use "dmsetup remove /dev/mapper/SnapshotDecrypted" and then "lvremove /dev/vgx/LogVolDBSnapshot" ?
output of dmsetup
dmsetup ls
SnapshotDecrypted (253:17)
vgx-LogVolDBSnapshot (253:14)
dmsetup table
SnapshotDecrypted: 0 733999104 crypt aes-cbc-essiv:sha256 0...0 0 253:14 4096
vgx-LogVolDBSnapshot: 0 734003200 snapshot 253:15 253:16 P 8