网络文件系统
注意事项
- 本章节中全程保持
Selinux
开启
Samba
Samba服务简介
SMB = Server Message Block
CIFS = Common Internet File System
Windows系统共享文件时用到的协议是SMB
Linux端则使用CIFS
简单来说,SAMBA
就是用于Linux和Windows间跨平台进行数据传输的工具之一.
##Samba基本信息
##分别安装服务端,客户端及工具包
dnf install samba samba-common samba-client -y
smb.service ##服务启动脚本
/etc/samba ##主配置目录
/etc/smb.conf ##主配置文件
samba_share_t ##安全上下文
139 ##NetBIOS会话服务端口
445 ##SMB Direct端口
Samba的安装与启用
dnf install samba.x86_64 samba-common.noarch samba-client -y
systemctl enable --now smb
firewall-cmd --permanent --add-service=samba
firewall-cmd --reload
##测试方法
smbclient -L //172.25.254.36
为Samba添加用户
虽然Samba可以通过设置允许匿名访问,但是通常来说我们还是需要添加用户的.
- 添加的Samba用户必须是服务端已经存在的用户
- 下列操作均为对服务端的操作
smbpasswd -a Test ##添加Test用户作为Samba用户
pdbedit -L ##查看Samba用户列表
pdbedit -x Test ##删除Test用户
##访问家目录
首先因为Selinux是开启的,需要检查Sebool的开关状态
getsebool -a | grep samba
setsebool -p samba_enable_home_dirs on
setsebool -P samba_export_all_ro 1
smbclient -L //172.25.254.36 -U Test
##使用Test用户登录Samba服务器并查看共享目录
##使用Test用户登录SMB服务器并把TestDir目录挂载到客户机的mnt目录下
mount -o username=Test,passwd=Test //172.25.254.125/TestDir /mnt
添加Samba服务共享目录
##创建新的共享目录,设置并刷新安全上下文
mkdir /TestDir
touch /TestDir/TestFile{1..5}
semanage fcontext -a -t samba_share_t '/TestDir(/.*)?'
restorecon -RvvF /TestDir
##编写smb配置文件
vim /etc/samba/smb.conf
[TestDir] ##共享名称
comment = TestDir ##共享目录说明
path = /TestDir ##目录的路径
Sambade的访问控制
通过修改主配置文件,可以实现对不同IP的访问控制.
由于主配置文件是分段的,写在[GLOBAL]中会作用于全局,而写在单独的共享目录下只会作用于该目录.
hosts allow 172.25.254.36 ##允许172.25.254.36访问该Samba共享
hosts deny 172.25.254.25 ##不允许172.25.254.25访问该Samba共享
同理也可以仅对登录用户或者组做限制
valid users = Test ##只允许用户以Test身份进行登录
valid users = +Test ##只允许用户以Test组内的用户的身份进行登录
valid users = +@Test
Samba的常用配置参数
writable = yes ##可写
##可写也意味着可以建立和删除/重命名
write list = Test ##指定用户可写
write list = +Test ##指定用户组可写
browseable= yes | no ##是否隐藏共享,即改即生效,不需要重启服务
##允许匿名用户访问
map to guest = bad user ##写在全局设定中
guest ok = yes ##写在目录设定中,允许匿名用户访问
##指定此共享的超级用户身份
admin users = Test
Samba的多用户挂载
在上文中我们使用了mount -o username=Test,passwd=Test //172.25.254.125/TestDir /mnt
进行Samba
目录挂载.为了下文方便,首先在客户端安装如下软件.
dnf install cifs-utils -y
但正如你所看到的,登录用户和密码以明文的形式出现在了历史记录中.
这里我们改用文件的方式来进行验证
##创建验证文件
vim /root/smb_auth
username=Test
password=Test
##修改文件权限,让只有root用户可以查看,保证密码的安全性
chmod 600 /root/smb_auth
##采用文件验证方式登录挂载Samba,历史中不会出现明文信息
mount //172.25.254.136/TestDir /media/ -o credentials=/root/smb_auth
在客户段如果用这种普通的挂载方式,没有进行过用户验证的人也可以访问Samba服务.这是不合理也不安全的.但可以通过在客户端进行配置来解决.如增加multiuser参数
.
如上图所说,虽然这样其他用户就没法访问root
用户挂载的目录了,但是如果其他用户也能自行进行登录验证决定是否可访问就更好了,这就涉及到了sec
参数.
##增加sec=ntlmssp参数后,其他用户可以通过Samba验证进行访问
mount //172.25.254.125/westos /media/ -o credentials=/root/smb_auth,multiuser,sec=ntlmssp
当其他系统用户的身份进行访问但输入错误的密码之后,将无法访问挂载目录.即使再次登录也会被拒绝.除非删除之前的错误访问记录.
##添加访问认证
cifscreds add -u Test 172.25.254.125
##删除错误认证
cifscreds clear -u Test 172.25.254.125
NFS网络文件系统
NFS (Net File System),另一种用于进行网络文件共享的软件.
NFS默认不需要用户认证,但可以自行添加.
##软件安装
dnf install nfs-utils -y
##服务名称
nfs-service
##共享目录的配置文件
/etc/exports
##查看挂载的方式
showmount -e IP地址
##添加火墙支持,rpcbind mountd nfs都需要被火墙允许
systemctl enable --now nfs-server
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --permanent --add-service=mountd
firewall-cmd --permanent --add-service=nfs
firewall-cmd --reload
举例编写exports
文件,将TestDir
加入其中并允许只读访问.
vim /etc/exports
cat /etc/exports
/TestDir *(ro)
##刷新配置文件
exportfs -rv
exporting *:/TestDir
firewall-cmd --permanent --add-service=nfs
firewall-cmd --permanent --add-service=mountd
firewall-cmd --permanent --add-service=rpc-bind
firewall-cmd --reload
systemctl enable --now nfs-server.service
showmount -e 172.25.254.136
mount 172.25.254.136 /media
NFS配置中的一些参数
anonuid=1000 ##指定用户身份ID
anongid=1000 ##指定组的身份ID
sync ##更改生成后同步数据到服务器
async ##时时同步数据到服务器
rw ##读写权限
ro ##只读权限
no_root_squash ##root用户挂载不转化身份
NFS默认的同步方式为sync
.
参数应用举例
/TestDir *(rw,anonuid=1000,anongid=1000,sync,no_root_squash)
NFS的自动挂载
NFS的自动挂载需要在客户端用到相关软件auto.fs
.
dnf install autofs -y
软件安装并启动服务后会自动安装/net
ls -ld /net
ls: cannot access '/net': No such file or directory
systemctl enable --now autofs.service
Created symlink /etc/systemd/system/multi-user.target.wants/autofs.service → /usr/lib/systemd/system/autofs.service.
ls -ld /net
drwxr-xr-x 2 root root 0 Feb 26 11:49 /net
auto.fs
时在客户端实现自动挂载卸载的软件,通过对主配置文件的修改可以实现自动挂载卸载的自定义.
auto.fs
的主要配置文件有两个,分别是/etc
下的auto.master
和auto.misc
.
auto.master
起控制作用,定义了挂载点和automount
动作的文件.
auto.misc
就是automount
动作的文件.
vim /etc/auto.master
/mnt /etc/auto.misc
vim /etc/auto.misc
nfs -fstype=nfs,ro 172.25.254.36:/public
##Autofs+Samba的组合使用方式也类似
vim /etc/auto.master
/mnt /etc/auto.samba
vim /etc/auto.samba
Samba -fstype=cifs,username=Test,password=Test ://172.25.254.20/TestDir
ISCSI共享磁盘
上述的两种方式:NFS
和Samba
实际上是通过软件和软件间进行文件操作.速度和效率受限于软件本身.能不能直接将硬件进行交付呢,通过ISCSI共享磁盘
的方式也是可以实现的.ISCSI不是通过软件进行操作,而是直接共享设备权限.
网络共享设备的添加
##前期准备
##服务端
dnf install targetcli -y
systemctl enable --now target.service
#使用targetcli命令编辑模式
targetcli
创建一个存储/设备
/backstores/block create westos_storage /dev/vdb1
创建IQN用于标识单个iSCSI目标和启动器
/iscsi create iqn.2021-02.org.westos:storage
关联IQN和存储/设备
/iscsi/iqn.2021-02.org.westos:storage/tpg1/luns create /backstores/block create westos_storage
创建一个ACL钥匙
/iscsi/iqn.2021-02.org.westos:storage/tpg1/acls create iqn.2021-02.org.westos:westoskey
修改火墙策略,允许3260端口
firewall-cmd --permanent --add-port=3260/tcp
firewall-cmd --reload
##客户端
##安装相关软件
dnf install iscsi-initiator-utils.x86_64 -y
##修改客户端的iscsi认证key与服务端相同
vim /etc/iscsi/initiatorname.iscsi
InitiatorName=iqn.2021-02.org.westos:westoskey
systemctl restart iscsid
##列出服务端可用的网络存储
iscsiadm -m discovery -t st -p 172.25.254.136
##启用服务端的存储设备到本地
iscsiadm -m node -T iqn.2021-02.org.westos:storage -p 172.25.254.125 -l
##进行分区并安装文件系统,挂载使用
fdisk /dev/vdb
udevadm settle
mkfs.xfs /dev/vdb1
mount /dev/vdb1 /mnt
- IQN 的格式为:iqn.
年份
-月份
.com|cn|net|org
.域名
:自定义标识
网络共享设备的删除
##查看网络共享设备
tree /var/lib/iscsi/
##临时移除网络共享设备
iscsiadm -m node -T iqn.2021-02.org.westos:storage -p 172.25.254.136 -u
- 客户端
如果直接-T
移除网络存储设备,实际上是登出了网络共享设备,这种操作是临时的,如果重启服务就会重新刷新回来.
##临时移除网络设备
[root@Node2 /]# iscsiadm -m node -T iqn.2021-02.org.westos:storage -p 172.25.254.136 -u
Logging out of session [sid: 1, target: iqn.2021-02.org.westos:storage, portal: 172.25.254.136,3260]
Logout of [sid: 1, target: iqn.2021-02.org.westos:storage, portal: 172.25.254.136,3260] successful.
##查看硬盘设备,发现网络设备消失
[root@Node2 /]# fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaffa72e7
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1026047 1024000 500M 83 Linux
/dev/vda2 1026048 2050047 1024000 500M 82 Linux swap / Solaris
/dev/vda3 2050048 16777215 14727168 7G 83 Linux
##重启服务,可以发现网络共享设备又回来了
[root@Node2 /]# systemctl restart iscsi
[root@Node2 /]# fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaffa72e7
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1026047 1024000 500M 83 Linux
/dev/vda2 1026048 2050047 1024000 500M 82 Linux swap / Solaris
/dev/vda3 2050048 16777215 14727168 7G 83 Linux
Disk /dev/sda: 5 GiB, 5367660544 bytes, 10483712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x530ee181
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 10483711 10481664 5G 83 Linux
[root@Node2 /]# tree /var/lib/iscsi/
/var/lib/iscsi/
├── ifaces
├── isns
├── nodes
│ └── iqn.2021-02.org.westos:storage
│ └── 172.25.254.136,3260,1
│ └── default
├── send_targets
│ └── 172.25.254.136,3260
│ ├── iqn.2021-02.org.westos:storage,172.25.254.136,3260,1,default -> /var/lib/iscsi/nodes/iqn.2021-02.org.westos:storage/172.25.254.136,3260,1
│ └── st_config
├── slp
└── static
10 directories, 2 files
如果想要彻底移除本地相关信息,需要依次卸载挂载点,删除远程共享设备,最后删除本地的配置文件设置.
[root@Node2 /]# iscsiadm -m node -T iqn.2021-02.org.westos:storage -p 172.25.254.136 -o delete
[root@Node2 /]# systemctl restart iscsi
[root@Node2 /]# fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaffa72e7
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1026047 1024000 500M 83 Linux
/dev/vda2 1026048 2050047 1024000 500M 82 Linux swap / Solaris
/dev/vda3 2050048 16777215 14727168 7G 83 Linux
[root@Node2 /]# tree /var/lib/iscsi/
/var/lib/iscsi/
├── ifaces
├── isns
├── nodes
├── send_targets
│ └── 172.25.254.136,3260
│ └── st_config
├── slp
└── static
7 directories, 1 file
- 服务端
相比客户端,服务端的删除方式步骤较为繁琐,但是逻辑是一样的,依次删除设备文件后删除所有/想要删除的配置.
##删除共享设备/存储
/> iscsi/ delete iqn.2021-02.org.westos:storage
Deleted Target iqn.2021-02.org.westos:storage.
/> ls
o- / ..................................................................... [...]
o- backstores .......................................................... [...]
| o- block .............................................. [Storage Objects: 1]
| | o- westos_storage ............ [/dev/vdb1 (5.0GiB) write-thru deactivated]
| | o- alua ............................................... [ALUA Groups: 1]
| | o- default_tg_pt_gp ................... [ALUA state: Active/optimized]
| o- fileio ............................................. [Storage Objects: 0]
| o- pscsi .............................................. [Storage Objects: 0]
| o- ramdisk ............................................ [Storage Objects: 0]
o- iscsi ........................................................ [Targets: 0]
o- loopback ..................................................... [Targets: 0]
##清理配置文件
/> clearconfig
As a precaution, confirm=True needs to be set
/> clearconfig confirm=True
All configuration cleared
/> ls
o- / ..................................................................... [...]
o- backstores .......................................................... [...]
| o- block .............................................. [Storage Objects: 0]
| o- fileio ............................................. [Storage Objects: 0]
| o- pscsi .............................................. [Storage Objects: 0]
| o- ramdisk ............................................ [Storage Objects: 0]
o- iscsi ........................................................ [Targets: 0]
o- loopback ..................................................... [Targets: 0]
/>
ISCSI具体操作流程
服务端添加
/> /backstores/block create westos_storage /dev/vdb
/dev/vdb /dev/vdb1
/> /backstores/block create westos_storage /dev/vdb1
Created block storage object westos_storage using /dev/vdb1.
/> /iscsi create iqn.2021-02.org.westos:storage
Created target iqn.2021-02.org.westos:storage.
Created TPG 1.
Global pref auto_add_default_portal=true
Created default portal listening on all IPs (0.0.0.0), port 3260.
/> /iscsi/iqn.2021-02.org.westos:storage/tpg1/luns create /backstores/block/westos_storage
Created LUN 0.
/> /iscsi/iqn.2021-02.org.westos:storage/tpg1/acls create iqn.2021-02.org.westos:westoskey
Created Node ACL for iqn.2021-02.org.westos:westoskey
Created mapped LUN 0.
/> ls
o- / ..................................................................... [...]
o- backstores .......................................................... [...]
| o- block .............................................. [Storage Objects: 1]
| | o- westos_storage .............. [/dev/vdb1 (5.0GiB) write-thru activated]
| | o- alua ............................................... [ALUA Groups: 1]
| | o- default_tg_pt_gp ................... [ALUA state: Active/optimized]
| o- fileio ............................................. [Storage Objects: 0]
| o- pscsi .............................................. [Storage Objects: 0]
| o- ramdisk ............................................ [Storage Objects: 0]
o- iscsi ........................................................ [Targets: 1]
| o- iqn.2021-02.org.westos:storage ................................ [TPGs: 1]
| o- tpg1 ........................................... [no-gen-acls, no-auth]
| o- acls ...................................................... [ACLs: 1]
| | o- iqn.2021-02.org.westos:westoskey ................. [Mapped LUNs: 1]
| | o- mapped_lun0 .................... [lun0 block/westos_storage (rw)]
| o- luns ...................................................... [LUNs: 1]
| | o- lun0 ........ [block/westos_storage (/dev/vdb1) (default_tg_pt_gp)]
| o- portals ................................................ [Portals: 1]
| o- 0.0.0.0:3260 ................................................. [OK]
o- loopback ..................................................... [Targets: 0]
/> exit
[root@Node1 ~]# firewall-cmd --permanent --add-port=3260/tcp
success
[root@Node1 ~]# firewall-cmd --reload
success
[root@Node1 ~]# targetcli
targetcli shell version 2.1.51
Copyright 2011-2013 by Datera, Inc and others.
For help on commands, type 'help'.
/> ls
o- / ..................................................................... [...]
o- backstores .......................................................... [...]
| o- block .............................................. [Storage Objects: 1]
| | o- westos_storage .............. [/dev/vdb1 (5.0GiB) write-thru activated]
| | o- alua ............................................... [ALUA Groups: 1]
| | o- default_tg_pt_gp ................... [ALUA state: Active/optimized]
| o- fileio ............................................. [Storage Objects: 0]
| o- pscsi .............................................. [Storage Objects: 0]
| o- ramdisk ............................................ [Storage Objects: 0]
o- iscsi ........................................................ [Targets: 1]
| o- iqn.2021-02.org.westos:storage ................................ [TPGs: 1]
| o- tpg1 ........................................... [no-gen-acls, no-auth]
| o- acls ...................................................... [ACLs: 1]
| | o- iqn.2021-02.org.westos:westoskey ................. [Mapped LUNs: 1]
| | o- mapped_lun0 .................... [lun0 block/westos_storage (rw)]
| o- luns ...................................................... [LUNs: 1]
| | o- lun0 ........ [block/westos_storage (/dev/vdb1) (default_tg_pt_gp)]
| o- portals ................................................ [Portals: 1]
| o- 0.0.0.0:3260 ................................................. [OK]
o- loopback ..................................................... [Targets: 0]
/> exit
Global pref auto_save_on_exit=true
Last 10 configs saved in /etc/target/backup/.
Configuration saved to /etc/target/saveconfig.json
[root@Node1 ~]# systemctl restart target.service
客户端安装与配置
[root@Node2 ~]# dnf install iscsi-initiator-utils.x86_64 -y
Updating Subscription Management repositories.
Unable to read consumer identity
This system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.
Last metadata expiration check: 0:15:15 ago on Fri 26 Feb 2021 03:18:01 PM CST.
Package iscsi-initiator-utils-6.2.0.878-4.gitd791ce0.el8.x86_64 is already installed.
Dependencies resolved.
Nothing to do.
Complete!
[root@Node2 ~]# vim /etc/iscsi/initiatorname.iscsi
[root@Node2 ~]# iscsiadm -m discovery -t st -p 172.25.254.136
172.25.254.136:3260,1 iqn.2021-02.org.westos:storage
[root@Node2 ~]# iscsiadm -m node -T iqn.2021-02.org.westos:storage -p 172.25.254.136 -l
Logging in to [iface: default, target: iqn.2021-02.org.westos:storage, portal: 172.25.254.136,3260]
Login to [iface: default, target: iqn.2021-02.org.westos:storage, portal: 172.25.254.136,3260] successful.
[root@Node2 ~]# fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaffa72e7
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1026047 1024000 500M 83 Linux
/dev/vda2 1026048 2050047 1024000 500M 82 Linux swap / Solaris
/dev/vda3 2050048 16777215 14727168 7G 83 Linux
Disk /dev/sda: 5 GiB, 5367660544 bytes, 10483712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@Node2 ~]# fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaffa72e7
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1026047 1024000 500M 83 Linux
/dev/vda2 1026048 2050047 1024000 500M 82 Linux swap / Solaris
/dev/vda3 2050048 16777215 14727168 7G 83 Linux
Disk /dev/sda: 5 GiB, 5367660544 bytes, 10483712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@Node2 ~]# mount /dev/sda /mnt/
mount: /mnt: wrong fs type, bad option, bad superblock on /dev/sda, missing codepage or helper program, or other error.
[root@Node2 ~]# fdisk
[root@Node2 ~]# fdisk -l
Disk /dev/vda: 8 GiB, 8589934592 bytes, 16777216 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xaffa72e7
Device Boot Start End Sectors Size Id Type
/dev/vda1 * 2048 1026047 1024000 500M 83 Linux
/dev/vda2 1026048 2050047 1024000 500M 82 Linux swap / Solaris
/dev/vda3 2050048 16777215 14727168 7G 83 Linux
Disk /dev/sda: 5 GiB, 5367660544 bytes, 10483712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
[root@Node2 ~]# fdisk /dev/sda
Welcome to fdisk (util-linux 2.32.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Device does not contain a recognized partition table.
Created a new DOS disklabel with disk identifier 0x530ee181.
Command (m for help): n
Partition type
p primary (0 primary, 0 extended, 4 free)
e extended (container for logical partitions)
Select (default p): p
Partition number (1-4, default 1): n
Value out of range.
Partition number (1-4, default 1): 1
First sector (2048-10483711, default 2048):
Last sector, +sectors or +size{K,M,G,T,P} (2048-10483711, default 10483711):
Created a new partition 1 of type 'Linux' and of size 5 GiB.
Command (m for help): p
Disk /dev/sda: 5 GiB, 5367660544 bytes, 10483712 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x530ee181
Device Boot Start End Sectors Size Id Type
/dev/sda1 2048 10483711 10481664 5G 83 Linux
Command (m for help): wq
The partition table has been altered.
Calling ioctl() to re-read partition table.
Syncing disks.
[root@Node2 ~]# mkfs.
mkfs.cramfs mkfs.ext3 mkfs.fat mkfs.msdos mkfs.xfs
mkfs.ext2 mkfs.ext4 mkfs.minix mkfs.vfat
[root@Node2 ~]# mkfs.xfs /dev/sda1
meta-data=/dev/sda1 isize=512 agcount=4, agsize=327552 blks
= sectsz=512 attr=2, projid32bit=1
= crc=1 finobt=1, sparse=1, rmapbt=0
= reflink=1
data = bsize=4096 blocks=1310208, imaxpct=25
= sunit=0 swidth=0 blks
naming =version 2 bsize=4096 ascii-ci=0, ftype=1
log =internal log bsize=4096 blocks=2560, version=2
= sectsz=512 sunit=0 blks, lazy-count=1
realtime =none extsz=4096 blocks=0, rtextents=0
[root@Node2 ~]# mount /dev/sda1 /mnt/
[root@Node2 ~]# df
Filesystem 1K-blocks Used Available Use% Mounted on
devtmpfs 473480 0 473480 0% /dev
tmpfs 501328 0 501328 0% /dev/shm
tmpfs 501328 7136 494192 2% /run
tmpfs 501328 0 501328 0% /sys/fs/cgroup
/dev/vda3 7353344 4431300 2922044 61% /
/dev/vda1 506528 201624 304904 40% /boot
tmpfs 100264 4 100260 1% /run/user/0
/dev/sda1 5230592 69516 5161076 2% /mnt
[root@Node2 ~]# cd /mnt/
[root@Node2 mnt]# ls
[root@Node2 mnt]# touch TestFile
[root@Node2 mnt]# ls
TestFile