Missing filesystem after deleting /tmp/squid

For whatever reason, after I did a "rm -Rf /tmp/squid" all the files on the filesystem seems to have disappeared!

if I go to the root "/" and do a "ls" I get nothing!
If I manually go to /tmp/ I do see some files there still.
I tried to do a "mount" and everything appears to be OK.

/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/sda1 on /overlay type ext4 (rw,relatime,data=ordered)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /tmp/squid type ext4 (rw,relatime,data=ordered)
/dev/sda1 on /mnt type ext4 (rw,relatime,data=ordered)

I'm hesitant to reboot as I fear I may have deleted everything and it won't come back up!

Any ideas?


running: [18.06.6]

edit: I did notice this symlink in /tmp/squid prior to deleting all the files: .fs_state -> 2

Make backup and reboot.

make backup of what? lol
I can't see any files :confused: other than what's in /tmp

when I type "df" I get:

Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/root                 2816      2816         0 100% /rom
tmpfs                    62632      5072     57560   8% /tmp
/dev/sda1              3818832     24504   3580624   1% /overlay
overlayfs:/overlay     3818832     24504   3580624   1% /
tmpfs                      512         0       512   0% /dev
/dev/sda1              3818832     24504   3580624   1% /tmp/squid
/dev/sda1              3818832     24504   3580624   1% /mnt

It seems like the files are still there.. I think!

What's in "/overlay"?

nothing apparently... :worried:

/overlay# ls -al
drwxr-xr-x    2 nobody   nogroup       4096 Jan  7 12:00 .
drwxr-xr-x    1 root     root             0 Jan  7 12:00 ..

Wait... you have the same "/dev/sda1" mounted on "/overlay", "/mnt", and "/tmp/squid". When you deleted "/tmp/squid" you also deleted everything else at the other two mounting point, you have effectively wiped everything.

1 Like

I see such mounting first time. Is it possible and used to mount the same partition multiple times at different mount points?

Just a note: Your squid was misconfigured. I suspect you need to create separate dir on sda1 to contain cache_dir. And edit squid.conf .

Yes, it's possible to mount the same device multiple times; but not very common.

ACK! :cry:
guess the next time I reboot I'm @#$@%! ?
any way to recover from this? How am I supposed to re-install when there's nothing left? :confounded:

that is what I was trying to accomplish.. obviously I was doing it wrong! :roll_eyes:

I would love to be wrong, but I also think you lost everything... How does "start from scratch" sound?

If you reboot without the external device plugged in, you will still have your files from before you configured the "extroot". Everything on the external device is lost.

You can also mount that device on a computer, and try some recovery utility... but, with an EXT4 filesystem, I would not hold my breath.

1 Like

that's what I was afraid of.. :worried:
I did notice I can still see all the config files if I cat a file directly ex: "cat /etc/config/networks"
I also noticed I can still run sysupgrade so I downloaded the latest sysupgrade.bin for my router to /tmp .. I'm wondering if I could use that to update to 19.07.0 prior to rebooting? I'm assuming I'd sill lose all my settings that are in /etc/ and /etc/config/ ? (even though I can't see them by typing "ls -al")

Thanks for the help!

If you can still see the files, I would at least save a copy of them, even if you need to copy-paste from the terminal.

I've already done this! I also had a config backup from a few weeks ago! :slight_smile:
I'm just curious if I can still perform a sysupgrade in the condition my router is in right now!!?
I guess by removing the ext device and rebooting would boot the default settings I had prior to adding the ext device. Then I'd be able to do a proper sysupgrade.

Yes, that is what I would do.