3

I've got a SUSE Linux (SLES) system where after a power outage, one of the directories appears to be out of date. It has got some mount points for various logical volumes e.g.

/dir      -> lv1
/dir/db   -> lv2
/dir/log  -> lv3

The db directory appears to not be updated for months, while the log shows data throughout the whole time period.

lv1 is showing as 80% full, and I can only account for 20% of that space.

I'm going with the assumption that for some reason before the power outage, the /dir/db directory was not mounted, so writes to /dir/db were just going into a directory on lv1. After the restart, the mount has been setup and so I'm seeing old data from the last time the mount point worked.

Is there any way to examine 'under' the mountpoint, and see if the data is there, without unmounting the filesystem?

asc99c
  • 143
  • 4

1 Answers1

4

Yes, just mount /dirs parent directory somewhere else with mount --bind:

# mkdir /mnt/tmp
# mount --bind / /mnt/tmp
# cd /mnt/tmp/dir

Then inspect the state of the directory. When done:

# umount /mnt/tmp
# rmdir /mnt/tmp
cdhowie
  • 382
  • 1
  • 9