Archive

Posts Tagged ‘san’

Adding SAN disk without rebooting

June 23rd, 2009 2 comments

The production system is running, the database filesystem is almost full. We need more disk space on the server. The server is attached to the San so we can add disk without bringing down the server. In this article, we will demonstrate what is needed to make the new San disk available to the server without disturbing the running application. Although that theses commands have been tested and used on production environment,  I suggest that you build your confidence first, by trying them on a development system.

On Red Hat / Centos 5

In our example, we have presently one disk accessible via one fiber HBA on our server. We can use to “lsscsi” command to list our scsi device. If you do not have the command ‘lsscsi’ command installed, you can install it by issuing the following command “yum install lsscsi”.

Our server can see one disk at the moment ;

#  lsscsi
[0:0:0:0]    disk    HITACHI  OPEN-V           5009   /dev/sda

Let rescan our SCSI bus. Since we have only one fiber card in our server, we will scan only the first HBA (host0). If you have two fiber card, you may need to issue the “partprobe” command for the disk to be seen on the second interface.

# echo "1" > /sys/class/fc_host/host0/issue_lip

We now see the new SAN disk that was newly allocated to the system.

# lsscsi
[0:0:0:0]    disk    HITACHI  OPEN-V           5009   /dev/sda
[0:0:0:1]    disk    HITACHI  OPEN-V           5009   /dev/sdb

For other kind of SCSI attached storage, we should rescan the bus with this command :

# echo "- - -" > /sys/class/scsi_host/host0/scan   (First hba)
# echo "- - -" > /sys/class/scsi_host/host1/scan   (Second hba, if present)

Read more…

Categories: Storage