HOWTO: Add a new lun or vpath to a RHEL 4 or 5 box without rebooting.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
By kkoene at 2010-08-23 14:24
This is really only valid if you are using some kind of multipathing technology or an SVC or SAN of some kind.
Code:
for H in `ls /sys/class/fc_host/`
do
echo updating $H
echo 1 > /sys/class/fc_host/${H}/issue_lip
sleep 1
echo "- - -" > /sys/class/scsi_host/${H}/scan
sleep 1
done
Then run cfgvpath and after that completes run lsvpcfg.
After those commands complete you should be able to do the following:
fdisk <device name or vpath>
create partition using full disk size (usually primary part.)
change id and partition to LVM then run:
Code:
pvcreate <pvname>
pvscan to make sure physical volume is there
vgcreate -s 64 <vg_name> /dev/<vpathname>
lvcreate -l <# of extents> -n <full path of vg and lv>
mkfs -j /dev/<vgname>/<lvname>
Then create an entry in /etc/fstab for the filesystem. Once complete with that, you need to run the mkdir command.
mkdir <fs path>
mount <fs>
NOTE: Sometimes the syntax for lvcreate is: lvcreate -L(size) lvname vgname.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.