It is possible to explicitly add or remove a SCSI device or re-scan an entire SCSI bus without rebooting a running Linux VM guest.
A rescan can be issued by typing the following command:
echo "- - -" > /sys/class/scsi_host/host#/scan
fdisk -l
tail -f /var/log/message
Replace host# with actual value such as host0. You can find the scsi_host value using the following command:
# ls /sys/class/scsi_host
Output:
host0
Now type the following to send a rescan request:
echo "- - -" > /sys/class/scsi_host/host0/scan
fdisk -l
tail -f /var/log/message
You can create partition using fdisk and format it using mkfs.ext3 command:
# fdisk /dev/sdc
# mkfs.ext3 /dev/sdc3
# mkdir /disk3
Open /etc/fstab file, enter:
# vi /etc/fstab
Append as follows:
/dev/sdc3 /disk3 ext3 defaults 1 2
Save and close the file.
Check out the best web hosting plans now!
Sign up or log in