{"id":728,"date":"2024-02-12T16:02:06","date_gmt":"2024-02-12T08:02:06","guid":{"rendered":"http:\/\/madapapa.com\/wordpress\/?p=728"},"modified":"2024-02-12T16:20:58","modified_gmt":"2024-02-12T08:20:58","slug":"20g-disk-space-is-not-mounted","status":"publish","type":"post","link":"http:\/\/madapapa.com\/wordpress\/?p=728","title":{"rendered":"20G disk space is not mounted!"},"content":{"rendered":"<p>\u4eca\u5929\u6253\u7b97\u5728\u963f\u91cc\u4e91\u4e0a\u5b89\u88c5eve-ng\uff0c\u611f\u89c9\u78c1\u76d8\u7a7a\u95f4\u53ef\u80fd\u4e0d\u8db3\uff0c\u6253\u5f00\u63a7\u5236\u53f0\uff0c\u53d1\u73b0\u8fd8\u6709\u4e00\u4e2a20G\u7684\u6570\u636e\u76d8\uff0c\u89c9\u5f97\u52c9\u5f3a\u591f\u7528\uff0c\u5c31\u76f4\u63a5\u5728\u7ec8\u7aef\u4e0a\u901a\u8fc7lsblk\u67e5\u770b<\/p>\n<pre><code class=\"language-plain_text\">[MDaliyun ~]# lsblk\nNAME   MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT\nloop0    7:0    0 63.5M  1 loop \/snap\/core20\/2015\nloop2    7:2    0 40.4M  1 loop \/snap\/snapd\/20671\nloop3    7:3    0 11.9M  1 loop \/snap\/kubectl\/3164\nloop4    7:4    0 63.9M  1 loop \/snap\/core20\/2105\nloop5    7:5    0 40.9M  1 loop \/snap\/snapd\/20290\nloop6    7:6    0 11.9M  1 loop \/snap\/kubectl\/3149\nvda    252:0    0   40G  0 disk \n\u2514\u2500vda1 252:1    0   40G  0 part \/\nvdb    252:16   0   20G  0 disk \n<\/code><\/pre>\n<p>\u597d\u5bb6\u4f19\uff0c\u8fd9\u4e00\u770b\u4e0d\u8981\u7d27\uff0c\u53d1\u73b0vdb\u8fd9\u5757\u76d8\u867d\u7136\u542f\u52a82\u5e74\u4e86\uff0c\u4f46\u662f\u4e00\u76f4\u6ca1\u6709\u6302\u8f7d\uff0c\u5c31\u8fd9\u4e48\u767d\u767d\u6d6a\u8d39\u4e862\u5e74\uff01<br \/>\n\u9a6c\u4e0a\u683c\u5f0f\u5316\uff0c\u6302\u8f7d\uff0c\u628a\u5b83\u7528\u8d77\u6765\uff0c\u4e3a\u4e86\u7701\u4e8b\uff0c\u76f4\u63a5\u8ba9chatgpt\u51fa\u9a6c\uff1a<\/p>\n<pre><code class=\"language-plain_text\">The output \/dev\/vdb: data from the file -s \/dev\/vdb command indicates that the \/dev\/vdb block device does not have a recognizable filesystem or partition table. This typically means that the disk is either unformatted or contains raw data that is not structured in a manner recognized by the file command.\n\nGiven this situation, if you intend to use \/dev\/vdb for storage, the next steps would involve creating a filesystem on it. Here's how you can do it:\n\nCreate a Filesystem on \/dev\/vdb\nChoose a Filesystem Type: Decide on the type of filesystem you want to create. Common choices include ext4 for general use, xfs for high-performance environments, and btrfs for systems requiring advanced features like snapshotting.\nCreate the Filesystem: Use the mkfs command to create a filesystem. For example, to create an ext4 filesystem on \/dev\/vdb, you would use:\nbash\nCopy code\nmkfs.ext4 \/dev\/vdb\nReplace ext4 with your filesystem of choice if different.\nMount the Filesystem\nAfter creating the filesystem, you can mount it to make the storage available for use:\n\nCreate a Mount Point: This is the directory where the disk's contents will be accessible. For example, to create a mount point at \/mnt\/data, use:\nbash\nCopy code\nmkdir \/mnt\/data\nMount the Disk: Mount the newly formatted disk to the mount point:\nbash\nCopy code\nmount \/dev\/vdb \/mnt\/data\nEnsure Persistent Mounting Across Reboots\nTo automatically mount the disk after a reboot, you'll need to add an entry to the \/etc\/fstab file:\n\nFind the UUID of \/dev\/vdb: The UUID is a unique identifier for the disk, which is preferable to use in the \/etc\/fstab file instead of the device name (\/dev\/vdb) since it won't change between reboots.\nbash\nCopy code\nblkid \/dev\/vdb\nEdit \/etc\/fstab: Add a line to this file with the disk's UUID and mount information. Open the file in a text editor (like nano or vi), and add a line similar to:\nplaintext\nCopy code\nUUID=&lt;your-uuid&gt; \/mnt\/data ext4 defaults 0 2\nReplace &lt;your-uuid&gt; with the actual UUID you obtained from the blkid command.\n<\/code><\/pre>\n<p>\u4f7f\u7528mkfs.ext4\u8fd9\u4e2a\u547d\u4ee4\uff0c\u4f5c\u4e3a\u901a\u7528\u5b58\u50a8\uff0c\u7ed3\u679c\u5982\u4e0b\uff1a<\/p>\n<pre><code class=\"language-plain_text\">[MDaliyun ~]# mkfs.ext4 \/dev\/vdb\nmke2fs 1.45.5 (07-Jan-2020)\nCreating filesystem with 5242880 4k blocks and 1310720 inodes\nFilesystem UUID: 811e4057-5c8b-45e2-8fb9-40e023ec72cc\nSuperblock backups stored on blocks: \n        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, \n        4096000\n\nAllocating group tables: done                            \nWriting inode tables: done                            \nCreating journal (32768 blocks): done\nWriting superblocks and filesystem accounting information: done   \n<\/code><\/pre>\n<p>\u7136\u540e\u6302\u5728\u5728data\u4e0b\u9762\uff1a<\/p>\n<pre><code class=\"language-plain_text\">[MDaliyun \/]# mkdir \/mnt\/data\n\/\n[MDaliyun \/]# file -s \/dev\/vdb  \n\/dev\/vdb: Linux rev 1.0 ext4 filesystem data, UUID=811e4057-5c8b-45e2-8fb9-40e023ec72cc (extents) (64bit) (large files) (huge files)\n[MDaliyun \/]# mount \/dev\/vdb \/mnt\/data\n[MDaliyun \/]# blkid \/dev\/vdb\n\/dev\/vdb: UUID=&quot;811e4057-5c8b-45e2-8fb9-40e023ec72cc&quot; TYPE=&quot;ext4&quot;\n<\/code><\/pre>\n<p>\u518d\u4f7f\u7528lsblk\u770b\u770b\uff0c\u6210\u529f\u4e86<br \/>\n<img decoding=\"async\" src=\"http:\/\/madapapa.com\/wordpress\/wp-content\/uploads\/2024\/02\/17077256451456.jpg\" alt=\"\" \/><\/p>\n<p>\u4e0d\u8fc7\u6b63\u4e8b\u8fd8\u6ca1\u6709\u5b8c\uff0ceve-ng\u662f\u865a\u62df\u673a\uff0c\u6ca1\u6cd5\u5728\u5df2\u7ecf\u865a\u62df\u5316\u7684\u673a\u5668\u4e0a\u5b89\u88c5\uff08\u963f\u91cc\u4e91\u4e0d\u652f\u6301vmx\uff0c\u4e5f\u5c31\u662f\u786c\u4ef6\u5df2\u7ecf\u4f7f\u7528\u4e86\u4e00\u6b21kvm\u7684vmx\uff0c\u865a\u62df\u673a\u91cc\u5c31\u65e0\u6cd5\u652f\u6301\u4e8c\u6b21\u7684vmx\u4e86\uff09\uff0c\u4f46\u662f\u6211\u7684\u672c\u5730\u7535\u8111\u4e5f\u6ca1\u6709\u7a7a\u95f4\u7ee7\u7eed\u5b89\u88c5vmware\uff0c\u5982\u4f55\u662f\u597d\uff1f<\/p>\n<pre><code class=\"language-plain_text\">https:\/\/zhuanlan.zhihu.com\/p\/548997684\n\u6211\u4eec\u77e5\u9053,\u5728Intel\u5904\u7406\u5668\u4e0a,KVM\u4f7f\u7528Intel\u7684vmx(virtul machine eXtensions)\u6765\u63d0\u9ad8\u865a\u62df\u673a\u6027\u80fd, \u5373\u786c\u4ef6\u8f85\u52a9\u865a\u62df\u5316\u6280\u672f, \u73b0\u5728\u5982\u679c\u6211\u4eec\u9700\u8981\u6d4b\u8bd5\u4e00\u4e2aopenstack\u96c6\u7fa4,\u53c8\u6216\u8005\u5355\u7eaf\u7684\u9700\u8981\u591a\u53f0\u5177\u5907&quot;vmx&quot;\u652f\u6301\u7684\u4e3b\u673a, \u4f46\u662f\u53c8\u6ca1\u6709\u592a\u591a\u7269\u7406\u670d\u52a1\u5668\u53ef\u4f7f\u7528, \u5982\u679c\u6211\u4eec\u7684\u865a\u62df\u673a\u80fd\u591f\u548c\u7269\u7406\u673a\u4e00\u6837\u652f\u6301&quot;vmx&quot;,\u90a3\u4e48\u95ee\u9898\u5c31\u89e3\u51b3\u4e86,\u800c\u6b63\u5e38\u60c5\u51b5\u4e0b,\u4e00\u53f0\u865a\u62df\u673a\u65e0\u6cd5\u4f7f\u81ea\u5df1\u6210\u4e3a\u4e00\u4e2ahypervisors\u5e76\u5728\u5176\u4e0a\u518d\u6b21\u5b89\u88c5\u865a\u62df\u673a,\u56e0\u4e3a\u8fd9\u4e9b\u865a\u62df\u673a\u5e76\u4e0d\u652f\u6301&quot;vmx&quot;\n\n\u5d4c\u5957\u5f0f\u865a\u62dfnested\u662f\u4e00\u4e2a\u53ef\u901a\u8fc7\u5185\u6838\u53c2\u6570\u6765\u542f\u7528\u7684\u529f\u80fd\u3002\u5b83\u80fd\u591f\u4f7f\u4e00\u53f0\u865a\u62df\u673a\u5177\u6709\u7269\u7406\u673aCPU\u7279\u6027,\u652f\u6301vmx\u6216\u8005svm(AMD)\u786c\u4ef6\u865a\u62df\u5316\u3002\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6253\u7b97\u5728\u963f\u91cc\u4e91\u4e0a\u5b89\u88c5eve-ng\uff0c\u611f\u89c9\u78c1\u76d8\u7a7a\u95f4\u53ef\u80fd\u4e0d\u8db3\uff0c\u6253\u5f00\u63a7\u5236\u53f0\uff0c\u53d1\u73b0\u8fd8\u6709\u4e00\u4e2a20G\u7684\u6570\u636e\u76d8\uff0c\u89c9\u5f97\u52c9\u5f3a\u591f\u7528\uff0c\u5c31\u76f4\u63a5\u5728\u7ec8\u7aef\u4e0a\u901a\u8fc7lsblk\u67e5\u770b [MDaliyun ~]# lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 63.5M 1 loop \/snap\/core20\/2015 loop2 7:2 0 40.4M 1 loop \/snap\/snapd\/20671 loop3 7:3 0 11.9M 1 loop \/snap\/kubectl\/3164 loop4 7:4 0 63.9M 1 loop \/snap\/core20\/2105 loop5 7:5 0 40.9M 1 loop \/snap\/snapd\/20290 loop6 7:6 0 11.9M 1 loop \/snap\/kubectl\/3149 vda 252:0 &hellip; <a href=\"http:\/\/madapapa.com\/wordpress\/?p=728\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">20G disk space is not mounted!<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"categories":[50,5],"tags":[],"class_list":["post-728","post","type-post","status-publish","format-standard","hentry","category-canada","category-linux"],"_links":{"self":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=728"}],"version-history":[{"count":2,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/728\/revisions"}],"predecessor-version":[{"id":730,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/728\/revisions\/730"}],"wp:attachment":[{"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=728"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=728"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/madapapa.com\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}