Quantcast
Channel: linuxadmin: Expanding Linux SysAdmin knowledge
Viewing all articles
Browse latest Browse all 17793

Issue with iSCSI initiator and LVM, not mounting at boot.

$
0
0

OS is Debian Wheezy. I have an iSCSI target set up, exporting the LUN to my initiator, which registers it as /dev/sdb. This works perfectly.

I then set up an lvm, /dev/vgx, on top of that physical device. Again, this works fine. EXCEPT when I reboot. The VG is detected, but the LVs in it are inactive.

I've tried putting "vgchange -ay /dev/vgx" into my rc.local, but the LVs are still inactive every time I boot. However, as soon as I run that command manually, they come up!

(1) The LVs are not being used for boot disks on the host itself, so I'm not worried about them starting late in the boot process. (2) This LUN is being exported to two different hosts, who will use different LVs within it (Xen shared storage for live migration for the curious); ideally my rc.local will activate specific LVs on each host and leave the rest inactive. (3) I've tried changing the order of my daemons in /etc/rc5.d, but this doesn't affect it at all. (4) I've tested various underlying block devices on the target (raw disk, LVM partition, and ZFS Zvol, which is my solution of choice) and this has no effect.

Has anyone seen this before? I'm probably missing something, but I've followed three different guides on setting up Xen live migration and they all agree on the steps, which I followed to the letter. None of them mention issues with the LVs being detected on boot.

EDIT: I may have jumped the gun a bit in declaring it fixed. More results coming.

EDIT2: I believe I got it working. It was one of three problems, which I'll try to narrow down tomorrow: (1) I've been using bp3959's suggestion since I saw it, so this might have played a part; it was working in rc.local, but since that was happening after waiting ~10 minutes for my VMs to start (and fail), I didn't notice it at first. But once I disabled the VMs it was working great. (2) I was using /bin/bash in my "initscript", when I should have been using /bin/sh, but I have no clue if that matters. (3) I had manually added a symlink into /etc/rc5.d and given it a number between other services, when I should have run update-rc.d to add it automatically. Either way, after doing those three things, my little script is working. Here it is if you're interested: http://pastebin.com/ZtRL8ZYz

submitted by djbon2112
[link][7 comments]

Viewing all articles
Browse latest Browse all 17793

Trending Articles