Usando o Overlayfs com compartilhamento samba como lowerdir

0

Gostaria de configurar um overlayfs que usa um compartilhamento de samba montado como lowerdir . Então, por exemplo,

  • /tmp/share : Aqui montei um compartilhamento de um servidor samba remoto. A partilha é apenas de leitura.
  • /tmp/overlay : diretório vazio (no início) para fazer as alterações
  • /tmp/workdir : Workdir para overlayfs (na mesma partição que /tmp/overlay )
  • / tmp / target: o caminho que eu quero montar o overlayfs em

Eu montei usando o seguinte comando

mount -t overlay -o lowerdir=/tmp/share,upperdir=/tmp/overlay,workdir=/tmp/workdir overlay /tmp/target

Quando eu tento chamar ls -al /tmp/target , isso acaba algumas vezes em uma tarefa pendente (então ele não volta), às vezes funciona e eu vejo exatamente o mesmo que na minha pasta compartilhada (como meu upperdir está vazio ). Últimas quando eu tento abrir um arquivo eu recebo um processo, que não volta. dmesg fornece a seguinte saída:

[ 1959.881717] Modules linked in: overlay arc4 md4 nls_utf8 cifs ccm fscache tcp_diag inet_diag unix_diag nvram msr xt_CHECKSUM iptable_mangle ipt_REJECT nf_reject_ipv4 xt_tcpudp bnep ebtable_filter ebtables ip6table_filter ip6_tables ipt_MASQUERADE nf_nat_masquerade_ipv4 xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype xt_conntrack nf_nat nf_conntrack iptable_filter br_netfilter bridge ip_tables x_tables stp llc aufs input_leds symap_custom_4_4_0_137_generic_x86_64(POE) pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) symev_custom_4_4_0_137_generic_x86_64(OE) vboxdrv(OE) bluetooth binfmt_misc snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic intel_rapl snd_hda_intel x86_pkg_temp_thermal snd_hda_codec intel_powerclamp snd_hda_core coretemp snd_hwdep
[ 1959.881917]  crct10dif_pclmul crc32_pclmul snd_pcm ghash_clmulni_intel snd_seq_midi snd_seq_midi_event aesni_intel snd_rawmidi aes_x86_64 lrw gf128mul snd_seq glue_helper ablk_helper cryptd snd_seq_device snd_timer snd serio_raw sb_edac soundcore mei_me edac_core mei shpchp lpc_ich kvm_intel kvm irqbypass 8250_fintek mac_hid parport_pc ppdev lp parport autofs4 hid_generic usbhid hid nouveau mxm_wmi psmouse video i2c_algo_bit ttm drm_kms_helper e1000e syscopyarea sysfillrect sysimgblt fb_sys_fops ptp drm ahci pps_core pata_acpi libahci fjes wmi
[ 1959.882093] CPU: 0 PID: 3782 Comm: rtvscand Tainted: P           OE   4.4.0-137-generic #163-Ubuntu
[ 1959.882104] Hardware name: LENOVO 30A6S45A00/102F, BIOS A4KT89AUS 06/17/2016
[ 1959.882114] task: ffff88085490f000 ti: ffff8808558e8000 task.ti: ffff8808558e8000
[ 1959.882122] RIP: 0010:[<ffffffffc088c3b7>]  [<ffffffffc088c3b7>] build_path_from_dentry+0x57/0x3e0 [cifs]
[ 1959.882165] RSP: 0018:ffff8808558eba78  EFLAGS: 00210202
[ 1959.882172] RAX: 000000005a5d0540 RBX: 0000000000000000 RCX: 000000000000002f
[ 1959.882181] RDX: 0000000000000040 RSI: 00617461646f722e RDI: ffff880850ca2d80
[ 1959.882189] RBP: ffff8808558ebad0 R08: 0000000000000000 R09: 0000000000000000
[ 1959.882198] R10: ffff8807783279b0 R11: 0000000000000000 R12: ffff8808524b1140
[ 1959.882206] R13: ffff880854bc9000 R14: ffff880074dd6600 R15: ffff8808518c8000
[ 1959.882215] FS:  0000000000000000(0000) GS:ffff88087fc00000(0063) knlGS:00000000e4082b40
[ 1959.882224] CS:  0010 DS: 002b ES: 002b CR0: 0000000080050033
[ 1959.882232] CR2: 0000000000faac88 CR3: 00000008556f8000 CR4: 0000000000160670
[ 1959.882240] Stack:
[ 1959.882245]  00617461646f722e 0000000080200001 ffff880850ca2d80 ffffffff00000000
[ 1959.882261]  ffff8807428313c0 0000000100000000 00000000fffffff4 ffff8808524b1140
[ 1959.882277]  ffff880854bc9000 ffff880074dd6600 ffff8808518c8000 ffff8808558ebc28
[ 1959.882292] Call Trace:
[ 1959.882318]  [<ffffffffc089178d>] cifs_open+0x9d/0x810 [cifs]
[ 1959.882331]  [<ffffffff8122e594>] ? dput+0x34/0x230
[ 1959.882342]  [<ffffffff81214982>] do_dentry_open+0x202/0x310
[ 1959.882368]  [<ffffffffc08916f0>] ? cifs_write_from_iter.isra.22+0x4d0/0x4d0 [cifs]
[ 1959.882378]  [<ffffffff81215b14>] vfs_open+0x54/0x80
[ 1959.882387]  [<ffffffff81225b2c>] path_openat+0x59c/0x1340
[ 1959.882395]  [<ffffffff812214cd>] ? terminate_walk+0xbd/0xd0
[ 1959.882405]  [<ffffffff81226ee1>] ? filename_lookup+0xf1/0x180
[ 1959.882414]  [<ffffffff81227ac1>] do_filp_open+0x91/0x100
[ 1959.882423]  [<ffffffff81235746>] ? __alloc_fd+0x46/0x190
[ 1959.882432]  [<ffffffff81215ee8>] do_sys_open+0x138/0x2a0
[ 1959.882444]  [<ffffffffc05d443c>] ? symev_fname_event+0x11c/0x5a0 [symev_custom_4_4_0_137_generic_x86_64]
[ 1959.882459]  [<ffffffff81270b5b>] compat_SyS_open+0x1b/0x20
[ 1959.882470]  [<ffffffffc05d4a7b>] symev_compat_open+0x9b/0x120 [symev_custom_4_4_0_137_generic_x86_64]
[ 1959.882483]  [<ffffffff81003e13>] do_fast_syscall_32+0xb3/0x180
[ 1959.882495]  [<ffffffff81858397>] sysenter_flags_fixed+0x8/0x15
[ 1959.882502] Code: 89 45 b8 e8 6c f8 ff ff 48 89 c6 48 89 45 a8 8b 43 48 c7 45 c0 00 00 00 00 89 c2 83 e2 40 83 fa 01 19 db 89 d9 83 e1 2d 83 c1 2f <f6> 86 64 05 00 00 02 88 4d d7 0f 85 b5 01 00 00 a9 00 00 00 01 
[ 1959.882657] RIP  [<ffffffffc088c3b7>] build_path_from_dentry+0x57/0x3e0 [cifs]
[ 1959.882683]  RSP <ffff8808558eba78>
[ 1959.885261] ---[ end trace 8db9c11e861fc456 ]---
[ 1981.118363] general protection fault: 0000 [#2] SMP 
[ 1981.118387] Modules linked in: overlay arc4 md4 nls_utf8 cifs ccm fscache tcp_diag inet_diag unix_diag nvram msr xt_CHECKSUM iptable_mangle ipt_REJECT nf_reject_ipv4 xt_tcpudp bnep ebtable_filter ebtables ip6table_filter ip6_tables ipt_MASQUERADE nf_nat_masquerade_ipv4 xfrm_user xfrm_algo iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 xt_addrtype xt_conntrack nf_nat nf_conntrack iptable_filter br_netfilter bridge ip_tables x_tables stp llc aufs input_leds symap_custom_4_4_0_137_generic_x86_64(POE) pci_stub vboxpci(OE) vboxnetadp(OE) vboxnetflt(OE) symev_custom_4_4_0_137_generic_x86_64(OE) vboxdrv(OE) bluetooth binfmt_misc snd_hda_codec_hdmi snd_hda_codec_realtek snd_hda_codec_generic intel_rapl snd_hda_intel x86_pkg_temp_thermal snd_hda_codec intel_powerclamp snd_hda_core coretemp snd_hwdep
[ 1981.118581]  crct10dif_pclmul crc32_pclmul snd_pcm ghash_clmulni_intel snd_seq_midi snd_seq_midi_event aesni_intel snd_rawmidi aes_x86_64 lrw gf128mul snd_seq glue_helper ablk_helper cryptd snd_seq_device snd_timer snd serio_raw sb_edac soundcore mei_me edac_core mei shpchp lpc_ich kvm_intel kvm irqbypass 8250_fintek mac_hid parport_pc ppdev lp parport autofs4 hid_generic usbhid hid nouveau mxm_wmi psmouse video i2c_algo_bit ttm drm_kms_helper e1000e syscopyarea sysfillrect sysimgblt fb_sys_fops ptp drm ahci pps_core pata_acpi libahci fjes wmi
[ 1981.118745] CPU: 4 PID: 12471 Comm: vi Tainted: P      D    OE   4.4.0-137-generic #163-Ubuntu
[ 1981.118755] Hardware name: LENOVO 30A6S45A00/102F, BIOS A4KT89AUS 06/17/2016
[ 1981.118764] task: ffff8807a5f20e00 ti: ffff8808558e8000 task.ti: ffff8808558e8000
[ 1981.118772] RIP: 0010:[<ffffffffc088c3b7>]  [<ffffffffc088c3b7>] build_path_from_dentry+0x57/0x3e0 [cifs]
[ 1981.118814] RSP: 0018:ffff8808558ebaa8  EFLAGS: 00010202
[ 1981.118822] RAX: 000000005a5d0540 RBX: 0000000000000000 RCX: 000000000000002f
[ 1981.118830] RDX: 0000000000000040 RSI: 00617461646f722e RDI: ffff880850ca2d80
[ 1981.118838] RBP: ffff8808558ebb00 R08: 0000000000000000 R09: 0000000000000000
[ 1981.118845] R10: ffff8807783279b0 R11: 0000000000000000 R12: ffff8808524b1140
[ 1981.118856] R13: ffff880854bc9000 R14: ffff88082446a300 R15: ffff8808518c8000
[ 1981.118869] FS:  00007f362ac429c0(0000) GS:ffff88087fd00000(0000) knlGS:0000000000000000
[ 1981.118883] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 1981.118894] CR2: 00007f6ea7a2a750 CR3: 000000072f052000 CR4: 0000000000160670
[ 1981.118906] Stack:
[ 1981.119626]  00617461646f722e 5e63f69701d465ec ffff880850ca2d80 0000000000000000
[ 1981.120491]  ffff8807428313c0 0000000000000002 00000000fffffff4 ffff8808524b1140
[ 1981.121337]  ffff880854bc9000 ffff88082446a300 ffff8808518c8000 ffff8808558ebc58
[ 1981.122026] Call Trace:
[ 1981.122718]  [<ffffffffc089178d>] cifs_open+0x9d/0x810 [cifs]
[ 1981.123379]  [<ffffffff8122e594>] ? dput+0x34/0x230
[ 1981.124278]  [<ffffffff81214982>] do_dentry_open+0x202/0x310
[ 1981.125327]  [<ffffffffc08916f0>] ? cifs_write_from_iter.isra.22+0x4d0/0x4d0 [cifs]
[ 1981.126353]  [<ffffffff81215b14>] vfs_open+0x54/0x80
[ 1981.127382]  [<ffffffff81225b2c>] path_openat+0x59c/0x1340
[ 1981.128297]  [<ffffffff81850c9d>] ? __schedule+0x30d/0x7f0
[ 1981.128921]  [<ffffffff81850c91>] ? __schedule+0x301/0x7f0
[ 1981.129511]  [<ffffffff81850c9d>] ? __schedule+0x30d/0x7f0
[ 1981.130109]  [<ffffffff81226ee1>] ? filename_lookup+0xf1/0x180
[ 1981.130859]  [<ffffffff81227ac1>] do_filp_open+0x91/0x100
[ 1981.131424]  [<ffffffffc05dae2e>] ? sym_mutex_unlock+0xe/0x10 [symev_custom_4_4_0_137_generic_x86_64]
[ 1981.131970]  [<ffffffff81235746>] ? __alloc_fd+0x46/0x190
[ 1981.132508]  [<ffffffff81215ee8>] do_sys_open+0x138/0x2a0
[ 1981.133048]  [<ffffffffc05d443c>] ? symev_fname_event+0x11c/0x5a0 [symev_custom_4_4_0_137_generic_x86_64]
[ 1981.133600]  [<ffffffff8121606e>] SyS_open+0x1e/0x20
[ 1981.134232]  [<ffffffffc05d495b>] symev_open+0x9b/0x120 [symev_custom_4_4_0_137_generic_x86_64]
[ 1981.134748]  [<ffffffff8185538e>] entry_SYSCALL_64_fastpath+0x22/0xc1
[ 1981.135251] Code: 89 45 b8 e8 6c f8 ff ff 48 89 c6 48 89 45 a8 8b 43 48 c7 45 c0 00 00 00 00 89 c2 83 e2 40 83 fa 01 19 db 89 d9 83 e1 2d 83 c1 2f <f6> 86 64 05 00 00 02 88 4d d7 0f 85 b5 01 00 00 a9 00 00 00 01 
[ 1981.135902] RIP  [<ffffffffc088c3b7>] build_path_from_dentry+0x57/0x3e0 [cifs]
[ 1981.136466]  RSP <ffff8808558ebaa8>
[ 1981.137036] ---[ end trace 8db9c11e861fc457 ]---

Eu tentei isso em um Ubuntu 14.04 e um Ubuntu 16.04 (minha empresa não implementou Ubuntu 18.04 internamente agora). Ambos estão usando um 4.4.0 Kernel .

Gostaria de saber se posso interromper a investigação, pois não há suporte para overlayfs na parte superior de um compartilhamento de samba ou se há chance de fazê-lo. Pesquisando a única coisa que eu encontrei sobre a combinação de samba e overlayfs foi link mas aqui eu acho que eles significam que overlayfs não pode ser exportado por samba . Eu quero a outra direção. Existe alguém lá fora que usa com sucesso um overlayfs onde o df inferior é uma samba ?

UPDATE # 1

Eu também testei em Ubuntu 18.04 usando 4.15.0 Kernel e em um primeiro teste curto funcionou lá. Então eu provavelmente acho que é um problema com o 4.4.0 Kernel ....

    
por Sascha Effert 17.10.2018 / 10:00

0 respostas