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?

1
  • Can you not mount lv1 on a different mount point and inspect it there?
    – Shawn Chin
    Aug 26 '11 at 12:10
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
1
  • Fantastic, and there is the missing data!
    – asc99c
    Aug 26 '11 at 13:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.