Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.6.4 and multipathing #3297

Closed
chjohnst opened this issue Apr 15, 2015 · 13 comments
Closed

0.6.4 and multipathing #3297

chjohnst opened this issue Apr 15, 2015 · 13 comments
Milestone

Comments

@chjohnst
Copy link

I did an upgrade from 0.6.3 to 0.6.4 where mpath devices were the previous device names (should have used dev-id perhaps), upon reboot ZFS came up using the dev-id disk names now losing the mpath capability. Is there a way to convert zfs to use different disk names from the current?

I see the code actually scans upon import based on a set of paths serialized, but is there a way to instruct the cache file to use new devices? (ie, scsi-xxxxx is replaced by mpath-xxxxxxx)

@behlendorf
Copy link
Contributor

Yes, export the pool and then re-import it using zpool import -d /dev/mapper/. The updated path names will he persistent.

@smaurin
Copy link

smaurin commented May 6, 2015

Hello same problem, after reboot on Ubuntu 14.04.2 and upgrade 0.6.3 -> 0.6.4, module multipath comes after zfs module, so ZFS import at mountall step all volumes without multipath devices aliases.
Work around consist to rename zfs.ko before reboot, let multipath load and then manually insert module and import on /dev/mapper directory.
I did initramfs mods to exclude zfs and preload multipath, helas, multipathd come anyway after mountall at init and problem come back.
I don't know how to force zfs to only import device from determined directory (here /dev/mapper) or exclude a device list, may be such capabilities would be welcome.

@gdevenyi
Copy link
Contributor

@smaurin I had a similar problem, do you have multipath-tools-boot installed? This adds multipath to the initramfs very early to get the disks setup.

@gdevenyi
Copy link
Contributor

After further testing, I'm also experiencing this bug. It looks like zfs comes up before multipath, resulting in it importing via the raw disk interface instead of the multipath device.

@smaurin
Copy link

smaurin commented Sep 15, 2015

0.6.5 seems to correct this bug with ubuntu 14.04.3.

@gdevenyi
Copy link
Contributor

Doesn't' seem to have solved my problem on 14.04.3. Right now, ZFS imports on the /dev/mapper/* interfaces, so at least its doing multipath, buy it's not using my vdev_id.conf names

@FransUrbo
Copy link
Contributor

To do that, don't you have to use /dev/disk/by-vdev?

@gdevenyi
Copy link
Contributor

Yes, I have:

vdev_id.conf

multipath yes

#       PCI_SLOT HBA PORT  CHANNEL NAME
channel 06:00.0  1         A
channel 06:00.0  0         B
channel 81:00.0  1         A
channel 81:00.0  0         B

alias SSD1 /dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_SERIALNO1
alias SSD2 /dev/disk/by-id/ata-Samsung_SSD_850_PRO_128GB_SERIALNO2

And /dev/disk/by-vdev is properly populated once the system is running:

ls -l
total 0
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B0 -> ../../dm-26
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B1 -> ../../dm-31
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B10 -> ../../dm-47
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B11 -> ../../dm-52
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B12 -> ../../dm-25
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B13 -> ../../dm-30
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B14 -> ../../dm-9
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B15 -> ../../dm-14
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B16 -> ../../dm-20
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B17 -> ../../dm-1
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B18 -> ../../dm-3
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B19 -> ../../dm-56
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B2 -> ../../dm-10
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B20 -> ../../dm-35
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B21 -> ../../dm-40
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B22 -> ../../dm-46
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B23 -> ../../dm-51
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B24 -> ../../dm-16
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B25 -> ../../dm-29
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B26 -> ../../dm-8
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B27 -> ../../dm-13
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B28 -> ../../dm-19
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B29 -> ../../dm-24
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B3 -> ../../dm-15
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B30 -> ../../dm-44
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B31 -> ../../dm-55
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B32 -> ../../dm-34
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B33 -> ../../dm-39
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B34 -> ../../dm-45
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B35 -> ../../dm-50
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B36 -> ../../dm-5
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B37 -> ../../dm-28
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B38 -> ../../dm-7
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B39 -> ../../dm-12
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B4 -> ../../dm-21
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B40 -> ../../dm-18
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B41 -> ../../dm-23
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B42 -> ../../dm-33
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B43 -> ../../dm-54
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B44 -> ../../dm-59
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B45 -> ../../dm-38
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B46 -> ../../dm-43
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B47 -> ../../dm-49
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B48 -> ../../dm-4
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B49 -> ../../dm-27
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B5 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B50 -> ../../dm-6
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B51 -> ../../dm-11
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B52 -> ../../dm-17
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B53 -> ../../dm-22
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B54 -> ../../dm-32
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B55 -> ../../dm-53
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B56 -> ../../dm-58
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B57 -> ../../dm-37
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B58 -> ../../dm-42
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B59 -> ../../dm-48
lrwxrwxrwx 1 root root 10 Sep 16 14:04 B6 -> ../../dm-2
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B7 -> ../../dm-57
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B8 -> ../../dm-36
lrwxrwxrwx 1 root root 11 Sep 16 14:04 B9 -> ../../dm-41
lrwxrwxrwx 1 root root  9 Sep 16 14:04 SSD1 -> ../../sdb
lrwxrwxrwx 1 root root 10 Sep 16 14:04 SSD1-part1 -> ../../sdb1
lrwxrwxrwx 1 root root 10 Sep 16 14:04 SSD1-part2 -> ../../sdb2
lrwxrwxrwx 1 root root  9 Sep 16 14:04 SSD2 -> ../../sda
lrwxrwxrwx 1 root root 10 Sep 16 14:04 SSD2-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Sep 16 14:04 SSD2-part2 -> ../../sda2

By the zpool is imported on the entries in /dev/mapper, rather than the vdev entries.

@FransUrbo
Copy link
Contributor

What I meant was, that you might have better luck running:

zpool import -d /dev/disk/by-vdev

@gdevenyi
Copy link
Contributor

Sure, I can do that, but my issue is that it doesn't work properly during boot.

I originally created this array using by-vdev devices and if I import after boot things are fine.

@behlendorf
Copy link
Contributor

@gdevenyi have you tried introducing a brief delay during the boot process. What's most likely happening is the pool is being imported before all the by-vdev links have had a chance to be created. If you have a large pool (10's of disks) you may need to wait a few seconds.

@behlendorf behlendorf added this to the 0.7.0 milestone Sep 21, 2015
@gdevenyi
Copy link
Contributor

It is indeed 10's of disks. I have increased the delays that ZFS offers in its configs, is there any other place I could add a delay?

@behlendorf
Copy link
Contributor

This has been resolved in master and will be further improved by #4794 when its merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants