Modify

Opened 3 years ago

Last modified 3 years ago

#18999 new defect

pivot_overlay not working with external USB stick (44455 bad, 43982 good)

Reported by: ambrosa Owned by: developers
Priority: response-needed Milestone: Chaos Calmer 15.05
Component: base system Version: Trunk
Keywords: Cc:

Description

Chaos Calmer trunk 44455
Arch TP-LINK TDW8970 (Lantiq->XRX200)

Once a month I build a CC trunk and I released it in my GitHub repo https://github.com/ambrosa/openwrt-TPLINK8970 for community.

Previous build was 43982 and all was fine.
Today I've build 44455 but I've an issue: I cannot mount anymore as pivot_overlay my USB stick (Kingston Traveller 8GB).
Obviously the /dev/sda1 USB stick, formatted with ext4, is mountable without any problem (i.e. mount /dev/sda1 /mnt/sda1)
I've tried many options and manually mount it as overlayFS without any success.

During boot with serial console I see this message

[ 38.700000] scsi 0:0:0:0: Direct-Access Kingston DataTraveler 2.0 PMAP PQ: 0 ANSI: 6
[ 39.460000] sd 0:0:0:0: [sda] 15335424 512-byte logical blocks: (7.85 GB/7.31 GiB)
[ 39.476000] sd 0:0:0:0: [sda] Write Protect is off
[ 39.508000] sd 0:0:0:0: [sda] No Caching mode page found
[ 39.512000] sd 0:0:0:0: [sda] Assuming drive cache: write through
[ 39.680000] sda: sda1
[ 39.772000] sd 0:0:0:0: [sda] Attached SCSI removable disk
[ 47.232000] jffs2: notice: (315) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
block: extroot: failed to load /tmp/jffs_cfg/etc/config/fstab: Entry not found
jffs2 is ready
No jffs2 marker was found
[ 48.620000] jffs2: notice: (312) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xdatum (0 unchecked, 0 orphan) and 0 of xref (0 dead, 0 orphan) found.
switching to overlay
procd: - early -
procd: - watchdog -

I don't remember to see before a "failed to load /tmp/jffs_cfg/etc/config/fstab"

BTW this is my mount:

root@openwrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)

and this is my /etc/config/fstab (I've tried many options without any success):

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 device '/dev/sda1'
	option target '/overlay'
	option fstype 'ext4'
	option options 'rw,sync,noatime,nodiratime'
	option enabled '1'
	option is_rootfs '1'

I've also formatted the device /dev/sda1 e copied again data form jffs2 overlay with
tar -C /overlay -cvf - . | tar -C /mnt/sda1 -xf -
without any success.

Also I don't remember that in previous version the "/overlay" have "upper" and "work" dirs inside.
Something is changed.

I saw this ticket /ticket/18795.html and I tried to apply the changes suggested adding mtdblock3 into fstab: no success.

If need more info, please tell me.

Attachments (0)

Change History (5)

comment:1 follow-up: Changed 3 years ago by jow

  • Priority changed from normal to response-needed

Did you compile the fstab config into your firmware?

comment:2 Changed 3 years ago by ambrosa

I've made many test during this week and I cannot found any solution.

If I made tests using a standard Ubuntu system (running in my PC) with kernel 3.13 and kernel overlay patch added by Ubuntu developers , all works fine and I can remount an overlay upperdir without any problem.

My build 44455 use new kernel 3.18 (the change was added somewhere AFTER my previous build 43982 that runs with 3.14 kernel and overlay works fine).
And something goes wrong. I've read that overlayfs is now standard since 3.18 original kernel. Something is changed ?

BTW during TDW8970 boot , squash root fs is "overlayed" with JFFS2 mtdblock3 partion.

root@openwrt:~# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock3 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)

Ok, sound goods.

The problem is that if I umount /overlay from mtdblock3 (the upperdir) and I mount it with /dev/sda1, overlayfs doesn't see any changes. I.e. like changes in upperdir are not propagated.
In Ubuntu system if I umount the overlay upperdir and mount a different upperdir

(suppose upperdir is /mnt/UPPERDIRMOUNTPOINT/upper and mount /dev/sda1/)
umount /dev/sda1
mount /dev/sdc2 /mnt/UPPERDIRMOUNTPOINT

immediately changes are visible into the targed "merged" filesystem: overlayfs now merge and show the lowerdir (unchanged) with the new UPPERDIRMOUNTPOINT content.

But with new 3.18 overlayfs this doesn't happen and it's like the overlayfs is "freezed" after its creatione during boot.
I've tried with mount -o remount and many other funny options without any success.

root@openwrt:/# mount
rootfs on / type rootfs (rw)
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,noatime)
sysfs on /sys type sysfs (rw,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,relatime,mode=600)
/dev/sda1 on /overlay type ext4 (rw,noatime,nodiratime,data=ordered)

root@openwrt:/# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                    1600       236      1364  15% /
/dev/root                 4864      4864         0 100% /rom
tmpfs                    30064      1296     28768   4% /tmp
overlayfs:/overlay        1600       236      1364  15% /
tmpfs                      512         0       512   0% /dev
/dev/sda1              7475128     16976   7441768   0% /overlay

comment:3 in reply to: ↑ 1 Changed 3 years ago by ambrosa

Replying to jow:

Did you compile the fstab config into your firmware?

The problem is not fstab not present into /rom/etc/config/
Because old build have not the fstab file present into squashfs /etc/config/

Simply now with 44455 system show a warning about fstab miss , but it's only a warning.

comment:4 Changed 3 years ago by ambrosa

Good news.
OpenWRT developer tell me that problem is known and fixing is in place.

More or less fix should be in trunk next week.

comment:5 Changed 3 years ago by ambrosa

Solved.

See /ticket/19038.html

Close this ticket

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.