NOTE: I found a much better way to do this.
See my new post: Openfiler Will Not Map iSCSI Luns to iSCSI Targets (Part 2). Use the directions below at your own risk! The solution below doesn’t fix the problem for NFS, btrfs, ext2\3\4, or xfs and can possibly lead to data loss.
Last night I was putting the finishing touches on my new Openfiler 2.99 box. Once strange thing, although I could see my volumes in the ‘Volume Management’ page, clicking ‘Map’ in the iSCSI target’s Lun Mapping page would just refresh the page without any changes.
In my case, running lvscan showed that the volumes were ‘inactive’. Changing them to ‘active’ by running ‘lvchange -ay /dev/vol/volname’ allowed me to map again! Sadly, rebooting changed them back to ‘inactive’, probably since they’re on a software raid volume that isn’t automatically assembling on boot.
so, back to editing the rc.local.
- run lvscan to find your inactive volumes.
- vi /etc/rc.local and add the following lines (change to your /dev/vg/volume names though):
service openfiler stop #reactive lvm volumes lvchange -ay /dev/jetstor/axisdisk lvchange -ay /dev/jetstor/dpmbackups lvchange -ay /dev/jetstor/desktopimages #reimport openfiler volumes /root/remake_vol_info2 service openfiler start
One important note! You might need the remake_vol_info2 script from my previous post here: Openfiler Software Raid Volumes Disappear on Reboot. Because of the software raid problem, my final /etc/rc.local looks like this:
#!/bin/sh # # This script will be executed *after* all the other init scripts. # You can put your own initialization stuff in here if you don't # want to do the full Sys V style init stuff. touch /var/lock/subsys/local #stop openfiler service to make changes to storage subsystem service openfiler stop #recreate software raid volumes on JetStor mdadm -A -s #recreate volumes in the Openfiler GUI /root/remake_vol_info2 #reactive lvm volumes lvchange -ay /dev/jetstor/axisdisk lvchange -ay /dev/jetstor/dpmbackups lvchange -ay /dev/jetstor/desktopimages #restart openfiler service with all volumes service openfiler start