How to use LVM for extend the root filesystem

First of all I must say I am a newbie in this fascinating world of LEDE so I apologize just in case I writing any stupidity or nonsense idea.

Well, after read Using storage devices and Extroot configuration and check that I was be able extend the root filesystem of my Linksys WRT160NL, automatic mount included, I wondered whether it would not be better to use LVM, especially when the router has only one USB port as is my case. And here I am, sharing my experience and asking for help because I have been able to do almost process except auto mount of overlay logical volume.

Yes I know, the Linksys WRT160NL is an old router but I had it and I think it's enough to learn LEDE.

The goal

Set up a USB storage device for

  • expand the firmware space of the router
  • create a swap space
  • create a storage space for file sharing

using logical volume manager (LVM).

The environment

These are the logical volumes to create.

  • Volume Group: sandisk
    • Logical Volume: swap - 64MiB (2 x 32MiB)
    • Locical Volume: overlay - 128MiB
    • Logical Volume: cifs - 2048MiB

The actions

jabberwock:~ tabad$ ssh root@192.168.10.1
root@192.168.10.1's password:


BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

These firsts steps have been taken from Using storage devices documentation.

I am starting updating the list of available packages.

root@LEDE:~# opkg update

Afterwards I am installing the kernel support for USB Mass Storage devices (kmod-usb-storage package) and USB devices listing utilities (usbutils package)

root@LEDE:~# opkg install kmod-usb-storage usbutils
Installing kmod-usb-storage (4.4.92-1) to root...
Installing kmod-scsi-core (4.4.92-1) to root...
Installing usbutils (007-6) to root...
Installing librt (1.1.16-1) to root...
Installing libusb-1.0 (1.0.21-1) to root...
Configuring kmod-scsi-core.
Configuring kmod-usb-storage.
Configuring librt.
Configuring libusb-1.0.
Configuring usbutils.

and I am checking the USB storage device is detected by operating system.

root@LEDE:~# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=ehci-platform/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 480M

root@LEDE:~# ls -l /dev/sd*
brw-------    1 root     root        8,   0 Oct 17 19:23 /dev/sda

It seems all is correct. I am installing the block device mounting and checking utilities (block-mount package) to get more information about block devices.

Without block-mount package the configuration section fstab does not exist.

root@LEDE:~# uci show fstab  
uci: Entry not found
root@LEDE:~# opkg install block-mount
Installing block-mount (2017-06-30-bdcb075f-1) to root...
Configuring block-mount.
this file has been obsoleted. please call "/sbin/block mount" directly

Now with block-mount package installed the configuration section fstab is present.

root@LEDE:~# cat /etc/config/fstab   
config 'global'                      
        option  anon_swap       '0'  
        option  anon_mount      '0'  
        option  auto_swap       '1'  
        option  auto_mount      '1'  
        option  delay_root      '5'  
        option  check_fs        '0'

root@LEDE:~# uci show fstab      
fstab.@global[0]=global          
fstab.@global[0].anon_swap='0'   
fstab.@global[0].anon_mount='0'  
fstab.@global[0].auto_swap='1'   
fstab.@global[0].auto_mount='1'  
fstab.@global[0].delay_root='5'  
fstab.@global[0].check_fs='0'

Now, I am trying to get more information about the /dev/sda storage device

root@LEDE:~# block info | grep /dev/sda
root@LEDE:~#

but no information is shown. That is because /dev/sda is empty, it has not any partition table defined. It is time to configure /dev/sda but for that I need the GPT partition table manipulation utility (gdisk package).

root@LEDE:~# opkg install gdisk
Installing gdisk (1.0.1-1) to root...
Installing libstdcpp (5.4.0-1) to root...
Installing libuuid (2.29.2-1) to root...
Installing libpopt (1.16-1) to root...
Configuring libstdcpp.
Configuring libuuid.
Configuring libpopt.
Configuring gdisk.

Once that gdisk is installed I am going to create a new partition with the complete size of the device for the physical volume.

root@LEDE:~# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
  MBR: not present
  BSD: not present
  APM: not present
  GPT: not present

Creating new GPT entries.

Command (? for help):

Even though gdisk has created a new partition, I'm going to delete it to start from scratch.

Command (? for help): x

Expert command (? for help): z
About to wipe out GPT on /dev/sda. Proceed? (Y/N): Y
GPT data structures destroyed! You may now partition the disk using fdisk or
other utilities.
Blank out MBR? (Y/N): Y
root@LEDE:~#

root@LEDE:~# gdisk /dev/sda
GPT fdisk (gdisk) version 1.0.1

Partition table scan:
 MBR: not present
 BSD: not present
 APM: not present
 GPT: not present

Creating new GPT entries.

Command (? for help): n
Partition number (1-128, default 1):
First sector (34-31266782, default = 2048) or {+-}size{KMGTP}:
Last sector (2048-31266782, default = 31266782) or {+-}size{KMGTP}:
Current type is 'Linux filesystem'
Hex code or GUID (L to show codes, Enter = 8300): 8e00
Changed type of partition to 'Linux LVM'

Command (? for help): p
Disk /dev/sda: 31266816 sectors, 14.9 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): D6C966E5-4910-46A3-B153-0DAD0F38D94A
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 31266782
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048        31266782   14.9 GiB    8E00  Linux LVM

Command (? for help): w

Final checks complete. About to write GPT data. THIS WILL OVERWRITE EXISTING
PARTITIONS!!

Do you want to proceed? (Y/N): Y
OK; writing new GUID partition table (GPT) to /dev/sda.
The operation has completed successfully.

All is ready to create the sandisk volume group. To create it first I need the LVM2 userspace toolset (lvm2 package).

root@LEDE:~# opkg install lvm2
Installing lvm2 (2.02.165-1) to root...
Installing kmod-crypto-hash (4.4.92-1) to root...
Installing kmod-crypto-null (4.4.92-1) to root...
Installing kmod-crypto-aead (4.4.92-1) to root...
Installing kmod-crypto-pcompress (4.4.92-1) to root...
Installing kmod-crypto-manager (4.4.92-1) to root...
Installing kmod-dm (4.4.92-1) to root...
Installing libdevmapper (2.02.165-1) to root...
Installing libblkid (2.29.2-1) to root...
Installing libreadline (7.0-1) to root...
Installing terminfo (6.0-1) to root...
Installing libncurses (6.0-1) to root...
Configuring terminfo.
Configuring kmod-crypto-hash.
Configuring kmod-crypto-null.
Configuring kmod-crypto-aead.
Configuring kmod-crypto-pcompress.
Configuring kmod-crypto-manager.
Configuring kmod-dm.
Configuring libdevmapper.
Configuring libblkid.
Configuring libreadline.
Configuring libncurses.
Configuring lvm2.
File descriptor 3 (/tmp/lock/opkg.lock) leaked on lvm invocation. Parent PID 3308: /bin/sh
  Reading all physical volumes.  This may take a while...
File descriptor 3 (/tmp/lock/opkg.lock) leaked on lvm invocation. Parent PID 3308: /bin/sh

Well, I am creating the physical volume

root@LEDE:~# pvcreate --yes /dev/sda1
  Physical volume "/dev/sda1" successfully created.

and the volume group sandisk.

root@LEDE:~# vgcreate --physicalextentsize 16M --yes sandisk /dev/sda1
  Volume group "sandisk" successfully created

Now is the turn of logical volumes.

root@LEDE:~# lvcreate --size 64M --name swap sandisk
  Logical volume "swap" created.

root@LEDE:~# lvcreate --size 128M --name overlay sandisk
  Logical volume "overlay" created.

root@LEDE:~# lvcreate --size 2048M --name cifs sandisk
  Logical volume "cifs" created.

root@LEDE:~# lvscan
ACTIVE            '/dev/sandisk/swap' [64.00 MiB] inherit
ACTIVE            '/dev/sandisk/overlay' [128.00 MiB] inherit
ACTIVE            '/dev/sandisk/cifs' [2.00 GiB] inherit

root@LEDE:~# lvdisplay | egrep  '(---|LV (Name|UUID|Size))' -
  --- Logical volume ---
  LV Name                swap
  LV UUID                3TxG1p-2MxX-htV6-Z4mo-R2Zq-IeHU-O2nxWn
  LV Size                64.00 MiB
  --- Logical volume ---
  LV Name                overlay
  LV UUID                mOieBO-cTRS-y2xu-CRDo-f6DO-UlFb-lVRM8z
  LV Size                128.00 MiB
  --- Logical volume ---
  LV Name                cifs
  LV UUID                AsHiwm-1JRe-DjrJ-9ZyR-1Qox-nZuO-PzS2W3
  LV Size                2.00 GiB

root@LEDE:~# vgdisplay | egrep  '(---|VG (Name|UUID|Size))' -
  --- Volume group ---
  VG Name               sandisk
  VG Size               14.91 GiB
  VG UUID               XhRNZd-9rch-xt6t-lXlt-vlkT-OxO7-fQAwHS

root@LEDE:~# pvdisplay | egrep  '(---|(PV|VG) (Name|UUID|Size))' -
  --- Physical volume ---
  PV Name               /dev/sda1
  VG Name               sandisk
  PV Size               14.91 GiB / not usable 1.98 MiB
  PV UUID               d0zv8P-VSSE-vQdE-upLJ-NFYz-49PB-K1CzyN

For the filesystems other than swap I am going to use Flash-Friendly File System (F2FS) so I will need the f2fs-tools and kmod-fs-f2fs packages.

root@LEDE:~# opkg install f2fs-tools kmod-fs-f2fs
Installing f2fs-tools (1.8.0-3) to root...
Installing libf2fs (1.8.0-3) to root...
Installing mkf2fs (1.8.0-3) to root...
Installing f2fsck (1.8.0-3) to root...
Installing kmod-fs-f2fs (4.4.92-1) to root...
Configuring libf2fs.
Configuring mkf2fs.
Configuring f2fsck.
Configuring f2fs-tools.
Configuring kmod-fs-f2fs.

Well, It seems all is ready to create the filesystems.

root@LEDE:~# mkswap -L swap /dev/sandisk/swap
Setting up swapspace version 1, size = 67104768 bytes

root@LEDE:~# mkfs.f2fs -l overlay /dev/sandisk/overlay

        F2FS-tools: mkfs.f2fs Ver: 1.8.0 (2017-02-03)

Info: Debug level = 0
Info: Label = overlay
Info: Trim is enabled
...
...
Info: format successful

root@LEDE:~# mkfs.f2fs -q -l cifs /dev/sandisk/cifs
                1.264C532000060715103220

root@LEDE:/# block info
/dev/mtdblock2: UUID="b9987b6c-6483eae0-ddc9a928-146c8265" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock3: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="d0zv8P-VSSE-vQdE-upLJ-NFYz-49PB-K1CzyN" TYPE="LVM2_member"
/dev/mapper/sandisk-cifs: UUID="b9b5f909-58ee-428c-9c74-e425730e1aad" VERSION="1.8" TYPE="f2fs"
/dev/mapper/sandisk-overlay: UUID="89eda2a9-f0b0-4e27-8bca-04d0870445fd" VERSION="1.8" TYPE="f2fs"
/dev/mapper/sandisk-swap: LABEL="swap" VERSION="1" TYPE="swap"

Once the file systems are created I am going configure the fstab section to test their auto-mount at boot time.

root@LEDE:/# block detect
config 'global'
        option  anon_swap       '0'
        option  anon_mount      '0'
        option  auto_swap       '1'
        option  auto_mount      '1'
        option  delay_root      '5'
        option  check_fs        '0'

config 'mount'
        option  target  '/mnt/sda1'
        option  uuid    'd0zv8P-VSSE-vQdE-upLJ-NFYz-49PB-K1CzyN'
        option  enabled '0'

config 'mount'
        option  target  '/mnt/sandisk-cifs'
        option  uuid    'b9b5f909-58ee-428c-9c74-e425730e1aad'
        option  enabled '0'

config 'mount'
        option  target  '/mnt/sandisk-overlay'
        option  uuid    '89eda2a9-f0b0-4e27-8bca-04d0870445fd'
        option  enabled '0'

config 'swap'
        optiondevice'/dev/mapper/sandisk-swap'
        optionenabled'0'

root@LEDE:/# block detect > /etc/config/fstab

root@LEDE:/# uci show fstab
fstab.@global[0]=global
fstab.@global[0].anon_swap='0'
fstab.@global[0].anon_mount='0'
fstab.@global[0].auto_swap='1'
fstab.@global[0].auto_mount='1'
fstab.@global[0].delay_root='5'
fstab.@global[0].check_fs='0'
fstab.@mount[0]=mount
fstab.@mount[0].target='/mnt/sda1'
fstab.@mount[0].uuid='d0zv8P-VSSE-vQdE-upLJ-NFYz-49PB-K1CzyN'
fstab.@mount[0].enabled='0'
fstab.@mount[1]=mount
fstab.@mount[1].target='/mnt/sandisk-cifs'
fstab.@mount[1].uuid='b9b5f909-58ee-428c-9c74-e425730e1aad'
fstab.@mount[1].enabled='0'
fstab.@mount[2]=mount
fstab.@mount[2].target='/mnt/sandisk-overlay'
fstab.@mount[2].uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
fstab.@mount[2].enabled='0'
fstab.@swap[0]=swap
fstab.@swap[0].device='/dev/mapper/sandisk-swap'
fstab.@swap[0].enabled='0'

Even though block detect detects it, there is not sense to mount /dev/sda1 because it is a physical volume.

root@LEDE:/# uci delete fstab.@mount[0]

Note that after delete a section the other ones are re-indexed.

root@LEDE:/# uci set fstab.@mount[0].enabled='1'
root@LEDE:/# uci set fstab.@mount[1].enabled='1'
root@LEDE:/# uci set fstab.@swap[0].enabled='1'

root@LEDE:/# uci changes fstab
-fstab.cfg044d78
fstab.cfg064d78.enabled='1'
fstab.cfg084d78.enabled='1'
fstab.cfg0a2640.enabled='1'

root@LEDE:/# uci commit fstab

root@LEDE:/# mkdir /mnt/sandisk-{overlay,cifs}

root@LEDE:~# reboot
root@LEDE:~# packet_write_wait: Connection to 192.168.10.1 port 22: Broken pipe

jabberwock:~ tabad$ ssh root@192.168.10.1
root@192.168.10.1's password:


BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

root@LEDE:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    13.8M     72.0K     13.7M   1% /tmp
/dev/mtdblock3            4.1M      3.0M      1.1M  73% /overlay
overlayfs:/overlay        4.1M      3.0M      1.1M  73% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mapper/sandisk-cifs
                          2.0G    188.0M      1.8G   9% /mnt/sandisk-cifs
/dev/mapper/sandisk-overlay
                        126.0M     50.0M     62.0M  45% /mnt/sandisk-overlay

root@LEDE:~# swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/sandisk-swap                partition       65532   0       -1

Now that everything seems to be going well, I'm going to configure extroot.

These lasts steps have been taken from Extroot configuration documentation.

root@LEDE:~# uci set fstab.@mount[1].target='/overlay'
root@LEDE:~# uci commit fstab

root@LEDE:~# tar -C /overlay -cf - . | tar -C /mnt/sandisk-overlay  -xf -

root@LEDE:~# umount /mnt/sandisk-overlay/
root@LEDE:~# mount /dev/mapper/sandisk-overlay /overlay

root@LEDE:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    13.8M      1.0M     12.8M   7% /tmp
/dev/mtdblock3          126.0M     60.0M     52.0M  54% /overlay
overlayfs:/overlay        4.1M      3.5M    640.0K  85% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mapper/sandisk-cifs
                          2.0G    188.0M      1.8G   9% /mnt/sandisk-cifs
/dev/mapper/sandisk-overlay
                        126.0M     60.0M     52.0M  54% /overlay

It seems extroot works sucessfuly. Now /overlay has 52MiB of free space instead of 1.1MiB.

root@LEDE:~# reboot
root@LEDE:~# packet_write_wait: Connection to 192.168.10.1 port 22: Broken pipe

The problem

After reboot I am hoping the logical volume overlay be mounted over /overlay directory at boot time automatically, but this not happens.

jabberwock:~ tabad$ ssh root@192.168.10.1
root@192.168.10.1's password:


BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

root@LEDE:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    13.8M    324.0K     13.4M   2% /tmp
/dev/mtdblock3            4.1M      3.5M    620.0K  85% /overlay
overlayfs:/overlay        4.1M      3.5M    620.0K  85% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mapper/sandisk-cifs
                          2.0G    188.0M      1.8G   9% /mnt/sandisk-cifs

root@LEDE:~# swapon -s
Filename                                Type            Size    Used    Priority
/dev/mapper/sandisk-swap                partition       65532   0       -1

The logical volume overlay has not been mounted at boot time over /overlay directory. Does anybody know why?. Please, could you help me?

1 Like

I could not find any flaw in your argument, I would have followed the same steps.
Have you had a look to the logs? Perhaps there is a message there explaining why it could not mount the overlay.

Hello @eduperez,

I have enabled logs

 root@LEDE:~# uci set system.@system[0].log_file='/var/log/messages'
 root@LEDE:~# uci set system.@system[0].klogconloglevele='8'
 root@LEDE:~# uci set system.@system[0].conloglevel='8'
 root@LEDE:~# uci set system.@system[0].log_type='file'
 root@LEDE:~# uci system.@system[0].log_size='64'
 root@LEDE:~# uci commit system

and I have restarted the system. This is the content of /var/log/messages file.

root@LEDE:~# cat /var/log/messages
Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2: File descriptor 12 (pipe:[912]) leaked on lvm invocation. Parent PID 728: /bin/sh
Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2:   Reading all physical volumes.  This may take a while...
Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2:   Found volume group "sandisk" using metadata type lvm2
Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2: File descriptor 12 (pipe:[912]) leaked on lvm invocation. Parent PID 728: /bin/sh
Sat Nov 25 02:45:43 2017 daemon.notice procd: /etc/rc.d/S15lvm2:   3 logical volume(s) in volume group "sandisk" now active
Sat Nov 25 02:45:45 2017 daemon.err block: Unkown action change
Sat Nov 25 02:45:45 2017 daemon.err block: Unkown action change
Sat Nov 25 02:45:45 2017 daemon.err block: Unkown action change
Sat Nov 25 02:45:46 2017 user.notice : Added device handler type: 8021ad
Sat Nov 25 02:45:46 2017 user.notice : Added device handler type: 8021q
Sat Nov 25 02:45:46 2017 user.notice : Added device handler type: macvlan
Sat Nov 25 02:45:46 2017 user.notice : Added device handler type: bridge
Sat Nov 25 02:45:46 2017 user.notice : Added device handler type: Network device
Sat Nov 25 02:45:46 2017 user.notice : Added device handler type: tunnel
Sat Nov 25 02:45:48 2017 daemon.err block: /dev/mtdblock2 is already mounted on /rom
Sat Nov 25 02:45:48 2017 daemon.err block: /dev/mtdblock3 is already mounted on /overlay
Sat Nov 25 02:45:48 2017 kern.info kernel: [   26.738515] Adding 65532k swap on /dev/mapper/sandisk-swap.  Priority:-1 extents:1 across:65532k
Sat Nov 25 02:45:50 2017 authpriv.info dropbear[884]: Not backgrounding
Sat Nov 25 02:45:51 2017 daemon.notice procd: /etc/rc.d/S96led: setting up led WLAN
Sat Nov 25 02:45:52 2017 kern.info kernel: [   31.290527] device eth0 entered promiscuous mode
Sat Nov 25 02:45:52 2017 daemon.notice netifd: Interface 'lan' is enabled
Sat Nov 25 02:45:52 2017 kern.info kernel: [   31.298241] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
Sat Nov 25 02:45:52 2017 daemon.notice netifd: Interface 'lan' is setting up now
Sat Nov 25 02:45:52 2017 daemon.notice netifd: Interface 'lan' is now up
Sat Nov 25 02:45:52 2017 daemon.notice netifd: Interface 'loopback' is enabled
Sat Nov 25 02:45:52 2017 daemon.notice netifd: Interface 'loopback' is setting up now
Sat Nov 25 02:45:52 2017 daemon.notice netifd: Interface 'loopback' is now up
Sat Nov 25 02:45:52 2017 kern.info kernel: [   31.345357] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
Sat Nov 25 02:45:53 2017 daemon.notice netifd: Interface 'wan' is enabled
Sat Nov 25 02:45:53 2017 daemon.notice netifd: Interface 'wan6' is enabled
Sat Nov 25 02:45:53 2017 daemon.notice netifd: Network device 'lo' link is up
Sat Nov 25 02:45:53 2017 daemon.notice netifd: Interface 'loopback' has link connectivity
Sat Nov 25 02:45:53 2017 kern.debug kernel: [   31.516951] ar71xx: pll_reg 0xb8050014: 0x13000a44
Sat Nov 25 02:45:53 2017 kern.info kernel: [   31.521793] eth0: link up (100Mbps/Full duplex)
Sat Nov 25 02:45:53 2017 kern.info kernel: [   31.566623] br-lan: port 1(eth0) entered forwarding state
Sat Nov 25 02:45:53 2017 kern.info kernel: [   31.572131] br-lan: port 1(eth0) entered forwarding state
Sat Nov 25 02:45:53 2017 daemon.notice netifd: Network device 'eth0' link is up
Sat Nov 25 02:45:53 2017 daemon.notice netifd: bridge 'br-lan' link is up
Sat Nov 25 02:45:53 2017 daemon.notice netifd: Interface 'lan' has link connectivity
Sat Nov 25 02:45:53 2017 kern.info kernel: [   31.614658] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
Sat Nov 25 02:45:53 2017 user.notice firewall: Reloading firewall due to ifup of lan (br-lan)
Sat Nov 25 02:45:54 2017 kern.debug kernel: [   32.872051] ath: EEPROM regdomain: 0x82d4
Sat Nov 25 02:45:54 2017 kern.debug kernel: [   32.876096] ath: EEPROM indicates we should expect a country code
Sat Nov 25 02:45:54 2017 kern.debug kernel: [   32.882297] ath: doing EEPROM country->regdmn map search
Sat Nov 25 02:45:54 2017 kern.debug kernel: [   32.887654] ath: country maps to regdmn code: 0x37
Sat Nov 25 02:45:54 2017 kern.debug kernel: [   32.892471] ath: Country alpha2 being used: ES
Sat Nov 25 02:45:54 2017 kern.debug kernel: [   32.896952] ath: Regpair used: 0x37
Sat Nov 25 02:45:54 2017 kern.debug kernel: [   32.900459] ath: regdomain 0x82d4 dynamically updated by user
Sat Nov 25 02:45:54 2017 daemon.info odhcpd[845]: Raising SIGUSR1 due to address change on br-lan
Sat Nov 25 02:45:54 2017 daemon.info procd: - init complete -
Sat Nov 25 02:45:55 2017 kern.debug kernel: [   33.446970] ar71xx: pll_reg 0xb8050018: 0x13000a44
Sat Nov 25 02:45:55 2017 kern.info kernel: [   33.451814] eth1: link up (100Mbps/Full duplex)
Sat Nov 25 02:45:55 2017 daemon.notice netifd: Network device 'eth1' link is up
Sat Nov 25 02:45:55 2017 daemon.notice netifd: Interface 'wan' has link connectivity
Sat Nov 25 02:45:55 2017 daemon.notice netifd: Interface 'wan' is setting up now
Sat Nov 25 02:45:55 2017 daemon.notice netifd: Interface 'wan6' has link connectivity
Sat Nov 25 02:45:55 2017 daemon.notice netifd: Interface 'wan6' is setting up now
Sat Nov 25 02:45:55 2017 kern.info kernel: [   33.460943] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
Sat Nov 25 02:45:55 2017 kern.info kernel: [   33.566786] br-lan: port 1(eth0) entered forwarding state
Sat Nov 25 02:45:55 2017 daemon.notice netifd: wan (1056): udhcpc: started, v1.25.1
Sat Nov 25 02:45:56 2017 daemon.notice netifd: wan (1056): udhcpc: sending discover
Sat Nov 25 02:45:56 2017 daemon.err odhcp6c[1055]: Failed to send DHCPV6 message to ff02::1:2 (Address not available)
Sat Nov 25 02:45:57 2017 daemon.notice netifd: wan (1056): udhcpc: sending select for 192.168.0.33
Sat Nov 25 02:45:57 2017 daemon.notice netifd: wan (1056): udhcpc: lease of 192.168.0.33 obtained, lease time 7200
Sat Nov 25 02:45:57 2017 daemon.notice netifd: Interface 'wan' is now up
Sat Nov 25 02:45:57 2017 user.notice firewall: Reloading firewall due to ifup of wan (eth1)
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: started, version 2.78 cachesize 150
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: DNS service limited to local subnets
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq-dhcp[1150]: DHCP, IP range 192.168.10.100 -- 192.168.10.249, lease time 12h
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: using local addresses only for domain lan
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: reading /tmp/resolv.conf.auto
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: using local addresses only for domain lan
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: using nameserver 192.168.0.1#53
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: read /etc/hosts - 4 addresses
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq[1150]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
Sat Nov 25 02:46:00 2017 daemon.info dnsmasq-dhcp[1150]: read /etc/ethers - 0 addresses
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1150]: exiting on receipt of SIGTERM
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: started, version 2.78 cachesize 150
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: DNS service limited to local subnets
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: compile time options: IPv6 GNU-getopt no-DBus no-i18n no-IDN DHCP no-DHCPv6 no-Lua TFTP no-conntrack no-ipset no-auth no-DNSSEC no-ID loop-detect inotify
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq-dhcp[1217]: DHCP, IP range 192.168.10.100 -- 192.168.10.249, lease time 12h
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: using local addresses only for domain lan
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: reading /tmp/resolv.conf.auto
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: using local addresses only for domain lan
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: using nameserver 192.168.0.1#53
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: read /etc/hosts - 4 addresses
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq[1217]: read /tmp/hosts/dhcp.cfg02411c - 2 addresses
Sat Nov 25 02:46:01 2017 daemon.info dnsmasq-dhcp[1217]: read /etc/ethers - 0 addresses
Sat Nov 25 02:46:07 2017 daemon.info dnsmasq-dhcp[1217]: DHCPDISCOVER(br-lan) 58:ef:68:7d:e9:1f
Sat Nov 25 02:46:07 2017 daemon.info dnsmasq-dhcp[1217]: DHCPOFFER(br-lan) 192.168.10.128 58:ef:68:7d:e9:1f
Sat Nov 25 02:46:08 2017 daemon.info dnsmasq-dhcp[1217]: DHCPREQUEST(br-lan) 192.168.10.128 58:ef:68:7d:e9:1f
Sat Nov 25 02:46:08 2017 daemon.info dnsmasq-dhcp[1217]: DHCPACK(br-lan) 192.168.10.128 58:ef:68:7d:e9:1f jabberwock
Sat Nov 25 02:46:12 2017 authpriv.info dropbear[1219]: Child connection from 192.168.10.128:50484
Sat Nov 25 02:46:15 2017 authpriv.notice dropbear[1219]: Password auth succeeded for 'root' from 192.168.10.128:50484
root@LEDE:~#

Only these lines may have some clue.

...
...
Sat Nov 25 02:45:45 2017 daemon.err block: Unkown action change
Sat Nov 25 02:45:45 2017 daemon.err block: Unkown action change
Sat Nov 25 02:45:45 2017 daemon.err block: Unkown action change
...
...
...
Sat Nov 25 02:45:48 2017 daemon.err block: /dev/mtdblock2 is already mounted on /rom
Sat Nov 25 02:45:48 2017 daemon.err block: /dev/mtdblock3 is already mounted on /overlay
Sat Nov 25 02:45:48 2017 kern.info kernel: [   26.738515] Adding 65532k swap on /dev/mapper/sandisk-swap.  Priority:-1 extents:1 across:65532k

@eduperez, do you have any idea?

I think the key is at these lines:

Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2: File descriptor 12 (pipe:[912]) leaked on lvm invocation. Parent PID 728: /bin/sh
Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2:   Reading all physical volumes.  This may take a while...
Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2:   Found volume group "sandisk" using metadata type lvm2
Sat Nov 25 02:45:42 2017 daemon.notice procd: /etc/rc.d/S15lvm2: File descriptor 12 (pipe:[912]) leaked on lvm     invocation. Parent PID 728: /bin/sh
Sat Nov 25 02:45:43 2017 daemon.notice procd: /etc/rc.d/S15lvm2:   3 logical volume(s) in volume group "sandisk" now active

The script that starts the LVM infrastructure is called "S15lvm2", and thus it is called after "S10boot" and "S10system", where all the filesystems are mounted. I am not a developer, but it looks to me that LEDE is not prepared to use LVM for extroot, as the order of execution does not allow it.

Hello @eduperez,

I have been thinking about this issue since your answer and I think the problem is other than the order of /etc/init.d scripts. Yes, you are right in a thing, /etc/init.d/boot ---S10boot--- is launched before /etc/init.d/system ---S10system--- and this one before /etc/init.d/lvm2 ---S15lvm2--- but there is a problem, neither of them mount anything ---of /etc/config/fstab of course---, only /etc/init.d/fstab does it launching /sbin/block mount, and here is where I think is the problem.

I hope these test proves my hypothesis.

  • TS1 ---Test Series #1--- | Logical Volume (LV) mounted over a directory distinct of /overlay.

    • TS1.1 | Automatically mount at boot time

      root@LEDE:~# uci show fstab.@mount[1]
      fstab.cfg064d78=mount
      fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
      fstab.cfg064d78.target='/mnt/sandisk-overlay'
      fstab.cfg064d78.enabled='1'
      
      root@LEDE:~# reboot
      
      ...
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      /dev/mapper/sandisk-overlay
                              126.0M     60.0M     52.0M  54% /mnt/sandisk-overlay
      

      TS1.1 is successful

    • TS1.2 | Manual mount with /bin/mount

      root@LEDE:~# uci show fstab.@mount[1]
      fstab.cfg064d78=mount
      fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
      fstab.cfg064d78.target='/mnt/sandisk-overlay'
      fstab.cfg064d78.enabled='1'
      
      root@LEDE:~# reboot
      
      ...
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      /dev/mapper/sandisk-overlay
                              126.0M     60.0M     52.0M  54% /mnt/sandisk-overlay
      
      root@LEDE:~# umount /mnt/sandisk-overlay
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      df: /dev/mapper/sandisk-overlay: can't find mount point
      
      root@LEDE:~# mount /dev/mapper/sandisk-overlay /mnt/sandisk-overlay
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      /dev/mapper/sandisk-overlay
                              126.0M     60.0M     52.0M  54% /mnt/sandisk-overlay
      

      TS1.2 is successful

    • TS1.3 | Manual mount with /sbin/block

      root@LEDE:~# uci show fstab.@mount[1]
      fstab.cfg064d78=mount
      fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
      fstab.cfg064d78.target='/mnt/sandisk-overlay'
      fstab.cfg064d78.enabled='1'
      
      root@LEDE:~# reboot
      
      ...
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      /dev/mapper/sandisk-overlay
                              126.0M     60.0M     52.0M  54% /mnt/sandisk-overlay
      
      root@LEDE:~# umount /mnt/sandisk-overlay
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      df: /dev/mapper/sandisk-overlay: can't find mount point
      
      root@LEDE:~# block mount
      block: /dev/mtdblock2 is already mounted on /rom
      block: /dev/mtdblock3 is already mounted on /overlay
      block: /dev/mapper/sandisk-cifs is already mounted on /mnt/sandisk-cifs
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      /dev/mapper/sandisk-overlay
                              126.0M     60.0M     52.0M  54% /mnt/sandisk-overlay
      

      TS1.3 is successful

  • TS2 ---Test Series #2--- | Logical Volume (LV) mounted over directory /overlay.

    • TS2.1 | Automatically mount at boot time

      root@LEDE:~#uci set fstab.@mount[1].target='/overlay'
      root@LEDE:~# uci commit fstab
      root@LEDE:~# uci show fstab.@mount[1]
      fstab.cfg064d78=mount
      fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
      fstab.cfg064d78.enabled='1'
      fstab.cfg064d78.target='/overlay'
      
      root@LEDE:~# reboot
      
      ...
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      df: /dev/mapper/sandisk-overlay: can't find mount point
      

      TS2.1 is unsuccessful

    • TS2.2 | Manual mount with /bin/mount

      root@LEDE:~# uci show fstab.@mount[1]
      fstab.cfg064d78=mount
      fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
      fstab.cfg064d78.enabled='1'
      fstab.cfg064d78.target='/overlay'
      
      root@LEDE:~# reboot
      
      ...
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      df: /dev/mapper/sandisk-overlay: can't find mount point
      
      root@LEDE:~# mount /dev/mapper/sandisk-overlay /overlay
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      /dev/mtdblock3          126.0M     60.0M     52.0M  54% /overlay
      
      root@LEDE:~# df -h
      Filesystem                Size      Used Available Use% Mounted on
      /dev/root                 2.3M      2.3M         0 100% /rom
      tmpfs                    13.8M    340.0K     13.4M   2% /tmp
      /dev/mtdblock3          126.0M     60.0M     52.0M  54% /overlay
      overlayfs:/overlay        4.1M      3.5M    644.0K  85% /
      tmpfs                   512.0K         0    512.0K   0% /dev
      /dev/mapper/sandisk-cifs
                                2.0G    188.0M      1.8G   9% /mnt/sandisk-cifs
      /dev/mapper/sandisk-overlay
                              126.0M     60.0M     52.0M  54% /overlay
      

      TS2.2 is successful

    • TS2.3 | Manual mount with /sbin/block

      root@LEDE:~# uci show fstab.@mount[1]
      fstab.cfg064d78=mount
      fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
      fstab.cfg064d78.enabled='1'
      fstab.cfg064d78.target='/overlay'
      
      root@LEDE:~# reboot
      
      ...
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      df: /dev/mapper/sandisk-overlay: can't find mount point
      
      root@LEDE:~# block mount
      block: /dev/mtdblock2 is already mounted on /rom
      block: /dev/mtdblock3 is already mounted on /overlay
      block: /dev/mapper/sandisk-cifs is already mounted on /mnt/sandisk-cifs
      
      root@LEDE:~# df -h /dev/mapper/sandisk-overlay
      Filesystem                Size      Used Available Use% Mounted on
      df: /dev/mapper/sandisk-overlay: can't find mount point
      

      TS2.3 is unsuccessful

All the previous test ends successfully except TS3.1 and TS2.3 which make use of /sbin/block mount.

My hypothesis is that /sbin/block has an bug when it tries to mount a LV over /overlay directory. And it is especially over /overlay because over whatever other previously monted directory it works. This is the proof.

root@LEDE:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    13.8M    340.0K     13.4M   2% /tmp
/dev/mtdblock3            4.1M      3.5M    644.0K  85% /overlay
overlayfs:/overlay        4.1M      3.5M    644.0K  85% /
tmpfs                   512.0K         0    512.0K   0% /dev
/dev/mapper/sandisk-cifs
                          2.0G    188.0M      1.8G   9% /mnt/sandisk-cifs

root@LEDE:~# uci set fstab.@mount[1].target='/mnt/sandisk-cifs'
root@LEDE:~# uci commit fstab
root@LEDE:~# uci show fstab.@mount[1]
fstab.cfg064d78=mount
fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'
fstab.cfg064d78.enabled='1'
fstab.cfg064d78.target='/mnt/sandisk-cifs'

root@LEDE:~# block mount
block: /dev/mtdblock2 is already mounted on /rom
block: /dev/mtdblock3 is already mounted on /overlay
block: /dev/mapper/sandisk-cifs is already mounted on /mnt/sandisk-cifs

root@LEDE:~# df -h /dev/mapper/sandisk-overlay
Filesystem                Size      Used Available Use% Mounted on
/dev/mapper/sandisk-cifs
                    126.0M     60.0M     52.0M  54% /mnt/sandisk-cifs

As I said I am a newbie in this world of LEDE but it seems /sbin/block has a bug ---at least I think that---. The question is, where can I inform of that?

Best regards,

I guess the best place to file a bug is https://bugs.lede-project.org/

Hello again @eduperez,

I have read the welcome message of https://bugs.lede-project.org and I have the doubt of whether I should write the bug report there or in https://github.com/openwrt/packages/issues. I suppose block-mount is not a core package, isn't it?.

Again, thanks for your information and help.

Best regards,

Hello @eduperez,

Yes, you did right, the best place is https://bugs.lede-project.org/, block-mount is a core package.

Thank you for all and best regards,

There were several votes and LEDE and OpenWRT decided to merge, using the LEDE
codebase, but the OpenWRT branding.

It was a close vote, but the decision to use the OpenWRT branding won.

Let's please not re-argue this yet again.

David Lang

@dlang I think you posted on the wrong thread...

Hello @eduperez (et al.),

Regarding this issue I have created into the LEDE Project bug reporting and issue tracking system the Task ID 1215 with the title /sbin/block is not able to mount logical volumes over the /overlay directory.

Best regards,

Can you please provide the full dmesg output after a boot with failed /overlay mount? I think the problem is that nothing activates LVM before trying to setup the overlay.

A quick hack I can think of is wrapping the block executable to perform the required actions, e.g. move /sbin/block to /sbin/block.real and replace it with a shell script like that:

#!/bin/sh
if [ ! -d /tmp/lvm/cache ] && /etc/init.d/lvm2 enabled 2>/dev/null; then
  /etc/init.d/lvm2 start
fi
exec /sbin/block.real "$@"

Give that a try and see if it helps. To debug early boot you can echo strings to /dev/kmsg and read them using dmesg later.

Hello @jow,

First of all, I'm sorry for the delay and thank you for your approach and your clue.

Well, as I wrote in the post #5 in answer to @eduperez, I think the problem is in /sbin/block and not in the order the /etc/init.d/* are executed, basically because once the system is completely loaded /sbin/block mount doesn't work when it try to mount a LV over the /overlay directory ---please see tests TS2.1, TS2.2 ant TS2.3 post #5---. In any case, I'm going to apply your workaround to try to demonstrate my hypothesis.

Again, thank you. Best regards,

Hello again @jow,

I have been trying to apply your workaround but it is not possible. It is near incredible but this happens.

jabberwock:~ tabad$ ssh root@192.168.10.1
root@192.168.10.1's password:


BusyBox v1.25.1 () built-in shell (ash)

     _________
    /        /\      _    ___ ___  ___
   /  LE    /  \    | |  | __|   \| __|
  /    DE  /    \   | |__| _|| |) | _|
 /________/  LE  \  |____|___|___/|___|                      lede-project.org
 \        \   DE /
  \    LE  \    /  -----------------------------------------------------------
   \  DE    \  /    Reboot (17.01.4, r3560-79f57e422d)
    \________\/    -----------------------------------------------------------

root@LEDE:~# /sbin/block info
/dev/mtdblock2: UUID="b9987b6c-6483eae0-ddc9a928-146c8265" VERSION="4.0" MOUNT="/rom" TYPE="squashfs"
/dev/mtdblock3: MOUNT="/overlay" TYPE="jffs2"
/dev/sda1: UUID="d0zv8P-VSSE-vQdE-upLJ-NFYz-49PB-K1CzyN" TYPE="LVM2_member"
/dev/mapper/sandisk-cifs: UUID="b9b5f909-58ee-428c-9c74-e425730e1aad" VERSION="1.8" MOUNT="/mnt/sandisk-cifs" TYPE="f2fs"
/dev/mapper/sandisk-overlay: UUID="89eda2a9-f0b0-4e27-8bca-04d0870445fd" VERSION="1.8" TYPE="f2fs"
/dev/mapper/sandisk-swap: UUID="df948d49-2655-427f-90ca-a387c259c151" LABEL="swap" VERSION="1" TYPE="swap"

But when /sbin/block is moved...

root@LEDE:~# mv /sbin/block /sbin/block.real
root@LEDE:~# /sbin/block.real info
block: Usage: block <info|mount|umount|detect>
root@LEDE:~#

It simply doesn't work. And I am wondering why yet. :wink:

Regards,

Ah yes I forgot, the utility requires its basename to be block to work properly since it actually is a multicall executable.

Not a problem though, simply move it to /usr/libexec/block or similar instead to /sbin/block.real, then adjust the wrapper script accordingly.

Hello @jow,

I have extend your workaround to include more information into /dev/kmsg file. This is that I have done.

root@LEDE:~# uci show fstab.@mount[1]
fstab.cfg064d78=mount
fstab.cfg064d78.enabled='1'
fstab.cfg064d78.target='/overlay'
fstab.cfg064d78.uuid='89eda2a9-f0b0-4e27-8bca-04d0870445fd'

root@LEDE:~# mv /sbin/block /usr/libexec/block

root@LEDE:~# cat > /sbin/block <<-'EndOfFile'
#!/bin/sh

mod=''
iter=''
debug=''
dm_mods=''
iter_file='/tmp/block-iteration'

if [ ! -f "${iter_file}" ]; then
   iter=1
else
   iter=$(( $(/usr/bin/head -1 ${iter_file}) + 1 ))
fi
echo ${iter} > ${iter_file}

debug="[debug][${iter}]"

echo "${debug} Start of workaround of '/sbin/block $@'" > /dev/kmsg

dm_mods="$(/usr/sbin/lsmod         | \
           /usr/bin/cut -f 1 -d ' '| \
           /bin/grep 'dm_')"

if [ -z "${dm_mods}" ]; then
   echo "${debug} Device mapper kernel modules not loaded." > /dev/kmsg
else
   echo "${debug} Device mapper kernel modules loaded..." > /dev/kmsg
   for dm_mod in ${dm_mods}; do
      echo "  ${dm_mod}" > /dev/kmsg
   done

   echo "${debug} Physical Volume status..." > /dev/kmsg
   /sbin/lvm pvs > /dev/kmsg

   echo "${debug} Volume Group status..." > /dev/kmsg
   /sbin/lvm vgs > /dev/kmsg

   echo "${debug} Logical Volume status..." > /dev/kmsg
   /sbin/lvm lvs > /dev/kmsg

   if [ "$(/sbin/lvm lvs --noheadings --options lv_active /dev/mapper/sandisk-overlay)" == "  active" ]; then
      echo "${debug} LV '/dev/mapper/sandisk-overlay' is active" > /dev/kmsg
   else
      echo "${debug} Oops! LV '/dev/mapper/sandisk-overlay' is not active" > /dev/kmsg
   fi

   if [ ! -d /tmp/lvm/cache ]; then
      echo "${debug} LVM2 has not been started previously." > /dev/kmsg
      echo "${debug} Enabling LVM2..." > /dev/kmsg
      /etc/init.d/lvm2 enabled
      echo "${debug} Starting LVM2..." > /dev/kmsg
      /etc/init.d/lvm2 start
      echo "${debug} LVM2 enabled, started and all LVs activated." > /dev/kmsg
   else
      echo "${debug} LVM2 was started previously." > /dev/kmsg
   fi
fi

echo "${debug} Starting execution of '/usr/libexec/block $@'"... > /dev/kmsg
/usr/libexec/block $@ | /usr/bin/tee /dev/kmsg

if [ -z "${dm_mods}" ]; then
   echo "${debug} Device mapper kernel modules not loaded." > /dev/kmsg
else
   echo "${debug} Device mapper kernel modules loaded..." > /dev/kmsg
   for dm_mod in ${dm_mods}; do
      echo "  ${dm_mod}" > /dev/kmsg
   done

   echo "${debug} Physical Volume status..." > /dev/kmsg
   /sbin/lvm pvs > /dev/kmsg

   echo "${debug} Volume Group status..." > /dev/kmsg
   /sbin/lvm vgs > /dev/kmsg

   echo "${debug} Logical Volume status..." > /dev/kmsg
   /sbin/lvm lvs > /dev/kmsg
fi

echo "${debug} End of workaround of '/sbin/block $@'" > /dev/kmsg
EndOfFile

root@LEDE:~# chmod 0755 /sbin/block
root@LEDE:~# reboot
...    
...
root@LEDE:~# dmesg > /tmp/kmsg.txt

this post continue...

... from previous post

And this is the complete /tmp/kmsg.txt file.

[    0.000000] Linux version 4.4.92 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3101-bce140e) ) #0 Tue Oct 17 14:59:45 2017
[    0.000000] MyLoader: sysp=aaaa5554, boardp=aaaa5554, parts=aaaa5554
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Atheros AR9130 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] No valid device tree found, continuing without
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000001ffffff]
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 803d04d0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8192 pages, LIFO batch:0
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line: board=WRT160NL console=ttyS0,115200 rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 27864K/32768K available (3076K kernel code, 160K rwdata, 412K rodata, 312K init, 205K bss, 4904K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:400.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:5.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000012] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.007885] Calibrating delay loop... 265.42 BogoMIPS (lpj=1327104)
[    0.090589] pid_max: default: 32768 minimum: 301
[    0.095363] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.101971] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.112081] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.121888] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.129464] NET: Registered protocol family 16
[    0.135496] MIPS: machine is Linksys WRT160NL
[    0.679761] Can't analyze schedule() prologue at 800670fc
[    0.696511] clocksource: Switched to clocksource MIPS
[    0.702907] NET: Registered protocol family 2
[    0.708561] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.715539] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.721961] TCP: Hash tables configured (established 1024 bind 1024)
[    0.728452] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.734289] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.740867] NET: Registered protocol family 1
[    0.745249] PCI: CLS 0 bytes, default 32
[    0.750231] Crashlog allocated RAM at address 0x1f00000
[    0.773985] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.779863] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.792680] io scheduler noop registered
[    0.796656] io scheduler deadline registered (default)
[    0.802040] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.812321] console [ttyS0] disabled
[    0.835926] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 12500000) is a 16550A
[    0.844626] console [ttyS0] enabled
[    0.851648] bootconsole [early0] disabled
[    0.865307] m25p80 spi0.0: found mx25l6405d, expected m25p80
[    0.871107] m25p80 spi0.0: mx25l6405d (8192 Kbytes)
[    0.877169] 6 cybertan partitions found on MTD device spi0.0
[    0.882870] Creating 6 MTD partitions on "spi0.0":
[    0.887740] 0x000000000000-0x000000040000 : "u-boot"
[    0.894514] 0x000000040000-0x000000180000 : "kernel"
[    0.901573] 0x000000180000-0x0000007e0000 : "rootfs"
[    0.908604] mtd: device 2 (rootfs) set to be root filesystem
[    0.914349] 1 squashfs-split partitions found on MTD device rootfs
[    0.920641] 0x0000003c0000-0x0000007e0000 : "rootfs_data"
[    0.928114] 0x0000007e0000-0x0000007f0000 : "nvram"
[    0.935043] 0x0000007f0000-0x000000800000 : "art"
[    0.941909] 0x000000040000-0x0000007e0000 : "firmware"
[    0.964303] libphy: ag71xx_mdio: probed
[    1.377017] Registering RTL8306SD switch with Chip ID: 0x5988, version: 0x0000
[    1.384325] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=00008306, driver=Realtek RTL8306S]
[    1.394864] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RMII
[    1.796559] ag71xx ag71xx.1: connected to PHY at ag71xx-mdio.0:04 [uid=00008306, driver=Realtek RTL8306S]
[    1.807169] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:RMII
[    1.815867] NET: Registered protocol family 10
[    1.824999] NET: Registered protocol family 17
[    1.829628] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    1.842455] 8021q: 802.1Q VLAN Support v1.8
[    1.852979] VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
[    1.862049] Freeing unused kernel memory: 312K
[    3.171925] init: Console is alive
[    3.175599] init: - watchdog -
[    4.379874] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    4.486798] usbcore: registered new interface driver usbfs
[    4.492442] usbcore: registered new interface driver hub
[    4.497943] usbcore: registered new device driver usb
[    4.509020] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.517397] ehci-platform: EHCI generic platform driver
[    4.522778] ehci-platform ehci-platform: EHCI Host Controller
[    4.528652] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    4.536761] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    4.556553] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    4.564090] hub 1-0:1.0: USB hub found
[    4.568310] hub 1-0:1.0: 1 port detected
[    4.573269] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    4.591085] init: - preinit -
[    5.193376] usb 1-1: new high-speed USB device number 2 using ehci-platform
[    5.349320] random: procd: uninitialized urandom read (4 bytes read, 9 bits of entropy available)
[    5.631736] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.386837] ar71xx: pll_reg 0xb8050014: 0x13000a44
[    7.386872] eth0: link up (100Mbps/Full duplex)
[    7.391814] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.929399] jffs2: notice: (390) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
[    8.949841] mount_root: loading kmods from internal overlay
[    9.184863] kmodloader: loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[    9.427845] SCSI subsystem initialized
[    9.478013] usb-storage 1-1:1.0: USB Mass Storage device detected
[    9.485083] scsi host0: usb-storage 1-1:1.0
[    9.490054] usbcore: registered new interface driver usb-storage
[    9.497287] kmodloader: done loading kernel modules from /tmp/overlay/upper/etc/modules-boot.d/*
[    9.513643] [debug][1] Start of workaround of '/sbin/block extroot'
[    9.542000] [debug][1] Device mapper kernel modules not loaded.
[    9.548429] [debug][1] Starting execution of '/usr/libexec/block extroot'...
[    9.563154] [debug][1] Device mapper kernel modules not loaded.
[    9.570594] [debug][1] End of workaround of '/sbin/block extroot'
[    9.579086] mount_root: switching to jffs2 overlay
[    9.593324] urandom-seed: Seeding with /etc/urandom.seed
[    9.879418] eth0: link down
[    9.898478] procd: - early -
[    9.901503] procd: - watchdog -
[   10.209141] [debug][2] Start of workaround of '/sbin/block hotplug'
[   10.235440] [debug][2] Device mapper kernel modules not loaded.
[   10.241825] [debug][2] Starting execution of '/usr/libexec/block hotplug'...
[   10.304197] [debug][2] Device mapper kernel modules not loaded.
[   10.310603] [debug][2] End of workaround of '/sbin/block hotplug'
[   10.357704] [debug][3] Start of workaround of '/sbin/block hotplug'
[   10.383588] [debug][3] Device mapper kernel modules not loaded.
[   10.390034] [debug][3] Starting execution of '/usr/libexec/block hotplug'...
[   10.418445] [debug][3] Device mapper kernel modules not loaded.
[   10.424642] [debug][3] End of workaround of '/sbin/block hotplug'
[   10.471706] [debug][4] Start of workaround of '/sbin/block hotplug'
[   10.495928] scsi 0:0:0:0: Direct-Access     SanDisk                   1.26 PQ: 0 ANSI: 6
[   10.507814] sd 0:0:0:0: [sda] 31266816 512-byte logical blocks: (16.0 GB/14.9 GiB)
[   10.517826] [debug][4] Device mapper kernel modules not loaded.
[   10.524089] [debug][4] Starting execution of '/usr/libexec/block hotplug'...
[   10.532260] sd 0:0:0:0: [sda] Write Protect is off
[   10.537156] sd 0:0:0:0: [sda] Mode Sense: 43 00 00 00
[   10.538502] sd 0:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[   10.574035] [debug][4] Device mapper kernel modules not loaded.
[   10.580258] procd: - watchdog -
[   10.583728] procd: - ubus -
[   10.589127] [debug][4] End of workaround of '/sbin/block hotplug'
[   10.730106]  sda: sda1
[   10.748596] sd 0:0:0:0: [sda] Attached SCSI disk
[   10.782046] [debug][5] Start of workaround of '/sbin/block hotplug'
[   10.807809] [debug][5] Device mapper kernel modules not loaded.
[   10.814022] [debug][5] Starting execution of '/usr/libexec/block hotplug'...
[   10.908530] random: ubusd: uninitialized urandom read (4 bytes read, 38 bits of entropy available)
[   11.023892] random: ubusd: uninitialized urandom read (4 bytes read, 42 bits of entropy available)
[   11.034109] random: ubusd: uninitialized urandom read (4 bytes read, 42 bits of entropy available)
[   11.043745] random: ubusd: uninitialized urandom read (4 bytes read, 44 bits of entropy available)
[   11.053854] random: ubusd: uninitialized urandom read (4 bytes read, 44 bits of entropy available)
[   11.063143] random: ubusd: uninitialized urandom read (4 bytes read, 44 bits of entropy available)
[   11.073012] random: ubusd: uninitialized urandom read (4 bytes read, 44 bits of entropy available)
[   11.086919] random: ubusd: uninitialized urandom read (4 bytes read, 44 bits of entropy available)
[   11.097457] procd: - init -
[   11.427615] [debug][5] Device mapper kernel modules not loaded.
[   11.433887] [debug][5] End of workaround of '/sbin/block hotplug'
[   11.529890] [debug][6] Start of workaround of '/sbin/block hotplug'
[   11.570599] [debug][6] Device mapper kernel modules not loaded.
[   11.586873] [debug][6] Starting execution of '/usr/libexec/block hotplug'...
[   11.788350] [debug][6] Device mapper kernel modules not loaded.
[   11.794620] [debug][6] End of workaround of '/sbin/block hotplug'
[   11.804246] kmodloader: loading kernel modules from /etc/modules.d/*
[   11.889039] [debug][7] Start of workaround of '/sbin/block hotplug'
[   11.925359] [debug][7] Device mapper kernel modules not loaded.
[   11.937558] [debug][7] Starting execution of '/usr/libexec/block hotplug'...
[   11.975499] device-mapper: ioctl: 4.34.0-ioctl (2015-10-28) initialised: dm-devel@redhat.com
[   12.071399] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   12.099019] Loading modules backported from Linux version wt-2017-01-31-0-ge882dff19e7f
[   12.107162] Backport generated by backports.git backports-20160324-13-g24da7d3c
[   12.120160] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.140582] nf_conntrack version 0.5.0 (440 buckets, 1760 max)
[   12.205493] xt_time: kernel timezone is -0000
[   12.291916] [debug][7] Device mapper kernel modules not loaded.
[   12.298420] [debug][7] End of workaround of '/sbin/block hotplug'
[   12.337474] PPP generic driver version 2.4.2
[   12.347849] NET: Registered protocol family 24
[   12.393357] [debug][8] Start of workaround of '/sbin/block hotplug'
[   12.429893] [debug][8] Device mapper kernel modules loaded...
[   12.435882]   dm_crypt
[   12.494958] ath: EEPROM regdomain: 0x0
[   12.494985] ath: EEPROM indicates default country code should be used
[   12.494999] ath: doing EEPROM country->regdmn map search
[   12.495023] ath: country maps to regdmn code: 0x3a
[   12.495038] ath: Country alpha2 being used: US
[   12.495052] ath: Regpair used: 0x3a
[   12.535219] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.541813] ieee80211 phy0: Atheros AR9100 MAC/BB Rev:7 AR2122 RF Rev:a2 mem=0xb80c0000, irq=2
[   12.554396]   dm_log
[   12.556819]   dm_mirror
[   12.559420]   dm_mod
[   12.561757]   dm_region_hash
[   12.564815] [debug][8] Physical Volume status...
[   12.834781] kmodloader: done loading kernel modules from /etc/modules.d/*
[   14.442692] random: jshn: uninitialized urandom read (4 bytes read, 79 bits of entropy available)
[   15.159919]   PV         VG      Fmt  Attr PSize  PFree 
[   15.215458]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   15.227938] [debug][8] Volume Group status...
[   15.463812]   VG      #PV #LV #SN Attr   VSize  VFree 
[   15.478348]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   15.484962] [debug][8] Logical Volume status...
[   16.294564]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   16.319831]   cifs    sandisk -wi-------   2.00g                                                    
[   16.319831]   overlay sandisk -wi------- 128.00m                                                    
[   16.319831]   swap    sandisk -wi-------  64.00m                                                    
[   16.761414] [debug][8] Oops! LV '/dev/mapper/sandisk-overlay' is not active
[   16.768859] random: nonblocking pool is initialized
[   16.787111] [debug][8] LVM2 was started previously.
[   16.792361] [debug][8] Starting execution of '/usr/libexec/block hotplug'...
[   17.148639] [debug][8] Device mapper kernel modules loaded...
[   17.154693]   dm_crypt
[   17.158780]   dm_log
[   17.161130]   dm_mirror
[   17.163727]   dm_mod
[   17.166118]   dm_region_hash
[   17.187426] [debug][8] Physical Volume status...
[   18.177277]   PV         VG      Fmt  Attr PSize  PFree 
[   18.190204]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   18.198052] [debug][8] Volume Group status...
[   18.373035]   VG      #PV #LV #SN Attr   VSize  VFree 
[   18.388042]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   18.394776] [debug][8] Logical Volume status...
[   18.939981]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   18.951517]   cifs    sandisk -wi-a-----   2.00g                                                    
[   18.951517]   overlay sandisk -wi-a----- 128.00m                                                    
[   18.951517]   swap    sandisk -wi-a-----  64.00m                                                    
[   18.983689] [debug][8] End of workaround of '/sbin/block hotplug'

this post continue…

...from the previous post

[   19.032173] [debug][9] Start of workaround of '/sbin/block hotplug'
[   19.295061] [debug][9] Device mapper kernel modules loaded...
[   19.301273]   dm_crypt
[   19.303792]   dm_log
[   19.306139]   dm_mirror
[   19.311198]   dm_mod
[   19.313557]   dm_region_hash
[   19.318096] [debug][9] Physical Volume status...
[   19.912703]   PV         VG      Fmt  Attr PSize  PFree 
[   19.924378]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   19.949770] [debug][9] Volume Group status...
[   20.378393]   VG      #PV #LV #SN Attr   VSize  VFree 
[   20.385516]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   20.402333] [debug][9] Logical Volume status...
[   20.739001]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   20.759902]   cifs    sandisk -wi-a-----   2.00g                                                    
[   20.759902]   overlay sandisk -wi-a----- 128.00m                                                    
[   20.759902]   swap    sandisk -wi-a-----  64.00m                                                    
[   21.191182] [debug][9] LV '/dev/mapper/sandisk-overlay' is active
[   21.197803] [debug][9] LVM2 was started previously.
[   21.202973] [debug][9] Starting execution of '/usr/libexec/block hotplug'...
[   21.555644] [debug][9] Device mapper kernel modules loaded...
[   21.567727]   dm_crypt
[   21.570322]   dm_log
[   21.572668]   dm_mirror
[   21.575274]   dm_mod
[   21.594210]   dm_region_hash
[   21.597452] [debug][9] Physical Volume status...
[   22.460870]   PV         VG      Fmt  Attr PSize  PFree 
[   22.470045]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   22.477013] [debug][9] Volume Group status...
[   22.714358]   VG      #PV #LV #SN Attr   VSize  VFree 
[   22.738511]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   22.745244] [debug][9] Logical Volume status...
[   23.125485]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   23.363699]   cifs    sandisk -wi-a-----   2.00g                                                    
[   23.363699]   overlay sandisk -wi-a----- 128.00m                                                    
[   23.363699]   swap    sandisk -wi-a-----  64.00m                                                    
[   23.493303] [debug][9] End of workaround of '/sbin/block hotplug'
[   23.527825] [debug][10] Start of workaround of '/sbin/block mount'
[   23.590749] [debug][10] Device mapper kernel modules loaded...
[   23.600337]   dm_crypt
[   23.602869]   dm_log
[   23.605215]   dm_mirror
[   23.629260]   dm_mod
[   23.631626]   dm_region_hash
[   23.634696] [debug][10] Physical Volume status...
[   23.667482] [debug][11] Start of workaround of '/sbin/block hotplug'
[   23.718907] [debug][11] Device mapper kernel modules loaded...
[   23.724983]   dm_crypt
[   23.746812]   dm_log
[   23.749172]   dm_mirror
[   23.751779]   dm_mod
[   23.754125]   dm_region_hash
[   23.780475] [debug][11] Physical Volume status...
[   24.106373]   PV         VG      Fmt  Attr PSize  PFree 
[   24.206865]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   24.214657] [debug][10] Volume Group status...
[   24.334503]   PV         VG      Fmt  Attr PSize  PFree 
[   24.352413]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   24.378104] [debug][11] Volume Group status...
[   24.478138]   VG      #PV #LV #SN Attr   VSize  VFree 
[   24.507667]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   24.514381] [debug][10] Logical Volume status...
[   24.710362]   VG      #PV #LV #SN Attr   VSize  VFree 
[   24.737572]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   24.744317] [debug][11] Logical Volume status...
[   24.848374]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   24.874458]   cifs    sandisk -wi-a-----   2.00g                                                    
[   24.874458]   overlay sandisk -wi-a----- 128.00m                                                    
[   24.874458]   swap    sandisk -wi-a-----  64.00m                                                    
[   25.069558]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   25.108956]   cifs    sandisk -wi-a-----   2.00g                                                    
[   25.108956]   overlay sandisk -wi-a----- 128.00m                                                    
[   25.108956]   swap    sandisk -wi-a-----  64.00m                                                    
[   25.287076] [debug][10] LV '/dev/mapper/sandisk-overlay' is active
[   25.293659] [debug][10] LVM2 was started previously.
[   25.326928] [debug][10] Starting execution of '/usr/libexec/block mount'...
[   25.696378] [debug][11] LV '/dev/mapper/sandisk-overlay' is active
[   25.707810] [debug][11] LVM2 was started previously.
[   25.713079] [debug][11] Starting execution of '/usr/libexec/block hotplug'...
[   26.153235] [debug][11] Device mapper kernel modules loaded...
[   26.182590]   dm_crypt
[   26.185121]   dm_log
[   26.196804]   dm_mirror
[   26.199422]   dm_mod
[   26.201764]   dm_region_hash
[   26.204826] [debug][11] Physical Volume status...
[   26.478505] Adding 65532k swap on /dev/mapper/sandisk-swap.  Priority:-1 extents:1 across:65532k 
[   26.499529] [debug][10] Device mapper kernel modules loaded...
[   26.505682]   dm_crypt
[   26.516809]   dm_log
[   26.519170]   dm_mirror
[   26.521814]   dm_mod
[   26.524154]   dm_region_hash
[   26.546787] [debug][10] Physical Volume status...
[   26.870561]   PV         VG      Fmt  Attr PSize  PFree 
[   26.879906]   PV         VG      Fmt  Attr PSize  PFree 
[   26.898154]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   26.905019] [debug][10] Volume Group status...
[   26.915481]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   26.948086] [debug][11] Volume Group status...
[   27.236911]   VG      #PV #LV #SN Attr   VSize  VFree 
[   27.243985]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   27.252562]   VG      #PV #LV #SN Attr   VSize  VFree 
[   27.270797]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   27.279626] [debug][10] Logical Volume status...
[   27.307008] [debug][11] Logical Volume status...
[   27.593396]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   27.604426]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   27.629038]   cifs    sandisk -wi-ao----   2.00g                                                    
[   27.629038]   overlay sandisk -wi-a----- 128.00m                                                    
[   27.629038]   swap    sandisk -wi-ao----  64.00m                                                    
[   27.663168]   cifs    sandisk -wi-ao----   2.00g                                                    
[   27.663168]   overlay sandisk -wi-a----- 128.00m                                                    
[   27.663168]   swap    sandisk -wi-ao----  64.00m                                                    
[   27.728150] [debug][10] End of workaround of '/sbin/block mount'
[   27.838760] [debug][11] End of workaround of '/sbin/block hotplug'
[   29.197801] [debug][12] Start of workaround of '/sbin/block hotplug'
[   29.265556] [debug][12] Device mapper kernel modules loaded...
[   29.277735]   dm_crypt
[   29.280271]   dm_log
[   29.282613]   dm_mirror
[   29.285217]   dm_mod
[   29.326804]   dm_region_hash
[   29.329888] [debug][12] Physical Volume status...
[   29.984081]   PV         VG      Fmt  Attr PSize  PFree 
[   30.000612]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   30.017611] [debug][12] Volume Group status...
[   30.328072]   VG      #PV #LV #SN Attr   VSize  VFree 
[   30.335204]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   30.368141] [debug][12] Logical Volume status...
[   30.883144] device eth0 entered promiscuous mode
[   30.898824] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   30.954018] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   31.910379] ar71xx: pll_reg 0xb8050014: 0x13000a44
[   31.915223] eth0: link up (100Mbps/Full duplex)
[   31.945525] br-lan: port 1(eth0) entered forwarding state
[   31.951075] br-lan: port 1(eth0) entered forwarding state
[   31.962499]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   32.006890] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   32.023664]   cifs    sandisk -wi-ao----   2.00g                                                    
[   32.023664]   overlay sandisk -wi-a----- 128.00m                                                    
[   32.023664]   swap    sandisk -wi-ao----  64.00m                                                    
[   32.565198] [debug][12] LV '/dev/mapper/sandisk-overlay' is active
[   32.578249] [debug][12] LVM2 was started previously.
[   32.583518] [debug][12] Starting execution of '/usr/libexec/block hotplug'...
[   32.592831] ath: EEPROM regdomain: 0x82d4
[   32.596935] ath: EEPROM indicates we should expect a country code
[   32.603067] ath: doing EEPROM country->regdmn map search
[   32.608433] ath: country maps to regdmn code: 0x37
[   32.613248] ath: Country alpha2 being used: ES
[   32.617719] ath: Regpair used: 0x37
[   32.621228] ath: regdomain 0x82d4 dynamically updated by user
[   32.948457] [debug][12] Device mapper kernel modules loaded...
[   32.954533]   dm_crypt
[   32.969382]   dm_log
[   32.971744]   dm_mirror
[   32.974345]   dm_mod
[   33.007069]   dm_region_hash
[   33.010151] [debug][12] Physical Volume status...
[   33.907015] ar71xx: pll_reg 0xb8050018: 0x13000a44
[   33.911857] eth1: link up (100Mbps/Full duplex)
[   33.916469] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   33.946582] br-lan: port 1(eth0) entered forwarding state
[   36.259388]   PV         VG      Fmt  Attr PSize  PFree 
[   36.269261]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   36.276207] [debug][12] Volume Group status...
[   36.399321]   VG      #PV #LV #SN Attr   VSize  VFree 
[   36.406422]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   36.414733] [debug][12] Logical Volume status...
[   36.628565]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   36.658492]   cifs    sandisk -wi-ao----   2.00g                                                    
[   36.658492]   overlay sandisk -wi-a----- 128.00m                                                    
[   36.658492]   swap    sandisk -wi-ao----  64.00m                                                    
[   36.723925] [debug][12] End of workaround of '/sbin/block hotplug'
[   36.838638] [debug][13] Start of workaround of '/sbin/block hotplug'
[   36.883287] [debug][13] Device mapper kernel modules loaded...
[   36.897769]   dm_crypt
[   36.900301]   dm_log
[   36.902646]   dm_mirror
[   36.905249]   dm_mod
[   36.926796]   dm_region_hash
[   36.929881] [debug][13] Physical Volume status...
[   37.288139]   PV         VG      Fmt  Attr PSize  PFree 
[   37.298034]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   37.304890] [debug][13] Volume Group status...
[   37.518584]   VG      #PV #LV #SN Attr   VSize  VFree 
[   37.525695]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   37.534005] [debug][13] Logical Volume status...
[   37.655693]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   37.668516]   cifs    sandisk -wi-ao----   2.00g                                                    
[   37.668516]   overlay sandisk -wi-a----- 128.00m                                                    
[   37.668516]   swap    sandisk -wi-ao----  64.00m                                                    
[   37.819068] [debug][13] LV '/dev/mapper/sandisk-overlay' is active
[   37.825653] [debug][13] LVM2 was started previously.
[   37.832607] [debug][13] Starting execution of '/usr/libexec/block hotplug'...
[   37.858041] [debug][13] Device mapper kernel modules loaded...
[   37.864118]   dm_crypt
[   37.868166]   dm_log
[   37.870567]   dm_mirror
[   37.873169]   dm_mod
[   37.875508]   dm_region_hash
[   37.882745] [debug][13] Physical Volume status...
[   38.061691]   PV         VG      Fmt  Attr PSize  PFree 
[   38.070425]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   38.079264] [debug][13] Volume Group status...
[   38.199951]   VG      #PV #LV #SN Attr   VSize  VFree 
[   38.208133]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   38.214924] [debug][13] Logical Volume status...
[   38.335525]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   38.348322]   cifs    sandisk -wi-ao----   2.00g                                                    
[   38.348322]   overlay sandisk -wi-a----- 128.00m                                                    
[   38.348322]   swap    sandisk -wi-ao----  64.00m                                                    
[   38.380545] [debug][13] End of workaround of '/sbin/block hotplug'
[   38.429169] [debug][14] Start of workaround of '/sbin/block hotplug'
[   38.461196] [debug][14] Device mapper kernel modules loaded...
[   38.467480]   dm_crypt
[   38.470004]   dm_log
[   38.472351]   dm_mirror
[   38.474954]   dm_mod
[   38.480576]   dm_region_hash
[   38.483653] [debug][14] Physical Volume status...
[   38.659669]   PV         VG      Fmt  Attr PSize  PFree 
[   38.675244]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   38.683708] [debug][14] Volume Group status...
[   38.806952]   VG      #PV #LV #SN Attr   VSize  VFree 
[   38.814217]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   38.822495] [debug][14] Logical Volume status...
[   38.946983]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   38.959703]   cifs    sandisk -wi-ao----   2.00g                                                    
[   38.959703]   overlay sandisk -wi-a----- 128.00m                                                    
[   38.959703]   swap    sandisk -wi-ao----  64.00m                                                    
[   39.107982] [debug][14] LV '/dev/mapper/sandisk-overlay' is active
[   39.114494] [debug][14] LVM2 was started previously.
[   39.121392] [debug][14] Starting execution of '/usr/libexec/block hotplug'...
[   39.411601] [debug][14] Device mapper kernel modules loaded...
[   39.428008]   dm_crypt
[   39.430540]   dm_log
[   39.432884]   dm_mirror
[   39.435488]   dm_mod
[   39.446795]   dm_region_hash
[   39.449869] [debug][14] Physical Volume status...
[   39.758263]   PV         VG      Fmt  Attr PSize  PFree 
[   39.782734]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   39.808843] [debug][14] Volume Group status...
[   40.197018]   VG      #PV #LV #SN Attr   VSize  VFree 
[   40.213744]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   40.238521] [debug][14] Logical Volume status...
[   40.448663]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   40.474358]   cifs    sandisk -wi-ao----   2.00g                                                    
[   40.474358]   overlay sandisk -wi-a----- 128.00m                                                    
[   40.474358]   swap    sandisk -wi-ao----  64.00m                                                    
[   40.538197] [debug][14] End of workaround of '/sbin/block hotplug'
[   40.629287] [debug][15] Start of workaround of '/sbin/block hotplug'
[   40.674054] [debug][15] Device mapper kernel modules loaded...
[   40.687791]   dm_crypt
[   40.690320]   dm_log
[   40.692674]   dm_mirror
[   40.695279]   dm_mod
[   40.726803]   dm_region_hash
[   40.729883] [debug][15] Physical Volume status...
[   41.120889]   PV         VG      Fmt  Attr PSize  PFree 
[   41.139474]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   41.146372] [debug][15] Volume Group status...
[   41.372483]   VG      #PV #LV #SN Attr   VSize  VFree 
[   41.389391]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   41.396154] [debug][15] Logical Volume status...
[   41.627950]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   41.658257]   cifs    sandisk -wi-ao----   2.00g                                                    
[   41.658257]   overlay sandisk -wi-a----- 128.00m                                                    
[   41.658257]   swap    sandisk -wi-ao----  64.00m                                                    
[   41.941334] [debug][15] LV '/dev/mapper/sandisk-overlay' is active
[   41.948045] [debug][15] LVM2 was started previously.
[   41.953303] [debug][15] Starting execution of '/usr/libexec/block hotplug'...
[   42.009753] [debug][15] Device mapper kernel modules loaded...
[   42.015819]   dm_crypt
[   42.026778]   dm_log
[   42.029135]   dm_mirror
[   42.031738]   dm_mod
[   42.034076]   dm_region_hash
[   42.046826] [debug][15] Physical Volume status...
[   42.362190]   PV         VG      Fmt  Attr PSize  PFree 
[   42.380210]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   42.421193] [debug][15] Volume Group status...
[   42.602896]   VG      #PV #LV #SN Attr   VSize  VFree 
[   42.610063]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   42.616897] [debug][15] Logical Volume status...
[   42.738452]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   42.750160]   cifs    sandisk -wi-ao----   2.00g                                                    
[   42.750160]   overlay sandisk -wi-a----- 128.00m                                                    
[   42.750160]   swap    sandisk -wi-ao----  64.00m                                                    
[   42.782117] [debug][15] End of workaround of '/sbin/block hotplug'
[   42.831005] [debug][16] Start of workaround of '/sbin/block hotplug'
[   42.863894] [debug][16] Device mapper kernel modules loaded...
[   42.870126]   dm_crypt
[   42.872647]   dm_log
[   42.874989]   dm_mirror
[   42.880069]   dm_mod
[   42.882424]   dm_region_hash
[   42.885487] [debug][16] Physical Volume status...
[   43.062329]   PV         VG      Fmt  Attr PSize  PFree 
[   43.071349]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   43.080241] [debug][16] Volume Group status...
[   43.201079]   VG      #PV #LV #SN Attr   VSize  VFree 
[   43.209153]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   43.215963] [debug][16] Logical Volume status...
[   43.335886]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   43.349016]   cifs    sandisk -wi-ao----   2.00g                                                    
[   43.349016]   overlay sandisk -wi-a----- 128.00m                                                    
[   43.349016]   swap    sandisk -wi-ao----  64.00m                                                    
[   43.496353] [debug][16] LV '/dev/mapper/sandisk-overlay' is active
[   43.503098] [debug][16] LVM2 was started previously.
[   43.510007] [debug][16] Starting execution of '/usr/libexec/block hotplug'...
[   43.657938] [debug][16] Device mapper kernel modules loaded...
[   43.664092]   dm_crypt
[   43.668158]   dm_log
[   43.670523]   dm_mirror
[   43.673190]   dm_mod
[   43.675532]   dm_region_hash
[   43.681047] [debug][16] Physical Volume status...
[   43.869381]   PV         VG      Fmt  Attr PSize  PFree 
[   43.878565]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   43.885462] [debug][16] Volume Group status...
[   44.005872]   VG      #PV #LV #SN Attr   VSize  VFree 
[   44.013035]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   44.021315] [debug][16] Logical Volume status...
[   44.141270]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   44.152970]   cifs    sandisk -wi-ao----   2.00g                                                    
[   44.152970]   overlay sandisk -wi-a----- 128.00m                                                    
[   44.152970]   swap    sandisk -wi-ao----  64.00m                                                    
[   44.184940] [debug][16] End of workaround of '/sbin/block hotplug'
[   44.233336] [debug][17] Start of workaround of '/sbin/block hotplug'
[   44.265872] [debug][17] Device mapper kernel modules loaded...
[   44.272120]   dm_crypt
[   44.274648]   dm_log
[   44.279006]   dm_mirror
[   44.281624]   dm_mod
[   44.283969]   dm_region_hash
[   44.289219] [debug][17] Physical Volume status...
[   45.006942]   PV         VG      Fmt  Attr PSize  PFree 
[   45.014999]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   45.023428] [debug][17] Volume Group status...
[   45.190011]   VG      #PV #LV #SN Attr   VSize  VFree 
[   45.198149]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   45.204926] [debug][17] Logical Volume status...
[   45.408073]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   45.420463]   cifs    sandisk -wi-ao----   2.00g                                                    
[   45.420463]   overlay sandisk -wi-a----- 128.00m                                                    
[   45.420463]   swap    sandisk -wi-ao----  64.00m                                                    
[   45.646848] [debug][17] LV '/dev/mapper/sandisk-overlay' is active
[   45.653415] [debug][17] LVM2 was started previously.
[   45.661193] [debug][17] Starting execution of '/usr/libexec/block hotplug'...
[   45.686696] [debug][17] Device mapper kernel modules loaded...
[   45.692802]   dm_crypt
[   45.695317]   dm_log
[   45.699701]   dm_mirror
[   45.702318]   dm_mod
[   45.704654]   dm_region_hash
[   45.710735] [debug][17] Physical Volume status...
[   45.974866]   PV         VG      Fmt  Attr PSize  PFree 
[   45.985016]   /dev/sda1  sandisk lvm2 a--  14.91g 12.72g
[   45.993827] [debug][17] Volume Group status...
[   46.113594]   VG      #PV #LV #SN Attr   VSize  VFree 
[   46.120790]   sandisk   1   3   0 wz--n- 14.91g 12.72g
[   46.129097] [debug][17] Logical Volume status...
[   46.250709]   LV      VG      Attr       LSize   Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
[   46.263248]   cifs    sandisk -wi-ao----   2.00g                                                    
[   46.263248]   overlay sandisk -wi-a----- 128.00m                                                    
[   46.263248]   swap    sandisk -wi-ao----  64.00m                                                    
[   46.295251] [debug][17] End of workaround of '/sbin/block hotplug'

And /dev/mapper/sandisk-overlay is not mounted over /overlay.

Regards,

Hello,

I have updated the the Task ID 1215 of the LEDE Project bug reporting and issue tracking system.

Best regards,

Hello,
Great work and well written HowTo. Have you managed to make overlay mount to work?
I have idea, but can't test it yet. Have you tried just call mount operation in workaround script?
Best regards,
Vitaly