为了备份,我“快照”了一个LVM分区。该分区已加密,因此我已打开此Luks分区(快照)以进行备份。
问题是我忘记删除快照,因此快照使用率达到了100%。
当我尝试删除快照时:
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.
这很正常,我必须首先关闭Luks分区:
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.
我如何关闭或删除Luks分区才能删除快照?
我可以使用“ dmsetup remove / dev / mapper / SnapshotDecrypted”然后使用“ lvremove / dev / vgx / LogVolDBSnapshot”吗?
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
嗨@HaukeLaging!这是ls的输出:
—
Bob Sauvage 2014年
SnapshotDecrypted (253:17)
&vgx-LogVolDBSnapshot (253:14)
和table:SnapshotDecrypted: 0 733999104 crypt aes-cbc-essiv:sha256 0000000000000000000000000000000000000000000000000000000000000000 0 253:14 4096
&vgx-LogVolDBSnapshot: 0 734003200 snapshot 253:15 253:16 P 8
谢谢@StephaneChazelas,但是我无法按照我的第一篇文章中所述删除快照设备:/!
—
Bob Sauvage
Logical volume vgx/LogVolDBSnapshot is used by another device.
=> Luks分区使用它:/
对不起,我是说
—
斯特凡Chazelas
dmsetup remove SnapshotDecrypted
。是的,您的最后一个问题。也就是说,不luksClose它,只是将其删除(luksClose写的东西出来(这作为快照已满,不能在这里做的),并dmsetup删除)
@StephaneChazelas您的评论将是一个不错的答案!
—
George Udosen '17
dmsetup ls
和的输出是dmsetup table
什么?