Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

list disk in fdisk -l without rebooting 1

Status
Not open for further replies.

Scunningham99

Programmer
Sep 20, 2001
815
GB
Hi All

What is the command to list disk without rebooting server. Ie we have presented new volumne from san and would like to mount without reboot

basically equivalent command to devfsadm which I have used in the past in solaris.

Red hat 5.5 2.6.18-194.el5 64bit

Kind regards



Sy UK
 
I am not entirely sure what you mean by "list disk"
You can list the disks with either the fdisk -l or df -h commands, but I don't think this is what you mean because you mention mounting. For that, if you have created an fstab entry, you can simply tell it to remount all drives using mount -a, which will remount all drives except those marked noauto, which you can override with a -F flag. Otherwise you can simply mount it.

 
You need to re-scan the drives or if you know how, "connect" the new one. Then "fdisk -l" will list it. After that, if you have an LV on it you will be able to mount it. Otherwise thee will be a few more steps to perform, such as make/extend volume group, same for logical volume, then mkfs.
 
Try this to rescan for new SCSI devices:

Code:
for host in /sys/class/scsi_host/*/scan
do
    echo 1 >$host
done

Some server manufacturers provide their own rescan utilities, e.g. /usr/bin/hp_rescan -a for HP servers. There is also the widely used rescan-scsi-bus script.

Annihilannic
[small]tgmlify - code syntax highlighting for your tek-tips posts[/small]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top