LoginSignup
0
0

More than 5 years have passed since last update.

応急処置として、サーバーを再起動せずにボリューム(DISK)追加した

Posted at

クラウドのサーバを使っていて、
いろんな用途で使っているCentOSサーバーが容量不足で、
ボリューム(DISK)を新規で追加しアタッチ。。

そして、lsscsiコマンドでデバイスを確認

# lsscsi
[0:0:0:0]    disk    VMware   Virtual disk     1.0   /dev/sda 
[1:0:0:0]    cd/dvd  NECVMWar VMware IDE CDR00 1.00  /dev/sr0 

あれ、lsscsiコマンドうっても対象のデバイスがでてこない。。。

ボリュームのアタッチ&デタッチを繰り返しても変わらない。

ここを覗いてみるとhost0とかhost1が存在した、、
よくわからんけど、それぞれscanってファイルが存在する。

# ls -la /sys/class/scsi_host/
合計 0
drwxr-xr-x  2 root root 0  8月 30 12:56 .
drwxr-xr-x 44 root root 0  8月  6 16:00 ..
lrwxrwxrwx  1 root root 0  8月 30 12:56 host0 -> ../../devices/pci0000:00/0000:00:10.0/host0/scsi_host/host0
lrwxrwxrwx  1 root root 0  8月 30 12:56 host1 -> ../../devices/pci0000:00/0000:00:07.1/ata1/host1/scsi_host/host1
lrwxrwxrwx  1 root root 0  8月 30 12:56 host2 -> ../../devices/pci0000:00/0000:00:07.1/ata2/host2/scsi_host/host2
lrwxrwxrwx  1 root root 0  8月 30 12:56 host3 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:00.0/host3/scsi_host/host3
lrwxrwxrwx  1 root root 0  8月 30 12:56 host4 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:01.0/host4/scsi_host/host4
lrwxrwxrwx  1 root root 0  8月 30 12:56 host5 -> ../../devices/pci0000:00/0000:00:11.0/0000:02:02.0/host5/scsi_host/host5
# echo "- - -" > /sys/class/scsi_host/host0/scan
# echo "- - -" > /sys/class/scsi_host/host1/scan
# echo "- - -" > /sys/class/scsi_host/host2/scan
...

host0 host1 host2 ... を総当たりで叩いたら認識するようになった。。汗

なんだこれ。

ちゃんと再起動した方が安全だと思いますが、
停止できないサーバーや、緊急時や応急処置で必要になるケースがあるかも。

参考にさせて頂いた記事

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0