Situatie:
- Twee linux systemen zijn met mekaar verbonden.
- Ik wil een NFS share mounten van de ene naar de andere
- Dit lukt, maar stel nu dat het andere systeem uitstaat, of netwerk problemen, of wat dan ook, dan krijg ik natuurlijk error boodschappen richting console:
Ik had dit al geprobeerd te routen naar /dev/null maar zonder succes (weer error boodschappen):
Ook dacht ik dat iets als "klogd -c 1" zou helpen maar helaas (weer error boodschappen):
Ter info mijn mount versie:
Dus het probleem is niet dat het mounten niet lukt (dat lukt wel), maar dat ik die error boodschappen onderdrukken wil.
Iemand ideeen of tips?
- Twee linux systemen zijn met mekaar verbonden.
- Ik wil een NFS share mounten van de ene naar de andere
- Dit lukt, maar stel nu dat het andere systeem uitstaat, of netwerk problemen, of wat dan ook, dan krijg ik natuurlijk error boodschappen richting console:
code:
Omdat ik in een geautomatiseerde omgeving wil werken met scriptjes en logging, wil ik deze errors niet zien in de console. Bestaat er een mogelijkheid deze errors te verbergen of uit te schakelen?1
2
3
4
| # mount -o nolock -t nfs 192.168.0.21:/mediax /mnt mount: 192.168.0.21:/mediax failed, reason given by server: Permission denied mount: nfsmount failed: Bad file descriptor mount: Mounting 192.168.0.21:/mediax on /mnt failed: Invalid argument |
Ik had dit al geprobeerd te routen naar /dev/null maar zonder succes (weer error boodschappen):
code:
1
2
3
4
| # mount -o nolock -t nfs 192.168.0.21:/mediax /mnt > /dev/null mount: 192.168.0.21:/mediax failed, reason given by server: Permission denied mount: nfsmount failed: Bad file descriptor mount: Mounting 192.168.0.21:/mediax on /mnt failed: Invalid argument |
Ook dacht ik dat iets als "klogd -c 1" zou helpen maar helaas (weer error boodschappen):
code:
1
2
3
4
5
| # klogd -c 1 # mount -o nolock -t nfs 192.168.0.21:/mediax /mnt mount: 192.168.0.21:/mediax failed, reason given by server: Permission denied mount: nfsmount failed: Bad file descriptor mount: Mounting 192.168.0.21:/mediax on /mnt failed: Invalid argument |
Ter info mijn mount versie:
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
| # mount --help
BusyBox v1.00 (2006.02.15-14:31+0000) multi-call binary
Usage: mount [flags] DEVICE NODE [-o options,more-options]
Mount a filesystem. Autodetection of filesystem type requires the
/proc filesystem be already mounted.
Flags:
-a: Mount all filesystems in fstab.
-o option: One of many filesystem options, listed below.
-r: Mount the filesystem read-only.
-t fs-type: Specify the filesystem type.
-w: Mount for reading and writing (default).
Options for use with the "-o" flag:
async/sync: Writes are asynchronous / synchronous.
atime/noatime: Enable / disable updates to inode access times.
dev/nodev: Allow use of special device files / disallow them.
exec/noexec: Allow use of executable files / disallow them.
loop: Mounts a file via loop device.
suid/nosuid: Allow set-user-id-root programs / disallow them.
remount: Re-mount a mounted filesystem, changing its flags.
ro/rw: Mount for read-only / read-write.
bind: Use the linux 2.4.x "bind" feature.
There are EVEN MORE flags that are specific to each filesystem.
You'll have to see the written documentation for those filesystems. |
Dus het probleem is niet dat het mounten niet lukt (dat lukt wel), maar dat ik die error boodschappen onderdrukken wil.
Iemand ideeen of tips?