mount

【集群实战】NFS服务常见故障排查和解决方法

自古美人都是妖i 提交于 2019-12-09 20:20:17
NFS,全名叫Network File System,中文叫网络文件系统,是Linux、UNIX系统的分布式文件系统的一个组成部分,可实现在不同网络上共享远程文件系统。 NFS由Sun公司开发,目前已经成为文件服务的一种标准之一(RFC1904,RFC1813)。 其最大的功能就是可以通过网络,让不同操作系统的计算机可以共享数据,所以可以把NFS看做是一个文件服务器。NFS缺点是其读写性能比本地硬盘要差一些。 一、NFS服务常见故障排查: NFS服务出现了故障,主要从以下几个方面检查原因: (1)检查NFS客户机和服务器的负荷是否太高,Server和Client之间的网络是否正常; (2)检查/etc/exports文件的正确性; (3)必要时重启NFS和rpcbind服务; (4)运行下列命令重新启动rpcbind和NFS: /etc/init.d/nfs restart/etc/init.d/rpcbind restart chkconfig nfs onchkconfig rpcbind on 注意:在RHEL/CentOS 6.x里面,portmap服务改名为rpcbind服务了;顺便说一下,rpcbind服务也是图形界面的关键基础服务,不启动此服务,不能启动图形桌面。 (5) 检查Client上的mount命令或/etc/fstab的语法是否正确; (6)

20191209 Linux就该这么学(6)

徘徊边缘 提交于 2019-12-09 20:20:00
6. 存储结构与磁盘划分 6.1 一切从“/”开始 Linux 系统中的一切文件都是从“根(/)”目录开始的,并按照文件系统层次化标准(FHS)采用树形结构来存放文件,以及定义了常见目录的用途。 FHS 是根据以往无数 Linux 系统用户和开发者的经验而总结出来的,是用户在 Linux 系统中存储文件时需要遵守的规则,用于指导我们应该把文件保存到什么位置,以及告诉用户应该在何处找到所需的文件。但是, FHS 对于用户来讲只能算是一种道德上的约束。 在 Linux 系统中另外还有一个重要的概念—路径。路径指的是如何定位到某个文件,分为绝对路径与相对路径。绝对路径指的是从根目录(/)开始写起的文件或目录名称,而相对路径则指的是相对于当前路径的写法。 6.2 物理设备的命名规则 系统内核中的 udev 设备管理器会自动把硬件名称规范起来,目的是让用户通过设备文件的名字可以猜出设备大致的属性以及分区信息等; 一台主机上可以有多块硬盘,因此系统采用 a~p 来代表 16 块不同的硬盘(默认从 a 开始分配),而且硬盘的分区编号也很有讲究: 主分区或扩展分区的编号从 1 开始,到 4 结束; 逻辑分区从编号 5 开始 主分区、扩展分区和逻辑分区的概念 6.3 文件系统与数据资料 Linux系统支持数十种的文件系统,而最常见的文件系统如下所示: Ext3 :是一款日志文件系统

How to use Extended File Attributes on NFS?

自闭症网瘾萝莉.ら 提交于 2019-12-09 17:43:03
问题 I have an NFS_Server - NFS_Client system. My client is mounted to an NFS_Server directory . I want to change the attribute of NFS_Server directory's files via NFS_Client mounted directory by using Extended File Attributes (xattr). When I tried to set an attribute from the client side, it gives the following answer: root@ubuntu:/mnt/nfs/var/nfs# setfattr -n user.comment -v "some comment" test.txt setfattr: nfs.txt: Permission denied My question is: is it possible to use Extended File

Access time does not change after a file is opened

南楼画角 提交于 2019-12-08 21:40:26
问题 I am using stat to get the acess time of a file (current date is October 23, 2013) [juan@JN-LNXSVR-02 labfiles]$ stat nursery File: `nursery' Size: 837 Blocks: 8 IO Block: 4096 regular file Device: fd00h/64768d Inode: 139539 Links: 1 Access: (0644/-rw-r--r--) Uid: ( 500/ juan) Gid: ( 500/ juan) Access: 2013-10-22 18:03:20.703888346 -0400 Modify: 2013-10-21 16:57:07.801165793 -0400 then I edit the file and close it without any modification, and submit stat again juan@JN-LNXSVR-02 labfiles]$ vi

Docker Unknown flag --mount

偶尔善良 提交于 2019-12-08 16:27:54
问题 I want to mount a directory from the host to a container using the mount flag over volume but I am getting ` This is only experienced when using mount flag and not with volume *Command:* docker run -d -it --name devtest --mount type=bind,source="$(pwd)",target=/home/ httpd Error unknown flag: --mount Server Version: 1.13.1 Storage Driver: aufs Dirperm1 Supported: true Logging Driver: json-file Cgroup Driver: cgroupfs Plugins: Volume: local Network: bridge host macvlan null overlay Swarm:

Difference between statvfs() and statfs() system calls?

拥有回忆 提交于 2019-12-08 14:37:57
问题 Why do the statfs() and statvfs() calls both exist when they're so similar? Under what circumstances would I prefer one over the other? 回答1: Err, "historical reasons". Originally 4.4BSD defined a statfs() call. Linux later implemented a slightly different call with the same name. Posix standardized it between all freenix and Unix versions by defining statvfs() . statfs() is OS-specific statvfs() is posix-conforming As they all return slightly different structures, later ones to come along can

umount doesn't work with device in C (but it works in Terminal)

回眸只為那壹抹淺笑 提交于 2019-12-08 09:45:34
问题 I'm trying to unmount programmatically an USB drive (device /dev/sdb1 ). If I run in a Linux terminal sudo umount /dev/sdb1 it works. However, if I gcc compile and run the following C snippet as sudo , it errors with ERRNO 22 = EINVAL (Invalid argument) . This is the code: #include "unistd.h" #include "sys/mount.h" #include "errno.h" int main() { int r = umount2("/dev/sdb1", MNT_FORCE); if (r != 0) return errno; else return 0; } The same applies for umount() . MNT_FORCE doesn't change

How to mount Android as CD-ROM?

烂漫一生 提交于 2019-12-08 09:41:27
问题 I have Galaxy S4 with custom ROM and kernel. I need to mount ISO image from sdcard to Windows/Linux PC as CD-ROM. There's a "DriveDroid" app that works fine, but I need to do it manually (as a study). Windows 8 writes that "Device needs to be formatted". code (bash script) # Disable USB echo 0 > /sys/class/android_usb/android0/enable # Set Vendor and Product IDs echo 0x04e8 > /sys/class/android_usb/android0/idVendor echo 0x6860 > /sys/class/android_usb/android0/idProduct # Set mass_storage

android mount unmount sd card

旧城冷巷雨未停 提交于 2019-12-08 07:51:53
问题 I am working on an application that scans the sd card. At this time, I am using the emulator of eclipse to test my android application. I have created a virtual sd-card for testing purposes on eclipse. I want to know if there is any way of un-mounting and then mounting the sd card on the emulator (eclipse) so that I can test my application that when the sd-card is unmounted, it should generate a message etc.. Can anyone help me here.. 回答1: It is possible to boot the device without the