2 errors with last install : df and csf

pppplus

Verified User
Joined
Dec 19, 2008
Messages
526
Hi

I have two errors, in my last installed server.
I try to find more informations, but I've found nothing.

1st :
(in directadmin errortask log)
unable to get the disk usage with the df command to check the disk usage
probably same error here :
Code:
# df -h
/dev/root              34G  7.3G   25G  23% /var/named/chroot/etc/named
/dev/root              34G  7.3G   25G  23% /var/named/chroot/var/named
df: `/var/named/chroot/etc/named.conf (deleted)': No such file or directory

2nd :
When updating accounts
User csf has unknown usertype

Thanks for your help
 
/var/named/chroot/etc/named
If you get that output with df -h then something went really wrong.
You should not have /var/named/chroot/etc/named mounted as partitions or partition labels.
You should not have bind-chroot installed in any case.

If this newly installed server is not in production yet, I would advise to format the drives and reinstall it again.
You should have a look at these pages (also for format and mount suggestions):
http://www.directadmin.com/install.html

and this one:
http://help.directadmin.com/item.php?id=354
 
Thanks for your reply.

fstab is :
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md2 / ext3 errors=remount-ro 0 1
/dev/md3 /home ext3 defaults,usrquota,grpquota 1 2
/dev/sda4 swap swap defaults 0 0
/dev/sdb4 swap swap defaults 0 0
proc /proc proc defaults 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs defaults,nosuid,noexec,rw 0 0
devpts /dev/pts devpts defaults 0 0
/var/tmpMnt /tmp ext3 loop,rw,noexec,nosuid,nodev 0 0

I never mount /var/named/chroot/etc/named
I see another person with same problem, but without answer.

Server is in production, I can't reinstall it easyly.
Someone has another solution ?
 
You should not be running named in chroot. If you do you need to remove it and install normal bind.
 
Still... df -h should not give that output even if bind-chroot is installed, correct?

Your fstab looks fine. Uninstall bind-chroot, as I already wrote, that should not be installed in any case.
Can you also see which distro you are using?
And maybe check your /etc/mtab file if that does have the /var/named/chroot/etc/named als mountpoint. I guess there is a chance that df -h will give the correct output after uninstalling bind-chroot.
 
Thanks Richard

To uninstall, is this simple line correct ?
#yum remove bind-chroot

I have centos 6-64 bits

/etc/mtab is empty (linked to /proc/mounts linked to /self/mounts )
 
In this case, you might need to unlink /etc/mtab from /proc/mounts and re-create the file based on /etc/fstab
I'm not sure how you mean this, because /etc/mtab is not the same as /etc/fstab. There are often some slight differences.

I would regenerate it like this:
Code:
cat /proc/mounts > /etc/mtab
 
You should never touch /etc/mtab; it's generated when the filesystem is mounted. If mounting/unmounting file systems don't fix your mtab you can reboot your server, but depending on the problem (hardware problem?) it may not reboot.

http://en.wikipedia.org/wiki/Mtab

Jeff
 
You should never touch /etc/mtab; it's generated when the filesystem is mounted. If mounting/unmounting file systems don't fix your mtab you can reboot your server, but depending on the problem (hardware problem?) it may not reboot.

That's not always true. Recently had an issue with /etc/mtab and had to re-build it from /etc/fstab.

https://access.redhat.com/knowledge...ministration/s3-storage-mounting-viewing.html
http://www.web-manual.net/lamp-architecture/etcfstab-etcmtab-and-procmounts-files-in-linux/
 
In case if you use LiveCD or rescue mode there is no way to use /proc/mounts and in this case he file should be re-generated from /etc/fstab.
Correct, but that's not the case right now, he can login to his machine without a LiveCD.

However... there might not be a change needed. Could be the builder of the system made it like this.
I don't know for sure but I thought that /etc/mtab should not be symlink to /proc/mounts.
If you delete this symlink and reboot the server, the /etc/mtab should be generated again automatically as Jeff wrote.

My solution to rebuild it with the cat /proc/mounts commands was only a temporary solution. You have to reboot then anyway and then the /etc/mtab is rebuild automatically. And should also be read-only.

Unless you have a bigger problem indeed.:)

I'm curious now to the output of df -h with bind-chroot uninstalled and without fixing the /etc/mtab.
 
If you delete this symlink and reboot the server, the /etc/mtab should be generated again automatically as Jeff wrote.

Unfortunately that's also not always true. I had an issue with booting a server, and I've experimented with /etc/mtab and it did not get overwritten if it was completely empty. I've added partitions from /etc/fstab and the other tmpfs and etc were added by OS. Probably I did something wrong, who knows). But that was my recent experience.

I'm curious now to the output of df -h with bind-chroot uninstalled and without fixing the /etc/mtab.

Me too. Might be related to https://bugzilla.redhat.com/show_bug.cgi?id=770609
 
Hi, and thanks for all your answer.
I am a little afraid by your different point of view about mtab.

So, first, I remove bind-chroot :
Removed: bind-chroot.x86_64 32:9.8.2-0.10.rc1.el6_3.6

Now #df -h
Code:
Filesystem            Size  Used Avail Use% Mounted on
rootfs                 34G  7.2G   26G  23% /
/dev/root              34G  7.2G   26G  23% /
none                   16G  452K   16G   1% /dev
/dev/md3              1.8T  505G  1.2T  30% /home
tmpfs                  16G  4.0K   16G   1% /dev/shm
/dev/root              34G  7.2G   26G  23% /var/named/chroot/etc/named
/dev/root              34G  7.2G   26G  23% /var/named/chroot/var/named
df: `/var/named/chroot/etc/named.conf (deleted)': No such file or directory
/dev/root              34G  7.2G   26G  23% /var/named/chroot/etc/named.rfc1912.zones
/dev/root              34G  7.2G   26G  23% /var/named/chroot/etc/rndc.key
/dev/root              34G  7.2G   26G  23% /var/named/chroot/usr/lib64/bind
/dev/root              34G  7.2G   26G  23% /var/named/chroot/etc/named.iscdlv.key
/dev/root              34G  7.2G   26G  23% /var/named/chroot/etc/named.root.key
/dev/loop0           1008M  143M  815M  15% /tmp

So error is always here

2nd : mtab :

Code:
# cat /etc/mtab
rootfs / rootfs rw 0 0
/dev/root / ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
none /proc proc rw,nosuid,nodev,noexec,relatime 0 0
none /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0
none /dev devtmpfs rw,relatime,size=16420916k,nr_inodes=4105229,mode=755 0 0
devpts /dev/pts devpts rw,relatime,mode=600 0 0
/dev/md3 /home ext3 rw,relatime,errors=continue,barrier=1,data=writeback,usrquota,grpquota 0 0
tmpfs /dev/shm tmpfs rw,nosuid,noexec,relatime 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw,relatime 0 0
/dev/root /var/named/chroot/etc/named ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/var/named ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.conf\040(deleted) ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.rfc1912.zones ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/rndc.key ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/usr/lib64/bind ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.iscdlv.key ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.root.key ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/loop0 /tmp ext3 rw,nosuid,noexec,relatime,errors=continue,barrier=1,data=writeback 0 0

Code:
# cat /etc/fstab
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
/dev/md2        /       ext3    errors=remount-ro       0       1
/dev/md3                /home                   ext3    defaults,usrquota,grpquota      1       2
/dev/sda4       swap    swap    defaults        0       0
/dev/sdb4       swap    swap    defaults        0       0
proc            /proc   proc    defaults                0       0
sysfs           /sys    sysfs   defaults                0       0
tmpfs           /dev/shm        tmpfs   defaults,nosuid,noexec,rw       0       0
devpts          /dev/pts        devpts  defaults        0       0
/var/tmpMnt /tmp ext3 loop,rw,noexec,nosuid,nodev 0 0
 
Last edited:
Your /etc/fstab looks fine.

I'm still very concerned about the contents of /etc/mtab.
As Zeiter stated, the output of df -h could be the result of a bug.

However, in that case this should not be present that way in /etc/mtab.
I can't remember having ever seen something like named being mounted in mtab.
And lines like this:
Code:
/dev/root /var/named/chroot/etc/named.conf[b]\040(deleted)[/b] ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
with "deleted" in /etc/mtab????

Have you rebooted the server already after removing bind-chroot?
 
/dev/root /var/named/chroot/etc/named ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/var/named ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.conf\040(deleted) ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.rfc1912.zones ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/rndc.key ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/usr/lib64/bind ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.iscdlv.key ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0
/dev/root /var/named/chroot/etc/named.root.key ext3 rw,relatime,errors=remount-ro,barrier=1,data=writeback 0 0

Why don't you umount them?
 
Hi

No, I do not restart the server.
I search for "/dev/root /var/named/chroot/etc/named" in google, and there are a lot of persons having the same "problem", but nothing clear for me in the answers.

@zEitEr : how to umount each line ? And are you sure, there will be no problem ?

Thanks for your help
 
Run this to list only
Code:
cat /proc/mounts  | grep ^/dev/root | awk '{system("echo "$2)}'
to make sure you not unmount wrong things. Check the displayed list carefully and then unmount:

Code:
cat /proc/mounts  | grep ^/dev/root | awk '{system("umount "$2)}'

and check with

Code:
cat /proc/mounts

That should not break anything, the worst thing might happen is to break chrooted named, which as you told you removed
 
No, I do not restart the server.
My thought was that after removing bind-chroot, on a reboot, the system would not find the /var/mound/chroot-bind entry anymore and would not mount that filesystem again in mtab.

However, Zeiter's solution is more safe to do. You can always try a reboot if that did not help.
 
# cat /proc/mounts | grep ^/dev/root | awk '{system("echo "$2)}' gives this :
Code:
/
/var/named/chroot/etc/named
/var/named/chroot/var/named
sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `echo /var/named/chroot/etc/named.conf\040(deleted)'
/var/named/chroot/etc/named.rfc1912.zones
/var/named/chroot/etc/rndc.key
/var/named/chroot/usr/lib64/bind
/var/named/chroot/etc/named.iscdlv.key
/var/named/chroot/etc/named.root.key

So I suppose I can't send umount, because I have not to umount /
 
Back
Top