\u641e\u5b9a\uff01\u6572\u51fbw\u53c2\u6570\u9000\u51fa\u5206\u533a\u8868\u7f16\u8f91\u5de5\u5177\uff1a<\/p>\n
Command (m for help): w\r\nThe partition table has been altered.\r\nCalling ioctl() to re-read partition table.\r\nSyncing disks.\r\n<\/pre>\n\u4e0b\u9762\u6765\u770b\u4e00\u4e0b\u4e24\u4e2a\u4e0e\u4ea4\u6362\u5206\u533a\u76f8\u5173\u7684\u7b80\u5355\u547d\u4ee4\u3002<\/p>\n
mkswap\u547d\u4ee4\u7528\u4e8e\u5bf9\u65b0\u8bbe\u5907\u8fdb\u884c\u4ea4\u6362\u5206\u533a\u683c\u5f0f\u5316\uff0c\u82f1\u6587\u5168\u79f0\u4e3a\u201cmake swap\u201d\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201cmkswap\u8bbe\u5907\u540d\u79f0\u201d\u3002<\/p>\n
[root@linuxprobe ~]# mkswap \/dev\/sdb2\r\nSetting up swapspace version 1, size = 5 GiB (5368705024 bytes)\r\nno label, UUID=45a4047c-49bf-4c88-9b99-f6ac93908485\r\n<\/pre>\nswapon\u547d\u4ee4\u7528\u4e8e\u6fc0\u6d3b\u65b0\u7684\u4ea4\u6362\u5206\u533a\u8bbe\u5907\uff0c\u82f1\u6587\u5168\u79f0\u4e3a\u201cswap on\u201d\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201cswapon\u8bbe\u5907\u540d\u79f0\u201d\u3002<\/p>\n
\u4f7f\u7528swapon\u547d\u4ee4\u628a\u51c6\u5907\u597d\u7684SWAP\u786c\u76d8\u8bbe\u5907\u6b63\u5f0f\u6302\u8f7d\u5230\u7cfb\u7edf\u4e2d\u3002\u53ef\u4ee5\u4f7f\u7528free -m\u547d\u4ee4\u67e5\u770b\u4ea4\u6362\u5206\u533a\u7684\u5927\u5c0f\u53d8\u5316\uff08\u75312047MB\u589e\u52a0\u52307167MB\uff09\uff1a<\/p>\n
[root@linuxprobe ~]# free -m\r\n total used free shared buff\/cache available\r\nMem: 1966 1391 105 12 469 384\r\nSwap: 2047 9 2038<\/strong>\r\n[root@linuxprobe ~]# swapon \/dev\/sdb2\r\n[root@linuxprobe ~]# free -m\r\n total used free shared buff\/cache available\r\nMem: 1966 1395 101 12 469 380\r\nSwap: 7167 9 7158<\/strong>\r\n<\/pre>\n\u4e3a\u4e86\u80fd\u591f\u8ba9\u65b0\u7684\u4ea4\u6362\u5206\u533a\u8bbe\u5907\u5728\u91cd\u542f\u540e\u4f9d\u7136\u751f\u6548\uff0c\u9700\u8981\u6309\u7167\u4e0b\u9762\u7684\u683c\u5f0f\u5c06\u76f8\u5173\u4fe1\u606f\u5199\u5165\u914d\u7f6e\u6587\u4ef6\u4e2d\uff0c\u5e76\u8bb0\u5f97\u4fdd\u5b58\uff1a<\/p>\n
[root@linuxprobe ~]# vim \/etc\/fstab\r\n#\r\n# \/etc\/fstab\r\n# Created by anaconda on Tue Jul 21 05:03:40 2020\r\n#\r\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk\/'.\r\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info.\r\n#\r\n# After editing this file, run 'systemctl daemon-reload' to update systemd\r\n# units generated from this file.\r\n#\r\n\/dev\/mapper\/rhel-root \/ xfs defaults 1 1\r\nUUID=812b1f7c-8b5b-43da-8c06-b9999e0fe48b \/boot xfs defaults 1 2\r\n\/dev\/mapper\/rhel-swap swap swap defaults 0 0\r\n\/dev\/cdrom \/media\/cdrom iso9660 defaults 0 0 \r\n\/dev\/sdb1 \/newFS xfs defaults 0 0 \r\n\/dev\/sdb2 swap swap defaults 0 0<\/strong> \r\n<\/pre>\n6.7 \u78c1\u76d8\u5bb9\u91cf\u914d\u989d<\/strong><\/span><\/h5>\n\u672c\u4e66\u5728\u524d\u9762\u66fe\u7ecf\u8bb2\u5230\uff0cLinux\u7cfb\u7edf\u7684\u8bbe\u8ba1\u521d\u8877\u5c31\u662f\u8ba9\u8bb8\u591a\u4eba\u4e00\u8d77\u4f7f\u7528\u5e76\u6267\u884c\u5404\u81ea\u7684\u4efb\u52a1\uff0c\u4ece\u800c\u6210\u4e3a\u591a\u7528\u6237\u3001\u591a\u4efb\u52a1\u7684\u64cd\u4f5c\u7cfb\u7edf\u3002\u4f46\u662f\uff0c\u786c\u4ef6\u8d44\u6e90\u662f\u56fa\u5b9a\u4e14\u6709\u9650\u7684\uff0c\u5982\u679c\u67d0\u4e9b\u7528\u6237\u4e0d\u65ad\u5730\u5728Linux\u7cfb\u7edf\u4e0a\u521b\u5efa\u6587\u4ef6\u6216\u8005\u5b58\u653e\u7535\u5f71\uff0c\u786c\u76d8\u7a7a\u95f4\u603b\u6709\u4e00\u5929\u4f1a\u88ab\u5360\u6ee1\u3002\u9488\u5bf9\u8fd9\u79cd\u60c5\u51b5\uff0croot\u7ba1\u7406\u5458\u5c31\u9700\u8981\u4f7f\u7528\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u670d\u52a1\u6765\u9650\u5236\u67d0\u4f4d\u7528\u6237\u6216\u67d0\u4e2a\u7528\u6237\u7ec4\u9488\u5bf9\u7279\u5b9a\u6587\u4ef6\u5939\u53ef\u4ee5\u4f7f\u7528\u7684\u6700\u5927\u786c\u76d8\u7a7a\u95f4\u6216\u6700\u5927\u6587\u4ef6\u4e2a\u6570\uff0c\u4e00\u65e6\u8fbe\u5230\u8fd9\u4e2a\u6700\u5927\u503c\u5c31\u4e0d\u518d\u5141\u8bb8\u7ee7\u7eed\u4f7f\u7528\u3002\u53ef\u4ee5\u4f7f\u7528quota\u6280\u672f\u8fdb\u884c\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u7ba1\u7406\uff0c\u4ece\u800c\u9650\u5236\u7528\u6237\u7684\u786c\u76d8\u53ef\u7528\u5bb9\u91cf\u6216\u6240\u80fd\u521b\u5efa\u7684\u6700\u5927\u6587\u4ef6\u4e2a\u6570\u3002quota\u6280\u672f\u8fd8\u6709\u8f6f\u9650\u5236\u548c\u786c\u9650\u5236\u7684\u529f\u80fd\u3002<\/p>\n
\u8f6f\u9650\u5236<\/strong>\uff1a\u5f53\u8fbe\u5230\u8f6f\u9650\u5236\u65f6\u4f1a\u63d0\u793a\u7528\u6237\uff0c\u4f46\u4ecd\u5141\u8bb8\u7528\u6237\u5728\u9650\u5b9a\u7684\u989d\u5ea6\u5185\u7ee7\u7eed\u4f7f\u7528\u3002<\/p>\n\u786c\u9650\u5236<\/strong>\uff1a\u5f53\u8fbe\u5230\u786c\u9650\u5236\u65f6\u4f1a\u63d0\u793a\u7528\u6237\uff0c\u4e14\u5f3a\u5236\u7ec8\u6b62\u7528\u6237\u7684\u64cd\u4f5c\u3002<\/p><\/blockquote>\nRHEL 8\u7cfb\u7edf\u4e2d\u5df2\u7ecf\u5b89\u88c5\u4e86quota\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u670d\u52a1\u7a0b\u5e8f\u5305\uff0c\u4f46\u5b58\u50a8\u8bbe\u5907\u5374\u9ed8\u8ba4\u6ca1\u6709\u5f00\u542f\u5bf9quota\u6280\u672f\u7684\u652f\u6301\uff0c\u6b64\u65f6\u9700\u8981\u624b\u52a8\u7f16\u8f91\u914d\u7f6e\u6587\u4ef6\u5e76\u91cd\u542f\u4e00\u6b21\u7cfb\u7edf\uff0c\u8ba9\u7cfb\u7edf\u4e2d\u7684\u542f\u52a8\u76ee\u5f55\uff08\/boot\uff09\u80fd\u591f\u652f\u6301quota\u78c1\u76d8\u914d\u989d\u6280\u672f\u3002<\/p>\n
[root@linuxprobe ~]# vim \/etc\/fstab\r\n#\r\n# \/etc\/fstab\r\n# Created by anaconda on Tue Jul 21 05:03:40 2020\r\n#\r\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk\/'.\r\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info.\r\n#\r\n# After editing this file, run 'systemctl daemon-reload' to update systemd\r\n# units generated from this file.\r\n#\r\n\/dev\/mapper\/rhel-root \/ xfs defaults 1 1\r\nUUID=812b1f7c-8b5b-43da-8c06-b9999e0fe48b \/boot xfs defaults,uquota<\/strong> 1 2\r\n\/dev\/mapper\/rhel-swap swap swap defaults 0 0\r\n\/dev\/cdrom \/media\/cdrom iso9660 defaults 0 0 \r\n\/dev\/sdb1 \/newFS xfs defaults 0 0 \r\n\/dev\/sdb2 swap swap defaults 0 0 \r\n[root@linuxprobe ~]# reboot<\/pre>\n\u53e6\u5916\uff0c\u5bf9\u4e8e\u5b66\u4e60\u8fc7\u65e9\u671f\u7684Linux\u7cfb\u7edf\uff0c\u6216\u8005\u5177\u6709RHEL 5\/6\u7cfb\u7edf\u4f7f\u7528\u7ecf\u9a8c\u7684\u8bfb\u8005\u6765\u8bf4\uff0c\u8fd9\u91cc\u9700\u8981\u7279\u522b\u6ce8\u610f\u3002\u65e9\u671f\u7684Linux\u7cfb\u7edf\u8981\u60f3\u8ba9\u786c\u76d8\u8bbe\u5907\u652f\u6301quota\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u670d\u52a1\uff0c\u4f7f\u7528\u7684\u662fusrquota\u53c2\u6570\uff0c\u800cRHEL 7\/8\u7cfb\u7edf\u4f7f\u7528\u7684\u5219\u662fuquota\u53c2\u6570\u3002\u5728\u91cd\u542f\u7cfb\u7edf\u540e\u4f7f\u7528mount\u547d\u4ee4\u67e5\u770b\uff0c\u5373\u53ef\u53d1\u73b0\/boot\u76ee\u5f55\u5df2\u7ecf\u652f\u6301quota\u78c1\u76d8\u914d\u989d\u6280\u672f\u4e86\uff1a<\/p>\n
[root@linuxprobe ~]# mount | grep boot\r\n\/dev\/sda1 on \/boot type xfs (rw,relatime,seclabel,attr2,inode64,usrquota<\/strong>)<\/pre>\n\u63a5\u4e0b\u6765\u521b\u5efa\u4e00\u4e2a\u7528\u4e8e\u68c0\u67e5quota\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u6548\u679c\u7684\u7528\u6237tom\uff0c\u5e76\u9488\u5bf9\/boot\u76ee\u5f55\u589e\u52a0\u5176\u4ed6\u4eba\u7684\u5199\u6743\u9650\uff0c\u4fdd\u8bc1\u7528\u6237\u80fd\u591f\u6b63\u5e38\u5199\u5165\u6570\u636e\uff1a<\/p>\n
[root@linuxprobe ~]# useradd tom\r\n[root@linuxprobe ~]# chmod -R o+w \/boot<\/span><\/pre>\nxfs_quota\u547d\u4ee4\u7528\u4e8e\u7ba1\u7406\u8bbe\u5907\u7684\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201cxfs_quota [\u53c2\u6570]\u00a0\u914d\u989d \u6587\u4ef6\u7cfb\u7edf\u201d\u3002<\/p>\n
\u8fd9\u662f\u4e00\u4e2a\u4e13\u95e8\u9488\u5bf9XFS\u6587\u4ef6\u7cfb\u7edf\u6765\u7ba1\u7406quota\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u670d\u52a1\u800c\u8bbe\u8ba1\u7684\u547d\u4ee4\u3002\u5176\u4e2d\uff0c-c\u53c2\u6570\u7528\u4e8e\u4ee5\u53c2\u6570\u7684\u5f62\u5f0f\u8bbe\u7f6e\u8981\u6267\u884c\u7684\u547d\u4ee4\uff1b-x\u53c2\u6570\u662f\u4e13\u5bb6\u6a21\u5f0f\uff0c\u8ba9\u8fd0\u7ef4\u4eba\u5458\u80fd\u591f\u5bf9quota\u670d\u52a1\u8fdb\u884c\u66f4\u591a\u590d\u6742\u7684\u914d\u7f6e\u3002\u63a5\u4e0b\u6765\u4f7f\u7528xfs_quota\u547d\u4ee4\u6765\u8bbe\u7f6e\u7528\u6237tom\u5bf9\/boot\u76ee\u5f55\u7684quota\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u3002\u5177\u4f53\u7684\u9650\u989d\u63a7\u5236\u5305\u62ec\uff1a\u786c\u76d8\u4f7f\u7528\u91cf\u7684\u8f6f\u9650\u5236\u548c\u786c\u9650\u5236\u5206\u522b\u4e3a3MB\u548c6MB\uff1b\u521b\u5efa\u6587\u4ef6\u6570\u91cf\u7684\u8f6f\u9650\u5236\u548c\u786c\u9650\u5236\u5206\u522b\u4e3a3\u4e2a\u548c6\u4e2a\u3002<\/p>\n
[root@linuxprobe ~]# xfs_quota -x -c 'limit bsoft=3m bhard=6m isoft=3 ihard=6 tom' \/boot\r\n[root@linuxprobe ~]# xfs_quota -x -c report \/boot\r\nUser quota on \/boot (\/dev\/sda1)\r\n Blocks \r\nUser ID Used Soft Hard Warn\/Grace \r\n---------- -------------------------------------------------- \r\nroot 114964 0 0 00 [--------]\r\ntom 0 3072 6144 00 [--------]<\/pre>\n\u4e0a\u9762\u6240\u4f7f\u7528\u7684\u53c2\u6570\u5206\u4e3a\u4e24\u7ec4\uff0c\u5206\u522b\u662fisoft\/ihard\u4e0ebsoft\/bhard\uff0c\u4e0b\u9762\u6df1\u5165\u8bb2\u89e3\u4e00\u4e0b\u3002\u57286.3\u8282\u4e2d\u66fe\u7ecf\u8bb2\u8fc7\uff0c\u5728Linux\u7cfb\u7edf\u4e2d\u6bcf\u4e2a\u6587\u4ef6\u90fd\u4f1a\u4f7f\u7528\u4e00\u4e2a\u72ec\u7acb\u7684inode\u4fe1\u606f\u5757\u6765\u4fdd\u5b58\u5c5e\u6027\u4fe1\u606f\uff0c\u4e00\u4e2a\u6587\u4ef6\u5bf9\u5e94\u4e00\u4e2ainode\u4fe1\u606f\u5757\uff0c\u6240\u4ee5isoft\u548cihard\u5c31\u662f\u901a\u8fc7\u9650\u5236\u7cfb\u7edf\u6700\u5927\u4f7f\u7528\u7684inode\u4e2a\u6570\u6765\u9650\u5236\u4e86\u6587\u4ef6\u6570\u91cf\u3002bsoft\u548cbhard\u5219\u662f\u4ee3\u8868\u6587\u4ef6\u6240\u5360\u7528\u7684block\u5927\u5c0f\uff0c\u4e5f\u5c31\u662f\u6587\u4ef6\u5360\u7528\u7684\u6700\u5927\u5bb9\u91cf\u7684\u603b\u7edf\u8ba1\u3002<\/p>\n
soft\u662f\u8f6f\u9650\u5236\uff0c\u8d85\u8fc7\u8be5\u9650\u5236\u540e\u4e5f\u53ea\u662f\u5c06\u64cd\u4f5c\u8bb0\u5f55\u5199\u5230\u65e5\u5fd7\u4e2d\uff0c\u4e0d\u5bf9\u7528\u6237\u884c\u4e3a\u8fdb\u884c\u9650\u5236\u3002\u800chard\u662f\u786c\u9650\u5236\uff0c\u4e00\u65e6\u8d85\u8fc7\u7cfb\u7edf\u5c31\u4f1a\u9a6c\u4e0a\u7981\u6b62\uff0c\u7528\u6237\u518d\u4e5f\u4e0d\u80fd\u521b\u5efa\u6216\u65b0\u5360\u4efb\u4f55\u7684\u786c\u76d8\u5bb9\u91cf\u3002<\/p>\n
\u5f53\u914d\u7f6e\u597d\u4e0a\u8ff0\u5404\u79cd\u8f6f\u786c\u9650\u5236\u540e\uff0c\u5c1d\u8bd5\u5207\u6362\u5230\u4e00\u4e2a\u666e\u901a\u7528\u6237\uff0c\u7136\u540e\u5206\u522b\u5c1d\u8bd5\u521b\u5efa\u4e00\u4e2a\u4f53\u79ef\u4e3a5MB\u548c8MB\u7684\u6587\u4ef6\u3002\u53ef\u4ee5\u53d1\u73b0\uff0c\u5728\u521b\u5efa8MB\u7684\u6587\u4ef6\u65f6\u53d7\u5230\u4e86\u7cfb\u7edf\u9650\u5236\uff1a<\/p>\n
[root@linuxprobe ~]# su - tom\r\n[tom@linuxprobe ~]$ cd \/boot\r\n[tom@linuxprobe boot]$ dd if=\/dev\/zero of=\/boot\/tom bs=5M count=1\r\n1+0 records in\r\n1+0 records out\r\n5242880 bytes (5.2 MB, 5.0 MiB) copied, 0.00298178 s, 1.8 GB\/s\r\n[tom@linuxprobe boot]$ dd if=\/dev\/zero of=\/boot\/tom bs=8M count=1\r\ndd: error writing '\/boot\/tom': Disk quota exceeded<\/span>\r\n1+0 records in\r\n0+0 records out\r\n4194304 bytes (4.2 MB, 4.0 MiB) copied, 0.00398607 s, 1.1 GB\/s<\/pre>\nedquota\u547d\u4ee4\u7528\u4e8e\u7ba1\u7406\u7cfb\u7edf\u7684\u78c1\u76d8\u914d\u989d\uff0c\u82f1\u6587\u5168\u79f0\u4e3a\u201cedit quota\u201d\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201cedquota [\u53c2\u6570]\u00a0\u7528\u6237\u540d\u201d\u3002<\/p>\n
\u5728\u4e3a\u7528\u6237\u8bbe\u7f6e\u4e86quota\u78c1\u76d8\u5bb9\u91cf\u914d\u989d\u9650\u5236\u540e\uff0c\u53ef\u4ee5\u4f7f\u7528edquota\u547d\u4ee4\u6309\u9700\u4fee\u6539\u9650\u989d\u7684\u6570\u503c\u3002\u5176\u4e2d\uff0c-u\u53c2\u6570\u8868\u793a\u8981\u9488\u5bf9\u54ea\u4e2a\u7528\u6237\u8fdb\u884c\u8bbe\u7f6e\uff1b-g\u53c2\u6570\u8868\u793a\u8981\u9488\u5bf9\u54ea\u4e2a\u7528\u6237\u7ec4\u8fdb\u884c\u8bbe\u7f6e\uff0c\u5982\u88686-6\u6240\u793a\u3002<\/p>\n
\u88686-6\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0edquota\u547d\u4ee4\u4e2d\u53ef\u7528\u7684\u53c2\u6570\u4ee5\u53ca\u4f5c\u7528<\/p>\n
\n\n\n\u53c2\u6570<\/td>\n | \u4f5c\u7528<\/td>\n<\/tr>\n |
\n-u<\/td>\n | \u5bf9\u67d0\u4e2a\u7528\u6237\u8fdb\u884c\u8bbe\u7f6e<\/td>\n<\/tr>\n |
\n-g<\/td>\n | \u5bf9\u67d0\u4e2a\u7528\u6237\u7ec4\u8fdb\u884c\u8bbe\u7f6e<\/td>\n<\/tr>\n |
\n-p<\/td>\n | \u590d\u5236\u539f\u6709\u7684\u89c4\u5219\u5230\u65b0\u7684\u7528\u6237\/\u7ec4<\/td>\n<\/tr>\n |
\n-t<\/td>\n | \u9650\u5236\u5bbd\u9650\u671f\u9650<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n edquota\u547d\u4ee4\u4f1a\u8c03\u7528Vi\u6216Vim\u7f16\u8f91\u5668\u6765\u8ba9root\u7ba1\u7406\u5458\u4fee\u6539\u8981\u9650\u5236\u7684\u5177\u4f53\u7ec6\u8282\uff0c\u8bb0\u5f97\u7528wq\u4fdd\u5b58\u9000\u51fa\u3002\u4e0b\u9762\u628a\u7528\u6237tom\u7684\u786c\u76d8\u4f7f\u7528\u91cf\u7684\u786c\u9650\u989d\u4ece5MB\u63d0\u5347\u52308MB\uff1a<\/p>\n [tom@linuxprobe ~]$ exit\r\n[root@linuxprobe ~]# edquota -u tom\r\nDisk quotas for user tom (uid 1001):\r\n Filesystem blocks soft hard inodes soft hard\r\n \/dev\/sda1 4096 3072 8192 <\/strong> 1 3 6\r\n[root@linuxprobe ~]# su - tom\r\n[tom@linuxprobe ~]$ cd \/boot\r\n[tom@linuxprobe boot]$ dd if=\/dev\/zero of=\/boot\/tom bs=8M count=1\r\n1+0 records in\r\n1+0 records out\r\n8388608 bytes (8.4 MB, 8.0 MiB) copied, 0.0185476 s, 452 MB\/s<\/pre>\n6.8 VDO\u865a\u62df\u6570\u636e\u4f18\u5316<\/strong><\/span><\/h5>\nVDO\uff08Virtual Data Optimize\uff0c\u865a\u62df\u6570\u636e\u4f18\u5316\uff09\u662f\u4e00\u79cd\u901a\u8fc7\u538b\u7f29\u6216\u5220\u9664\u5b58\u50a8\u8bbe\u5907\u4e0a\u7684\u6570\u636e\u6765\u4f18\u5316\u5b58\u50a8\u7a7a\u95f4\u7684\u6280\u672f\u3002VDO\u662f\u7ea2\u5e3d\u516c\u53f8\u6536\u8d2d\u4e86Permabit\u516c\u53f8\u540e\u83b7\u53d6\u7684\u65b0\u6280\u672f\uff0c\u5e76\u4e0e2019-2020\u5e74\u524d\u540e\uff0c\u591a\u6b21\u5728RHEL 7.5\/7.6\/7.7\u4e0a\u8fdb\u884c\u6d4b\u8bd5\uff0c\u6700\u7ec8\u968fRHEL 8\u7cfb\u7edf\u6b63\u5f0f\u516c\u5e03\u3002VDO\u6280\u672f\u7684\u5173\u952e\u5c31\u662f\u5bf9\u786c\u76d8\u5185\u539f\u6709\u7684\u6570\u636e\u8fdb\u884c\u5220\u91cd\u64cd\u4f5c\uff0c\u5b83\u6709\u70b9\u7c7b\u4f3c\u4e8e\u6211\u4eec\u5e73\u65f6\u4f7f\u7528\u7684\u7f51\u76d8\u670d\u52a1\uff0c\u5728\u7b2c\u4e00\u6b21\u6b63\u5e38\u4e0a\u4f20\u6587\u4ef6\u65f6\u901f\u5ea6\u7279\u522b\u6162\uff0c\u5728\u7b2c\u4e8c\u6b21\u4e0a\u4f20\u76f8\u540c\u7684\u6587\u4ef6\u65f6\u4ec5\u4f5c\u4e3a\u4e00\u4e2a\u6570\u636e\u6307\u9488\uff0c\u51e0\u4e4e\u53ef\u4ee5\u8fbe\u5230\u201c\u79d2\u4f20\u201d\u7684\u6548\u679c\uff0c\u65e0\u987b\u518d\u591a\u5360\u7528\u4e00\u4efd\u7a7a\u95f4\uff0c\u4e5f\u4e0d\u7528\u518d\u6f2b\u957f\u7b49\u5f85\u3002\u9664\u4e86\u5220\u91cd\u64cd\u4f5c\uff0cVDO\u6280\u672f\u8fd8\u53ef\u4ee5\u5bf9\u65e5\u5fd7\u548c\u6570\u636e\u5e93\u8fdb\u884c\u81ea\u52a8\u538b\u7f29\uff0c\u8fdb\u4e00\u6b65\u51cf\u5c11\u5b58\u50a8\u6d6a\u8d39\u7684\u60c5\u51b5\u3002VDO\u9488\u5bf9\u5404\u79cd\u7c7b\u578b\u6587\u4ef6\u7684\u538b\u7f29\u6548\u679c\u5982\u88686-7\u6240\u793a\u3002<\/p>\n \u88686-7\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u5bf9\u5404\u79cd\u7c7b\u578b\u6587\u4ef6\u538b\u7f29\u6548\u679c\u6c47\u603b\u8868<\/p>\n \n\n\n\u6587\u4ef6\u540d<\/td>\n | \u63cf\u8ff0<\/td>\n | \u7c7b\u578b<\/td>\n | \u539f\u59cb\u5927\u5c0f\uff08KB\uff09<\/td>\n | \u5b9e\u9645\u5360\u7528\u7a7a\u95f4\uff08KB\uff09<\/td>\n<\/tr>\n | \ndickens<\/td>\n | \u72c4\u66f4\u65af\u6587\u96c6<\/td>\n | \u82f1\u6587\u539f\u6587<\/td>\n | 9953<\/td>\n | 9948<\/td>\n<\/tr>\n | \nmozilla<\/td>\n | Mozilla\u76841.0\u53ef\u6267\u884c\u6587\u4ef6<\/td>\n | \u6267\u884c\u7a0b\u5e8f<\/td>\n | 50020<\/td>\n | 33228<\/td>\n<\/tr>\n | \nmr<\/td>\n | \u533b\u7528resonanse\u56fe\u50cf\t<\/td>\n | \u56fe\u7247<\/td>\n | 9736<\/td>\n | 9272<\/td>\n<\/tr>\n | \nnci<\/td>\n | \u7ed3\u6784\u5316\u7684\u5316\u5b66\u6570\u636e\u5e93<\/td>\n | \u6570\u636e\u5e93<\/td>\n | 32767<\/td>\n | 10168<\/td>\n<\/tr>\n | \nooffice<\/td>\n | Open Office.org 1.01 DLL<\/td>\n | \u53ef\u6267\u884c\u7a0b\u5e8f<\/td>\n | 6008<\/td>\n | 5640<\/td>\n<\/tr>\n | \nosdb<\/td>\n | \u57fa\u51c6\u6d4b\u8bd5\u7528\u7684MySQL\u683c\u5f0f\u793a\u4f8b\u6570\u636e\u5e93\t<\/td>\n | \u6570\u636e\u5e93<\/td>\n | 9849<\/td>\n | 9824<\/td>\n<\/tr>\n | \nreymont<\/td>\n | \u74e6\u8fea\u65af\u74e6\u592b\u00b7\u96f7\u8499\u7279\u7684\u4e66<\/td>\n | PDF<\/td>\n | 6471<\/td>\n | 6312<\/td>\n<\/tr>\n | \nsamba<\/td>\n | samba\u6e90\u4ee3\u7801<\/td>\n | src\u6e90\u7801<\/td>\n | 21100<\/td>\n | 11768<\/td>\n<\/tr>\n | \nsao<\/td>\n | \u661f\u7a7a\u6570\u636e<\/td>\n | \u5929\u6587\u683c\u5f0f\u7684bin\u6587\u4ef6<\/td>\n | 7081<\/td>\n | 7036<\/td>\n<\/tr>\n | \nwebster<\/td>\n | \u8f9e\u6d77<\/td>\n | HTML<\/td>\n | 40487<\/td>\n | 40144<\/td>\n<\/tr>\n | \nxml<\/td>\n | XML\u6587\u4ef6<\/td>\n | HTML<\/td>\n | 5220<\/td>\n | 2180<\/td>\n<\/tr>\n | \nx-ray<\/td>\n | \u900f\u89c6\u533b\u5b66\u56fe\u7247<\/td>\n | \u533b\u9662\u6570\u636e<\/td>\n | 8275<\/td>\n | 8260<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n <\/p>\n VDO\u6280\u672f\u652f\u6301\u672c\u5730\u5b58\u50a8\u548c\u8fdc\u7a0b\u5b58\u50a8\uff0c\u53ef\u4ee5\u4f5c\u4e3a\u672c\u5730\u6587\u4ef6\u7cfb\u7edf\u3001iSCSI\u6216Ceph\u5b58\u50a8\u4e0b\u7684\u9644\u52a0\u5b58\u50a8\u5c42\u4f7f\u7528\u3002\u7ea2\u5e3d\u516c\u53f8\u5728VDO\u4ecb\u7ecd\u9875\u9762\u4e2d\u63d0\u5230\uff0c\u5728\u90e8\u7f72\u865a\u62df\u673a\u6216\u5bb9\u5668\u65f6\uff0c\u5efa\u8bae\u91c7\u7528\u903b\u8f91\u5b58\u50a8\u4e0e\u7269\u7406\u5b58\u50a8\u4e3a10\u22361\u7684\u6bd4\u4f8b\u8fdb\u884c\u914d\u7f6e\uff0c\u53731TB\u7269\u7406\u5b58\u50a8\u5bf9\u5e9410TB\u903b\u8f91\u5b58\u50a8\uff1b\u800c\u90e8\u7f72\u5bf9\u8c61\u5b58\u50a8\u65f6\u00a0\uff08\u4f8b\u5982\u4f7f\u7528Ceph\uff09\u5219\u91c7\u7528\u903b\u8f91\u5b58\u50a8\u4e0e\u7269\u7406\u5b58\u50a8\u4e3a3\u22361\u7684\u6bd4\u4f8b\u8fdb\u884c\u914d\u7f6e\uff0c\u5373\u4f7f\u75281TB\u7269\u7406\u5b58\u50a8\u5bf9\u5e943TB\u903b\u8f91\u5b58\u50a8\u3002<\/p>\n \u7b80\u800c\u8a00\u4e4b\uff0cVDO\u6280\u672f\u80fd\u7701\u7a7a\u95f4\uff01<\/p>\n \u6709\u4e24\u79cd\u7279\u6b8a\u60c5\u51b5\u9700\u8981\u63d0\u524d\u8bb2\u4e00\u4e0b\u3002\u5176\u4e00\uff0c\u516c\u53f8\u670d\u52a1\u5668\u4e0a\u5df2\u6709\u7684dm-crypt\u4e4b\u7c7b\u7684\u6280\u672f\u662f\u53ef\u4ee5\u4e0eVDO\u6280\u672f\u517c\u5bb9\u7684\uff0c\u4f46\u8bb0\u5f97\u8981\u5148\u5bf9\u5377\u8fdb\u884c\u52a0\u5bc6\u518d\u4f7f\u7528VDO\u3002\u56e0\u4e3a\u52a0\u5bc6\u4f1a\u4f7f\u91cd\u590d\u7684\u6570\u636e\u53d8\u5f97\u6709\u6240\u4e0d\u540c\uff0c\u56e0\u6b64\u5220\u91cd\u64cd\u4f5c\u65e0\u6cd5\u5b9e\u73b0\u3002\u8981\u59cb\u7ec8\u8bb0\u5f97\u628a\u52a0\u5bc6\u5c42\u653e\u5230VDO\u4e4b\u4e0b\uff0c\u5982\u56fe6-14\u6240\u793a\u3002<\/p>\n <\/p>\n \u56fe6-14 VDO\u6280\u672f\u62d3\u6251\u56fe<\/p>\n \u5176\u4e8c\uff0cVDO\u6280\u672f\u4e0d\u53ef\u53e0\u52a0\u4f7f\u7528\uff0c1TB\u7684\u7269\u7406\u5b58\u50a8\u63d0\u5347\u621010TB\u7684\u903b\u8f91\u5b58\u50a8\u6ca1\u95ee\u9898\uff0c\u4f46\u662f\u518d\u752810TB\u7ffb\u6210100TB\u5c31\u4e0d\u884c\u4e86\u3002\u5de6\u811a\u8e29\u53f3\u811a\uff0c\u771f\u7684\u6ca1\u6cd5\u98de\u8d77\u6765\u3002<\/p>\n \u901a\u8fc76.5\u8282\u7684\u5b66\u4e60\uff0c\u76f8\u4fe1\u540c\u5b66\u4eec\u5df2\u7ecf\u628a\u5bf9\u786c\u76d8\u8fdb\u884c\u5206\u533a\u3001\u683c\u5f0f\u5316\u3001\u6302\u8f7d\u64cd\u4f5c\u7684\u65b9\u6cd5\u62ff\u634f\u5f97\u6b7b\u6b7b\u7684\u4e86\u3002\u6211\u4eec\u628a\u865a\u62df\u673a\u5173\u95ed\uff0c\u6dfb\u52a0\u4e00\u5757\u5bb9\u91cf\u4e3a20GB\u7684\u65b0SATA\u786c\u76d8\u8fdb\u6765\uff0c\u5f00\u673a\u540e\u5c31\u80fd\u770b\u5230\u8fd9\u5757\u540d\u79f0\u4e3a\/dev\/sdc\u7684\u65b0\u786c\u76d8\u4e86\uff1a<\/p>\n [root@linuxprobe ~]# ls -l \/dev\/sdc\r\nbrw-rw----. 1 root disk 8, 32 Jan 6 22:26 \/dev\/sdc<\/pre>\nRHEL\/CentOS 8\u7cfb\u7edf\u4e2d\u9ed8\u8ba4\u5df2\u7ecf\u542f\u7528\u4e86VDO\u6280\u672f\u3002VDO\u6280\u672f\u73b0\u5728\u662f\u7ea2\u5e3d\u516c\u53f8\u81ea\u5df1\u7684\u6280\u672f\uff0c\u517c\u5bb9\u6027\u81ea\u7136\u6ca1\u5f97\u8bf4\u3002\u5982\u679c\u60a8\u6240\u7528\u7684\u7cfb\u7edf\u6ca1\u6709\u5b89\u88c5VDO\u7684\u8bdd\u4e5f\u4e0d\u8981\u7740\u6025\uff0c\u7528dnf\u547d\u4ee4\u5373\u53ef\u5b8c\u6210\u5b89\u88c5\uff1a<\/p>\n [root@linuxprobe ~]# dnf install kmod-kvdo vdo\r\nUpdating Subscription Management repositories.\r\nUnable to read consumer identity\r\nThis system is not registered to Red Hat Subscription Management. You can use subscription-manager to register.\r\nLast metadata expiration check: 0:01:56 ago on Wed 06 Jan 2021 10:37:19 PM CST.\r\nPackage kmod-kvdo-6.2.0.293-50.el8.x86_64 is already installed.\r\nPackage vdo-6.2.0.293-10.el8.x86_64 is already installed.\r\nDependencies resolved.\r\nNothing to do.\r\nComplete!<\/pre>\n\u9996\u5148\uff0c\u521b\u5efa\u4e00\u4e2a\u5168\u65b0\u7684VDO\u5377\u3002<\/p>\n \u65b0\u6dfb\u52a0\u8fdb\u6765\u7684\u7269\u7406\u8bbe\u5907\u5c31\u662f\u4f7f\u7528vdo\u547d\u4ee4\u6765\u7ba1\u7406\u7684\uff0c\u5176\u4e2dname\u53c2\u6570\u4ee3\u8868\u65b0\u7684\u8bbe\u5907\u5377\u7684\u540d\u79f0\uff1bdevice\u53c2\u6570\u4ee3\u8868\u7531\u54ea\u5757\u78c1\u76d8\u8fdb\u884c\u5236\u4f5c\uff1bvdoLogicalSize\u53c2\u6570\u4ee3\u8868\u5236\u4f5c\u540e\u7684\u8bbe\u5907\u5927\u5c0f\u3002\u4f9d\u636e\u7ea2\u5e3d\u516c\u53f8\u63a8\u8350\u7684\u539f\u5219\uff0c20GB\u786c\u76d8\u5c06\u7ffb\u6210200GB\u7684\u903b\u8f91\u5b58\u50a8\uff1a<\/p>\n [root@linuxprobe ~]# vdo create --name=storage --device=\/dev\/sdc --vdoLogicalSize=200G\r\nCreating VDO storage\r\nStarting VDO storage\r\nStarting compression on VDO storage\r\nVDO instance 0 volume is ready at \/dev\/mapper\/storage<\/pre>\n\n \n Tips<\/strong><\/h3>\n<\/div>\n\n Linux\u547d\u4ee4\u884c\u4e25\u683c\u533a\u522b\u5927\u5c0f\u5199\uff0cvdoLogicalSize\u53c2\u6570\u4e2d\u7684L\u4e0eS\u5b57\u6bcd\u5fc5\u987b\u5927\u5199\u3002<\/p>\n<\/div>\n<\/div>\n \u5728\u521b\u5efa\u6210\u529f\u540e\uff0c\u4f7f\u7528status\u53c2\u6570\u67e5\u770b\u65b0\u5efa\u5377\u7684\u6982\u8ff0\u4fe1\u606f\uff1a<\/p>\n [root@linuxprobe ~]# vdo status --name=storage\r\nVDO status:\r\n Date: '2021-01-06 22:51:33+08:00'\r\n Node: lrxjmw.cn\r\nKernel module:\r\n Loaded: true\r\n Name: kvdo\r\n Version information:\r\n kvdo version: 6.2.0.293\r\nConfiguration:\r\n File: \/etc\/vdoconf.yml\r\n Last modified: '2021-01-06 22:49:33'\r\nVDOs:\r\n storage:\r\n Acknowledgement threads: 1\r\n Activate: enabled\r\n Bio rotation interval: 64\r\n Bio submission threads: 4\r\n Block map cache size: 128M\r\n Block map period: 16380\r\n Block size: 4096\r\n CPU-work threads: 2\r\n Compression: enabled\r\n Configured write policy: auto\r\n Deduplication: enabled\r\n\u2026\u2026\u2026\u2026\u2026\u2026\u7701\u7565\u90e8\u5206\u8f93\u51fa\u4fe1\u606f\u2026\u2026\u2026\u2026\u2026\u2026<\/pre>\n\u6709\u4e0a\u53ef\u89c1\uff0c\u5728\u8f93\u51fa\u4fe1\u606f\u4e2d\u5305\u542b\u4e86VDO\u5377\u521b\u5efa\u7684\u65f6\u95f4\u3001\u4e3b\u673a\u540d\u3001\u7248\u672c\u3001\u662f\u5426\u538b\u7f29\uff08Compression\uff09\u53ca\u662f\u5426\u5220\u91cd\uff08Deduplication\uff09\u7b49\u5173\u952e\u4fe1\u606f\u3002<\/p>\n \u63a5\u4e0b\u6765\uff0c\u5bf9\u65b0\u5efa\u5377\u8fdb\u884c\u683c\u5f0f\u5316\u64cd\u4f5c\u5e76\u6302\u8f7d\u4f7f\u7528\u3002<\/p>\n \u65b0\u5efa\u7684VDO\u5377\u8bbe\u5907\u4f1a\u88ab\u4e56\u4e56\u5730\u5b58\u653e\u5728\/dev\/mapper\u76ee\u5f55\u4e0b\uff0c\u5e76\u4ee5\u8bbe\u5907\u540d\u79f0\u547d\u540d\uff0c\u5bf9\u5b83\u64cd\u4f5c\u5c31\u884c\u3002\u53e6\u5916\uff0c\u6302\u8f7d\u524d\u53ef\u4ee5\u7528udevadm settle\u547d\u4ee4\u5bf9\u8bbe\u5907\u8fdb\u884c\u4e00\u6b21\u5237\u65b0\u64cd\u4f5c\uff0c\u907f\u514d\u521a\u624d\u7684\u914d\u7f6e\u6ca1\u6709\u751f\u6548\uff1a<\/p>\n [root@linuxprobe ~]# mkfs.xfs \/dev\/mapper\/storage \r\nmeta-data=\/dev\/mapper\/storage isize=512 agcount=4, agsize=13107200 blks\r\n = sectsz=4096 attr=2, projid32bit=1\r\n = crc=1 finobt=1, sparse=1, rmapbt=0\r\n = reflink=1\r\ndata = bsize=4096 blocks=52428800, imaxpct=25\r\n = sunit=0 swidth=0 blks\r\nnaming =version 2 bsize=4096 ascii-ci=0, ftype=1\r\nlog =internal log bsize=4096 blocks=25600, version=2\r\n = sectsz=4096 sunit=1 blks, lazy-count=1\r\nrealtime =none extsz=4096 blocks=0, rtextents=0\r\n[root@linuxprobe ~]# udevadm settle\r\n[root@linuxprobe ~]# mkdir \/storage\r\n[root@linuxprobe ~]# mount \/dev\/mapper\/storage \/storage\r\n<\/pre>\n\u5982\u679c\u60f3\u67e5\u770b\u8bbe\u5907\u7684\u5b9e\u9645\u4f7f\u7528\u60c5\u51b5\uff0c\u4f7f\u7528vdostats\u547d\u4ee4\u5373\u53ef\u3002human-readable\u53c2\u6570\u7684\u4f5c\u7528\u662f\u5c06\u5b58\u50a8\u5bb9\u91cf\u81ea\u52a8\u8fdb\u4f4d\uff0c\u4ee5\u4eba\u4eec\u66f4\u6613\u8bfb\u7684\u65b9\u5f0f\u8f93\u51fa\uff08\u6bd4\u5982\uff0c\u663e\u793a20G\u800c\u4e0d\u662f20971520K\uff09\uff1a<\/p>\n [root@linuxprobe ~]# vdostats --human-readable\r\nDevice Size Used Available Use% Space saving%\r\n\/dev\/mapper\/storage 20.0G 4.0G 16.0G 20% 99%<\/pre>\n\u8fd9\u91cc\u663e\u793a\u7684Size\u662f\u5b9e\u9645\u7269\u7406\u5b58\u50a8\u7684\u7a7a\u95f4\u5927\u5c0f\uff08\u537320.0GB\u662f\u786c\u76d8\u7684\u5927\u5c0f\uff09\uff0c\u5982\u679c\u60f3\u770b\u903b\u8f91\u5b58\u50a8\u7a7a\u95f4\uff0c\u53ef\u4ee5\u4f7f\u7528df\u547d\u4ee4\u8fdb\u884c\u67e5\u770b\uff1a<\/p>\n [root@linuxprobe ~]# df -h\r\nFilesystem Size Used Avail Use% Mounted on\r\ndevtmpfs 969M 0 969M 0% \/dev\r\ntmpfs 984M 0 984M 0% \/dev\/shm\r\ntmpfs 984M 9.6M 974M 1% \/run\r\ntmpfs 984M 0 984M 0% \/sys\/fs\/cgroup\r\n\/dev\/mapper\/rhel-root 17G 3.9G 14G 23% \/\r\n\/dev\/sr0 6.7G 6.7G 0 100% \/media\/cdrom\r\n\/dev\/sda1 1014M 152M 863M 15% \/boot\r\ntmpfs 197M 16K 197M 1% \/run\/user\/42\r\ntmpfs 197M 3.5M 194M 2% \/run\/user\/0\r\n\/dev\/sdb1 2.0G 47M 2.0G 3% \/newFS\r\n\/dev\/mapper\/storage 200G 2.4G 198G 2% \/storage<\/strong>\r\n<\/pre>\n\u968f\u4fbf\u590d\u5236\u4e00\u4e2a\u5927\u6587\u4ef6\u8fc7\u6765\uff0c\u770b\u770b\u5360\u7528\u4e86\u591a\u5c11\u5bb9\u91cf\uff0c\u4ee5\u53ca\u7a7a\u95f4\u8282\u7701\u7387\uff08Space saving\uff09\u662f\u591a\u5c11\uff1a<\/p>\n [root@linuxprobe ~]# ls -lh \/media\/cdrom\/images\/install.img \r\n-r--r--r--. 1 root root 448M Apr 4 2019 \/media\/cdrom\/images\/install.img\r\n[root@linuxprobe ~]# cp \/media\/cdrom\/images\/install.img \/storage\/\r\n[root@linuxprobe ~]# ls -lh \/storage\/install.img \r\n-r--r--r--. 1 root root 448M Jan 6 23:06 \/storage\/install.img\r\n[root@linuxprobe ~]# vdostats --human-readable\r\nDevice Size Used Available Use% Space saving%\r\n\/dev\/mapper\/storage 20.0G 4.4G 15.6G 22% 18%<\/pre>\n\u6548\u679c\u4e0d\u660e\u663e\uff0c\u518d\u590d\u5236\u4e00\u4efd\u76f8\u540c\u7684\u6587\u4ef6\u8fc7\u6765\uff0c\u770b\u770b\u8fd9\u6b21\u5360\u7528\u4e86\u591a\u5c11\u7a7a\u95f4\uff1a<\/p>\n [root@linuxprobe ~]# cp \/media\/cdrom\/images\/install.img \/storage\/rhel.img\r\n[root@linuxprobe ~]# vdostats --human-readable\r\nDevice Size Used Available Use% Space saving%\r\n\/dev\/mapper\/storage 20.0G 4.5G 15.5G 22% 55%<\/pre>\n\u662f\u4e0d\u662f\u611f\u89c9\u5f88\u68d2\uff1f\uff01\u539f\u5148448MB\u7684\u6587\u4ef6\u8fd9\u6b21\u53ea\u5360\u7528\u4e86\u4e0d\u5230100MB\u7684\u5bb9\u91cf\uff0c\u7a7a\u95f4\u8282\u7701\u7387\u4e5f\u4ece18%\u63d0\u5347\u5230\u4e8655%\u3002\u5f53\u7136\u8fd9\u8fd8\u4ec5\u4ec5\u662f\u4e24\u6b21\u64cd\u4f5c\u800c\u5df2\uff0c\u597d\u5904\u5c31\u5df2\u7ecf\u5982\u6b64\u660e\u663e\u4e86\u3002<\/p>\n \u6700\u540e\uff0c\u5c06\u8bbe\u5907\u8bbe\u7f6e\u6210\u6c38\u4e45\u6302\u8f7d\u751f\u6548\uff0c\u4e00\u76f4\u63d0\u4f9b\u670d\u52a1\u3002<\/p>\n VDO\u8bbe\u5907\u5377\u5728\u521b\u5efa\u540e\u4f1a\u4e00\u76f4\u5b58\u5728\uff0c\u4f46\u9700\u8981\u624b\u52a8\u7f16\u8f91\/etc\/fstab\u6587\u4ef6\u540e\u624d\u80fd\u5728\u4e0b\u4e00\u6b21\u91cd\u542f\u540e\u81ea\u52a8\u6302\u8f7d\u751f\u6548\uff0c\u4e3a\u6211\u4eec\u6240\u7528\u3002\u5bf9\u4e8e\u8fd9\u79cd\u903b\u8f91\u5b58\u50a8\u8bbe\u5907\uff0c\u5176\u5b9e\u4e0d\u592a\u5efa\u8bae\u4f7f\u7528\/dev\/mapper\/storage\u4f5c\u4e3a\u8bbe\u5907\u540d\u8fdb\u884c\u6302\u8f7d\u3002\u4e0d\u5982\u8bd5\u8bd5\u524d\u9762\u6240\u8bf4\u7684UUID\u5427\uff1a<\/p>\n [root@linuxprobe ~]# blkid \/dev\/mapper\/storage \r\n\/dev\/mapper\/storage: UUID=\"cd4e9f12-e16a-415c-ae76-8de069076713\" TYPE=\"xfs\"<\/pre>\n\u6253\u5f00\/etc\/fstab\u6587\u4ef6\uff0c\u628a\u5bf9\u5e94\u7684\u5b57\u6bb5\u586b\u5199\u5b8c\u6574\u3002\u5efa\u8bae\u518d\u52a0\u4e0a_netdev\u53c2\u6570\uff0c\u8868\u793a\u7b49\u7cfb\u7edf\u53ca\u7f51\u7edc\u90fd\u542f\u52a8\u540e\u518d\u6302\u8f7dVDO\u8bbe\u5907\u5377\uff0c\u4ee5\u4fdd\u8bc1\u4e07\u65e0\u4e00\u5931\u3002<\/p>\n [root@linuxprobe ~]# vim \/etc\/fstab\r\n#\r\n# \/etc\/fstab\r\n# Created by anaconda on Tue Jul 21 05:03:40 2020\r\n#\r\n# Accessible filesystems, by reference, are maintained under '\/dev\/disk\/'.\r\n# See man pages fstab(5), findfs(8), mount(8) and\/or blkid(8) for more info.\r\n#\r\n# After editing this file, run 'systemctl daemon-reload' to update systemd\r\n# units generated from this file.\r\n#\r\n\/dev\/mapper\/rhel-root \/ xfs defaults 1 1\r\nUUID=812b1f7c-8b5b-43da-8c06-b9999e0fe48b \/boot xfs defaults,uquota 1 2\r\n\/dev\/mapper\/rhel-swap swap swap defaults 0 0\r\n\/dev\/cdrom \/media\/cdrom iso9660 defaults 0 0 \r\n\/dev\/sdb1 \/newFS xfs defaults 0 0 \r\n\/dev\/sdb2 swap swap defaults 0 0 \r\nUUID=cd4e9f12-e16a-415c-ae76-8de069076713 \/storage xfs defaults,_netdev 0 0<\/strong> \r\n<\/pre>\n6.9 \u8f6f\u786c\u65b9\u5f0f\u94fe\u63a5<\/strong><\/span><\/h5>\n\u5728\u5f15\u9886\u5927\u5bb6\u5b66\u4e60\u5b8c\u672c\u7ae0\u6240\u6709\u7684\u786c\u76d8\u7ba1\u7406\u77e5\u8bc6\u4e4b\u540e\uff0c\u5218\u9044\u8001\u5e08\u7ec8\u4e8e\u53ef\u4ee5\u653e\u5fc3\u5927\u80c6\u5730\u8bb2\u89e3Linux\u7cfb\u7edf\u4e2d\u7684\u201c\u5feb\u6377\u65b9\u5f0f\u201d\u4e86\u3002\u5728Windows\u7cfb\u7edf\u4e2d\uff0c\u5feb\u6377\u65b9\u5f0f\u5c31\u662f\u6307\u5411\u539f\u59cb\u6587\u4ef6\u7684\u4e00\u4e2a\u94fe\u63a5\u6587\u4ef6\uff0c\u53ef\u4ee5\u8ba9\u7528\u6237\u4ece\u4e0d\u540c\u7684\u4f4d\u7f6e\u6765\u8bbf\u95ee\u539f\u59cb\u7684\u6587\u4ef6\uff1b\u539f\u6587\u4ef6\u4e00\u65e6\u88ab\u5220\u9664\u6216\u526a\u5207\u5230\u5176\u4ed6\u5730\u65b9\uff0c\u4f1a\u5bfc\u81f4\u94fe\u63a5\u6587\u4ef6\u5931\u6548\u3002\u4f46\u662f\uff0c\u8fd9\u4e2a\u770b\u4f3c\u7b80\u5355\u7684\u4e1c\u897f\u5728Linux\u7cfb\u7edf\u4e2d\u53ef\u4e0d\u592a\u4e00\u6837\u3002<\/p>\n Linux\u7cfb\u7edf\u4e2d\u5b58\u5728\u8f6f\u94fe\u63a5\u548c\u786c\u94fe\u63a5\u4e24\u79cd\u4e0d\u540c\u7684\u7c7b\u578b\u3002<\/p>\n \u8f6f\u94fe\u63a5\uff08soft link\uff09\uff1a<\/strong>\u4e5f\u53eb\u7b26\u53f7\u94fe\u63a5\uff08symbolic link\uff09\uff0c\u4ec5\u4ec5\u5305\u542b\u6240\u94fe\u63a5\u6587\u4ef6\u7684\u540d\u79f0\u548c\u8def\u5f84\uff0c\u5f88\u50cf\u4e00\u4e2a\u8bb0\u5f55\u5730\u5740\u7684\u6807\u7b7e\u3002\u5f53\u539f\u59cb\u6587\u4ef6\u88ab\u5220\u9664\u6216\u79fb\u52a8\u540e\uff0c\u65b0\u7684\u94fe\u63a5\u6587\u4ef6\u4e5f\u4f1a\u968f\u4e4b\u5931\u6548\uff0c\u4e0d\u80fd\u88ab\u8bbf\u95ee\u3002\u53ef\u4ee5\u9488\u5bf9\u6587\u4ef6\u3001\u76ee\u5f55\u8bbe\u7f6e\u8f6f\u94fe\u63a5\uff0c\u8de8\u6587\u4ef6\u7cfb\u7edf\u8fdb\u884c\u94fe\u63a5\u4e5f\u4e0d\u662f\u95ee\u9898\u3002\u4ece\u8fd9\u4e00\u70b9\u6765\u770b\uff0c\u5b83\u4e0eWindows\u7cfb\u7edf\u7684\u201c\u5feb\u6377\u65b9\u5f0f\u201d\u5177\u6709\u4e00\u6837\u7684\u6027\u8d28\u3002\u7528\u6237\u8bbf\u95ee\u8f6f\u94fe\u63a5\u7684\u6548\u679c\u5982\u56fe6-15\u6240\u793a\u3002<\/p>\n\u786c\u94fe\u63a5\uff08hard link\uff09\uff1a<\/strong>\u53ef\u4ee5\u5c06\u5b83\u7406\u89e3\u4e3a\u4e00\u4e2a\u201c\u6307\u5411\u539f\u59cb\u6587\u4ef6block\u7684\u6307\u9488\u201d\uff0c\u7cfb\u7edf\u4f1a\u521b\u5efa\u51fa\u4e00\u4e2a\u4e0e\u539f\u6765\u4e00\u6a21\u4e00\u6837\u7684inode\u4fe1\u606f\u5757\u3002\u6240\u4ee5\uff0c\u786c\u94fe\u63a5\u6587\u4ef6\u4e0e\u539f\u59cb\u6587\u4ef6\u5176\u5b9e\u662f\u4e00\u6a21\u4e00\u6837\u7684\uff0c\u53ea\u662f\u540d\u5b57\u4e0d\u540c\u3002\u6bcf\u6dfb\u52a0\u4e00\u4e2a\u786c\u94fe\u63a5\uff0c\u8be5\u6587\u4ef6\u7684inode\u4e2a\u6570\u5c31\u4f1a\u589e\u52a01\uff1b\u800c\u4e14\u53ea\u6709\u5f53\u8be5\u6587\u4ef6\u7684inode\u4e2a\u6570\u4e3a0\u65f6\uff0c\u624d\u7b97\u5f7b\u5e95\u5c06\u5b83\u5220\u9664\u3002\u6362\u8a00\u4e4b\uff0c\u7531\u4e8e\u786c\u94fe\u63a5\u5b9e\u9645\u4e0a\u662f\u6307\u5411\u539f\u6587\u4ef6block\u7684\u6307\u9488\uff0c\u56e0\u6b64\u5373\u4fbf\u539f\u59cb\u6587\u4ef6\u88ab\u5220\u9664\uff0c\u4f9d\u7136\u53ef\u4ee5\u901a\u8fc7\u786c\u94fe\u63a5\u6587\u4ef6\u6765\u8bbf\u95ee\u3002\u9700\u8981\u6ce8\u610f\u7684\u662f\uff0c\u7531\u4e8e\u6280\u672f\u7684\u5c40\u9650\u6027\uff0c\u4e0d\u80fd\u8de8\u5206\u533a\u5bf9\u76ee\u5f55\u6587\u4ef6\u8fdb\u884c\u786c\u94fe\u63a5\u3002\u7528\u6237\u8bbf\u95ee\u786c\u94fe\u63a5\u7684\u6548\u679c\u5982\u56fe6-16\u6240\u793a\u3002<\/p>\n<\/p>\n \u56fe6-15 \u8f6f\u94fe\u63a5\u539f\u7406\u793a\u610f\u56fe<\/p>\n <\/p>\n \u56fe6-16 \u786c\u94fe\u63a5\u539f\u7406\u793a\u610f\u56fe<\/p>\n \n \n Tips<\/strong><\/h3>\n<\/div>\n\n \u5927\u5bb6\u7ffb\u5f00\u624b\u5934\u8fd9\u672c\u4e66\u7684\u76ee\u5f55\u9875\uff0c\u770b\u4e00\u4e0b\u76ee\u5f55\u6807\u9898\u548c\u5bf9\u5e94\u7684\u9875\u7801\u5c31\u5e94\u8be5\u80fd\u591f\u7406\u89e3\u4e86\u3002\u94fe\u63a5\u6587\u4ef6\u5c31\u662f\u6307\u5411\u5b9e\u9645\u5185\u5bb9\u6240\u5728\u4f4d\u7f6e\u7684\u4e00\u4e2a\u6807\u7b7e\uff0c\u901a\u8fc7\u8fd9\u4e2a\u6807\u7b7e\uff0c\u53ef\u4ee5\u627e\u5230\u5bf9\u5e94\u7684\u6570\u636e\u3002<\/p>\n<\/div>\n<\/div>\n ln\u547d\u4ee4\u7528\u4e8e\u521b\u5efa\u6587\u4ef6\u7684\u8f6f\u786c\u94fe\u63a5\uff0c\u82f1\u6587\u5168\u79f0\u4e3a\u201clink\u201d\uff0c\u8bed\u6cd5\u683c\u5f0f\u4e3a\u201cln [\u53c2\u6570]\u539f\u59cb\u6587\u4ef6\u540d \u94fe\u63a5\u6587\u4ef6\u540d\u201d\u3002<\/p>\n ln\u547d\u4ee4\u7684\u53ef\u7528\u53c2\u6570\u4ee5\u53ca\u4f5c\u7528\u5982\u88686-8\u6240\u793a\u3002\u5728\u4f7f\u7528ln\u547d\u4ee4\u65f6\uff0c\u662f\u5426\u6dfb\u52a0-s\u53c2\u6570\uff0c\u5c06\u521b\u5efa\u51fa\u6027\u8d28\u4e0d\u540c\u7684\u4e24\u79cd\u201c\u5feb\u6377\u65b9\u5f0f\u201d\u3002\u56e0\u6b64\u5982\u679c\u6ca1\u6709\u624e\u5b9e\u7684\u7406\u8bba\u77e5\u8bc6\u548c\u5b9e\u8df5\u7ecf\u9a8c\u505a\u94fa\u57ab\uff0c\u5c3d\u7ba1\u80fd\u591f\u6210\u529f\u5b8c\u6210\u5b9e\u9a8c\uff0c\u4f46\u6c38\u8fdc\u4e0d\u4f1a\u660e\u767d\u4e3a\u4ec0\u4e48\u4f1a\u6210\u529f\u3002<\/p>\n \u88686-8\u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0ln\u547d\u4ee4\u4e2d\u53ef\u7528\u7684\u53c2\u6570\u4ee5\u53ca\u4f5c\u7528<\/p>\n | |