1834135 Members
2276 Online
110064 Solutions
New Discussion

Re: File system problem

 
SOLVED
Go to solution
Dewa Negara_1
Advisor

File system problem

I have a problem on a file system /dev/vg00/lv_crash has been mounted on /var/adm/crash. When I run command bdf, it seems like the file system has been mounted on mount point /var/adm/crash. But when I go to /var/adm/crash and run bdf . , it doesn't give information that the file system mounted on /var/adm/crash. Tried to unmounted gave an error message "Block device required". How can we solve this problem? Anyone can help me on this?

[root@test:/root]
# bdf | grep crash
/dev/vg00/lv_crash 860160 754100 100637 88% /var/adm/crash

[root@test:/root]
# cd /var/adm/crash

[root@test:/var/adm/crash]
# bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lv_var 860160 754100 100635 88% /var

[root@test:/var/adm/crash]
# cd

[root@test:/root]
# umount /var/adm/crash
umount: cannot unmount /var/adm/crash : Block device required
log all your daily activities on syslog.log every time...
13 REPLIES 13
Gnananandhan
Frequent Advisor
Solution

Re: File system problem

Hi,
It is because you have mounted "/var/adm/crash" on an existing mount point "/var".

The command starts search from / - hence it reply seeing the first mount point "/var"

When you say . (though it is current directory) - The search is from root(/).

Hope this gives you an answer.

Regards,
Gnana A.


If there is a better way to do it, find it !
Tom Geudens
Honored Contributor

Re: File system problem

Hi,
Can you do the following ?
#ll /dev/vg00/rlv_crash
Does it return a filelisting ?

It looks like a strange problem, but /var/adm/crash can also be recreated in case the problem can not be found.

Hope this helps,
Tom
A life ? Cool ! Where can I download one of those from ?
Tom Geudens
Honored Contributor

Re: File system problem

Hi,
Gnana A., I don't want to talk against your reply, but I just tried this myself ...
root/sv00220#cd /var
root/sv00220#bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol9 512000 119890 368093 25% /var
root/sv00220#cd /var/adm/crash
root/sv00220#bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol10 524288 51365 443420 10% /var/adm/crash

In my opinion, the "bdf ." should work correctly ...

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Dewa Negara_1
Advisor

Re: File system problem

Thanks alot. Tom, the raw device file has been there.

[root@test:/var/adm]
# ll /dev/vg00/rlv_crash
crw-r----- 1 root sys 64 0x000009 Jun 13 2000 /dev/vg00/rlv_crash

How can we make the file system is mounted on /var/adm/crash instead of /var?

Rgds,
dewa negara

log all your daily activities on syslog.log every time...
Tom Geudens
Honored Contributor

Re: File system problem

Hi,
I've just executed this on my system, so this should work. Remember to replace lvol10 with the name of your logical volume (lv_crash).
Here goes :
root/sv00220#umount /var/adm/crash
root/sv00220#lvremove /dev/vg00/lvol10
root/sv00220#lvcreate -L 512 -n lvol10 vg00
root/sv00220#newfs -F vxfs /dev/vg00/rlvol10
root/sv00220#mkdir /var/adm/crash
mkdir: cannot create /var/adm/crash: File exists
root/sv00220#vi /etc/fstab
# Enter the following entry after (!!!) the mount of /var
/dev/vg00/lvol10 /var/adm/crash vxfs delaylog 0 2

root/sv00220#mount -a
root/sv00220#cd /var/adm/crash
root/sv00220#bdf .
Filesystem kbytes used avail %used Mounted on
/dev/vg00/lvol10 524288 1229 490375 0% /var/adm/crash

Let me know if it works !!!
Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
S.K. Chan
Honored Contributor

Re: File system problem

Since umounting at filesystem level gives you the error, try umount the LV itself ..

# umount /dev/vg00/lv_crash

If that works that should leave you with only /var mounted. You would then do this ..

# cd /var/adm
# mv crash crash.org
==> If there is something in this dir, you would want to copy it over later.
# mkdir crash
==> Make sure ownership and permission remains the same as crash.org
# mount /dev/vg00/lv_crash /var/adm/crash

Edit /etc/fstab appropriately and copy (if there are any) the content of /var/adm/crash.old to /var/adm/crash.
Dewa Negara_1
Advisor

Re: File system problem

Tom & S.K. Chan, I can not remove the file system because I can not unmount it either using mount point or device file.

Any idea please?

thanks alot.

[root@test:/root]
# umount /var/adm/crash
umount: cannot unmount /var/adm/crash : Block device required

[root@test:/root]
# umount /dev/vg00/lv_crash
umount: cannot unmount /var/adm/crash : Block device required
log all your daily activities on syslog.log every time...
Tom Geudens
Honored Contributor

Re: File system problem

Hi,
... strange ...
Is /var/adm/crash in use ?
#fuser -cu /var/adm/crash

Can you perhaps mount it ?
#mount /dev/vg00/lv_crash /var/adm/crash

Just leading up to this, but is this a server you can (schedule for) reboot easily ?

Can you also post the output from the "bdf" command ?

Regards,
Tom
A life ? Cool ! Where can I download one of those from ?
Tom Geudens
Honored Contributor

Re: File system problem

Hi,
The output from the "mount" command might be usefull too.

Regards,
Tom :-)

P.S. Sorry if my questions are somewhat incoherently, but I've dedicated one of our own servers for this problem and I trying to reproduce the problem :-)


A life ? Cool ! Where can I download one of those from ?
Trond Haugen
Honored Contributor

Re: File system problem

There should be no problems bdf'ing "cascading mounts". In your case 'bdf / /var /var/adm/crash' should produce three lines with different numbers. Here's an example from my system:
$ bdf / /home /home/trond/PC
Filesystem kbytes used avail %used Mounted on
/dev/root 143360 100141 40533 71% /
/dev/vg02/lvol1 4190208 1445493 2573294 36% /home
/dev/vg04/lvol1 4096000 3522014 538150 87% /home/trond/PC

A reboot will probably solve your problem.
If you want to find the cause here are some suggestions:
Is the filesystem mounted thru fstab? If not try 'umount /dev/vg00/lv_crash'.
Since the hostname is 'test': try moving /etc/mnttab to a backup copy and run 'bdf /var/adm/crash' to recreate mnttab.

Regards,
Tron
Regards,
Trond Haugen
LinkedIn
Dewa Negara_1
Advisor

Re: File system problem

Thanks alots to all of you. I will try to reboot the server. But will not be able to find the root cause ;-)

Anyway, mount command inform that the file system is already mounted

[root@test:/root]
# mount /dev/vg00/lv_crash /var/adm/crash
mount: /dev/vg00/lv_crash is already mounted on /var/adm/crash

Rgds,
dewa negara
log all your daily activities on syslog.log every time...
Gnananandhan
Frequent Advisor

Re: File system problem

Hi TOM GEUDENS,
You are right. I tried that. Thanks .

I have a similar setup, Which mounts a remote FS. Unfortunately when I tried the example today morning, the remote server was down and the o/p was shown for its parent directory.
If there is a better way to do it, find it !
Bill Hassell
Honored Contributor

Re: File system problem

You may have some corruption in the mount tables. To be sure /var/adm/crash does not get remounted, comment it out from /etc/fstab just before a reboot. When you reboot, /var should be mounted. Now manually mount and unmount /var/adm/crash:

# mount /dev/vg00/lv_crash /var/adm/crash
# ls /var/adm/crash
# umount /var/adm/crash

That should work error free. If not, you may want to back any files you need to savefrom /var/adm/crash, then reboot (with fstab still commented for the crash directory), and use newfs to create a new filesystem. Repeat the tests and if that still fails, use lvremove, followed by lvcreate and newfs and that should solve the problem.


Bill Hassell, sysadmin