Operating System - HP-UX
1836760 Members
2657 Online
110109 Solutions
New Discussion

Re: Directory keeps disappearing after reboot

 
SOLVED
Go to solution
TWBSupport
Regular Advisor

Directory keeps disappearing after reboot

Ugh! I have a directory on my HPUX 11i system that keeps disappearing after every reboot. I thought maybe it was there, but I just couldn't see the files, but it completely is gone. Thank goodness for my backups. But I don't know how to even start troubleshooting this. Could I have something messed up with the mirrors? Any advice would be greatly appreciated. Thanks a ton!
6 REPLIES 6
Patrick Wallek
Honored Contributor
Solution

Re: Directory keeps disappearing after reboot

Is this directory a mounted filesystem? Does the VG it is part of get activated? Does the LV get mounted? Is there an LV mounted ON TOP OF this directory? If you somehow did this then the directory would seem to disappear since it is not directly accessable while the LV is mounted over it.

Steven E. Protter
Exalted Contributor

Re: Directory keeps disappearing after reboot

I would look at conflicts between your lv mounting in /etc/fstab and the structure of the / root fs.

A good way to do this is to boot into single user mode and take a look around.

Any files in folders that are mounted by logical volumes should be moved or deleted.

The fstab file is your key to investigation and should be available on paper before you start.

Also, take a run through your startup scripts for some script with a rm -rf in it.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dario_1
Trusted Contributor

Re: Directory keeps disappearing after reboot

Hi!!

If you are mounting a file system on that directory and you have files there, you won't be able to see the files. Try un-mounting the filesystem to see if you can find the files. I will also look at any startup script that is executing the rm command at startup or shutdown time.

Regards,

Dario
Michael Steele_2
Honored Contributor

Re: Directory keeps disappearing after reboot

I'm confused about this comment "...Thank goodness for my backups...".

Are you having to restore this data? Into a new filesystem that you've created?

Please elaborate and attach these commands:

ioscan -fnkC disk > /tmp/file1 2>&1
vgdisplay -v > /tmp/file2 2>&1
bdf > /tmp/file3 2>&1
cat /etc/fstab > /tmp/file4 2<&1
Support Fatherhood - Stop Family Law
TWBSupport
Regular Advisor

Re: Directory keeps disappearing after reboot

Yes, I was restoring this data, BUT I'm now seeing a file system full / error. I definately screwed up. I've just gotten a little deeper in the forums & it looks as though with me restoring this directory, it's restored on top of the exisitng, possibly unmounted, directory. So, now I have to fix the file system full "/" problem, then I can fix the other problem & give you a little more data. Thanks
TWBSupport
Regular Advisor

Re: Directory keeps disappearing after reboot

OK - I did a REAL bonehead thing. When our developer told me his directory was gone, I automatically assumed another member of his group accidently deleted it (happened before), instead of investigating it. I restored the directory w/no problems, had to reboot a couple weeks later, directory gone. Restored the directory AGAIN, no problems. Lost power, when system came back up, this specific directory was missing again. A couple months ago, had to extend /var & /tmp, so I had to boot up in single user mode. I found this excerpt from a forum, that clued me in to what was happening with all of your pointing!

"In regards to having your root filesystem as /dev/root (should be /dev/vg00/lvol3) this needs to be fixed also. This generally can happen after booting into LVM maintenance mode or single-user mode.

# mv /etc/mnttab /etc/mnttab.bak
# mount -a

Check to make sure that /dev/vg00/lvol3 is
set to be mounted on / in your /etc/fstab file"

Basically the file system wasn't being mounted correctly after the extends. Doh!

Thank you all for your help. This was a lesson learned! :o)