/ devから非アクティブブロックデバイスを削除するにはどうすればよいですか?

/ devから非アクティブブロックデバイスを削除するにはどうすればよいですか?

ブロックデバイスがもう存在しないことを知っています/dev/sde(このデバイスをエミュレートするソフトウェアを停止したため)。ただし、出力lsblk/devディレクトリにはまだ表示されます。

コマンドを実行するとfdisk -l /dev/sde(下)、多くのエラーが表示されます。syslog

Sep 26 16:25:41 ubuntu3 kernel: [29651.631827] sd 49:0:0:1: [sde] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 26 16:25:41 ubuntu3 kernel: [29651.631835] sd 49:0:0:1: [sde] Sense Key : Illegal Request [current]
Sep 26 16:25:41 ubuntu3 kernel: [29651.631838] sd 49:0:0:1: [sde] Add. Sense: Logical unit not supported
Sep 26 16:25:41 ubuntu3 kernel: [29651.631839] sd 49:0:0:1: [sde] CDB: 
Sep 26 16:25:41 ubuntu3 kernel: [29651.631840] Read(10): 28 00 00 00 00 00 00 00 20 00
Sep 26 16:25:41 ubuntu3 kernel: [29651.631845] blk_update_request: I/O error, dev sde, sector 0
Sep 26 16:25:41 ubuntu3 kernel: [29651.638989] sd 49:0:0:1: [sde] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 26 16:25:41 ubuntu3 kernel: [29651.639024] sd 49:0:0:1: [sde] Sense Key : Illegal Request [current]
Sep 26 16:25:41 ubuntu3 kernel: [29651.639026] sd 49:0:0:1: [sde] Add. Sense: Logical unit not supported
Sep 26 16:25:41 ubuntu3 kernel: [29651.639027] sd 49:0:0:1: [sde] CDB: 
Sep 26 16:25:41 ubuntu3 kernel: [29651.639029] Read(10): 28 00 00 00 00 00 00 00 08 00
Sep 26 16:25:41 ubuntu3 kernel: [29651.639034] blk_update_request: I/O error, dev sde, sector 0
Sep 26 16:25:41 ubuntu3 kernel: [29651.639039] Buffer I/O error on dev sde, logical block 0, async page read
Sep 26 16:25:41 ubuntu3 kernel: [29651.639857] sd 49:0:0:1: [sde] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 26 16:25:41 ubuntu3 kernel: [29651.639859] sd 49:0:0:1: [sde] Sense Key : Illegal Request [current]
Sep 26 16:25:41 ubuntu3 kernel: [29651.639861] sd 49:0:0:1: [sde] Add. Sense: Logical unit not supported
Sep 26 16:25:41 ubuntu3 kernel: [29651.639862] sd 49:0:0:1: [sde] CDB: 
Sep 26 16:25:41 ubuntu3 kernel: [29651.639862] Read(10): 28 00 00 01 86 98 00 00 08 00
Sep 26 16:25:41 ubuntu3 kernel: [29651.639866] blk_update_request: I/O error, dev sde, sector 99992
Sep 26 16:25:41 ubuntu3 kernel: [29651.639884] sd 49:0:0:1: [sde] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 26 16:25:41 ubuntu3 kernel: [29651.639886] sd 49:0:0:1: [sde] Sense Key : Illegal Request [current]
Sep 26 16:25:41 ubuntu3 kernel: [29651.639887] sd 49:0:0:1: [sde] Add. Sense: Logical unit not supported
Sep 26 16:25:41 ubuntu3 kernel: [29651.639887] sd 49:0:0:1: [sde] CDB: 
Sep 26 16:25:41 ubuntu3 kernel: [29651.639888] Read(10): 28 00 00 01 86 98 00 00 08 00
Sep 26 16:25:41 ubuntu3 kernel: [29651.639891] blk_update_request: I/O error, dev sde, sector 99992
Sep 26 16:25:41 ubuntu3 kernel: [29651.639892] Buffer I/O error on dev sde, logical block 12499, async page read
Sep 26 16:25:41 ubuntu3 kernel: [29651.640065] sd 49:0:0:1: [sde] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 26 16:25:41 ubuntu3 kernel: [29651.640068] sd 49:0:0:1: [sde] Sense Key : Illegal Request [current]
Sep 26 16:25:41 ubuntu3 kernel: [29651.640069] sd 49:0:0:1: [sde] Add. Sense: Logical unit not supported
Sep 26 16:25:41 ubuntu3 kernel: [29651.640070] sd 49:0:0:1: [sde] CDB: 
Sep 26 16:25:41 ubuntu3 kernel: [29651.640071] Read(10): 28 00 00 00 00 00 00 00 20 00
Sep 26 16:25:41 ubuntu3 kernel: [29651.640075] blk_update_request: I/O error, dev sde, sector 0
Sep 26 16:25:41 ubuntu3 kernel: [29651.640089] sd 49:0:0:1: [sde] FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE
Sep 26 16:25:41 ubuntu3 kernel: [29651.640090] sd 49:0:0:1: [sde] Sense Key : Illegal Request [current]
Sep 26 16:25:41 ubuntu3 kernel: [29651.640091] sd 49:0:0:1: [sde] Add. Sense: Logical unit not supported
Sep 26 16:25:41 ubuntu3 kernel: [29651.640092] sd 49:0:0:1: [sde] CDB: 
Sep 26 16:25:41 ubuntu3 kernel: [29651.640092] Read(10): 28 00 00 00 00 00 00 00 08 00
Sep 26 16:25:41 ubuntu3 kernel: [29651.640095] blk_update_request: I/O error, dev sde, sector 0
Sep 26 16:25:41 ubuntu3 kernel: [29651.640096] Buffer I/O error on dev sde, logical block 0, async page read

/dev/sdeアクティブブロックデバイスのリストから削除するようにLinuxにどのように指示する必要がありますか?

オペレーティングシステム:Ubuntu 14.04.5 LTS、カーネル3.19.0-78 - 一般

(MacBookのVMware Fusion 8.5.8で仮想マシンとして動作)

ベストアンサー1

SCSIサブシステムからデバイスへの各パスを削除できます。

echo 1 > /sys/block/sde/device/delete

ご注意ください、完全なコマンド出力リダイレクト前のコマンドの一部だけでなく、ルートとして実行する必要があります。したがって、を使用している場合は、sudo次の手順を実行します。

sudo bash -c 'echo 1 > /sys/block/sde/device/delete'

おすすめ記事