Files
blog/2023/10/28/Centos挂载新硬盘/index.html
T

121 lines
29 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<!DOCTYPE html><html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=2"><meta name="theme-color" content="#FFF"><link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png"><link rel="icon" type="image/ico" sizes="32x32" href="/images/favicon.ico"><meta http-equiv="Cache-Control" content="no-transform"><meta http-equiv="Cache-Control" content="no-siteapp"><link rel="alternate" type="application/rss+xml" title="涛声依旧" href="https://hitoli.com/rss.xml"><link rel="alternate" type="application/atom+xml" title="涛声依旧" href="https://hitoli.com/atom.xml"><link rel="alternate" type="application/json" title="涛声依旧" href="https://hitoli.com/feed.json"><link rel="stylesheet" href="//fonts.googleapis.com/css?family=Mulish:300,300italic,400,400italic,700,700italic%7CFredericka%20the%20Great:300,300italic,400,400italic,700,700italic%7CNoto%20Serif%20JP:300,300italic,400,400italic,700,700italic%7CNoto%20Serif%20SC:300,300italic,400,400italic,700,700italic%7CInconsolata:300,300italic,400,400italic,700,700italic&display=swap&subset=latin,latin-ext"><link rel="stylesheet" href="/css/app.css?v=0.0.0"><meta name="keywords" content="Centos,Linux,Mount"><link rel="canonical" href="https://hitoli.com/2023/10/28/Centos%E6%8C%82%E8%BD%BD%E6%96%B0%E7%A1%AC%E7%9B%98/"><title>Centos 挂载新硬盘 - Centos - Linux | ☆∵∴Hito∴∵★ = 涛声依旧 = 天下事有难易乎?为之,则难者亦易矣</title><meta name="generator" content="Hexo 6.3.0"><style>
#waline {
position: relative;
z-index: 10;
margin-top: 60px !important;
}
.post-navigate {
position: relative;
z-index: 1;
margin-bottom: 80px !important;
}
/* 评论数为 0 时隐藏整个条目(JS 会给 0 的项加 .no-comment) */
.meta .item.comment-item.no-comment {
display: none;
}
/* 侧栏「最新评论」样式:贴合主题卡片风格 */
.leancloud-recent-comment {
display: block;
margin: 0;
padding: 0;
list-style: none;
}
.leancloud-recent-comment .wl-recent-list {
margin: 0;
padding: 0;
list-style: none;
}
.leancloud-recent-comment .wl-recent-item {
display: block;
padding: 0.4rem 0;
border-bottom: 1px dashed var(--color-border, rgba(128,128,128,.25));
font-size: 0.82rem;
line-height: 1.5;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.leancloud-recent-comment .wl-recent-item:last-child {
border-bottom: none;
}
.leancloud-recent-comment .wl-recent-item a {
font-weight: 600;
margin-right: 0.25em;
}
.leancloud-recent-comment .wl-recent-item p {
display: inline;
margin: 0;
}
</style>
</head><body itemscope itemtype="http://schema.org/WebPage"><div id="loading"><div class="cat"><div class="body"></div><div class="head"><div class="face"></div></div><div class="foot"><div class="tummy-end"></div><div class="bottom"></div><div class="legs left"></div><div class="legs right"></div></div><div class="paw"><div class="hands left"></div><div class="hands right"></div></div></div></div><div id="container"><header id="header" itemscope itemtype="http://schema.org/WPHeader"><div class="inner"><div id="brand"><div class="pjax"><h1 itemprop="name headline">Centos 挂载新硬盘</h1><div class="meta"><span class="item" title="创建时间:2023-10-28 19:26:00"><span class="icon"><i class="ic i-calendar"></i> </span><span class="text">发表于</span> <time itemprop="dateCreated datePublished" datetime="2023-10-28T19:26:00+08:00">2023-10-28</time> </span><span class="item" title="本文字数"><span class="icon"><i class="ic i-pen"></i> </span><span class="text">本文字数</span> <span>551</span> <span class="text">字</span> </span><span class="item" title="阅读时长"><span class="icon"><i class="ic i-clock"></i> </span><span class="text">阅读时长</span> <span>1 分钟</span> </span><span class="item" title="评论数量"><span class="icon"><i class="ic i-comment"></i> </span><span class="text">评论</span> <span class="waline-comment-count" data-path="2023/10/28/Centos挂载新硬盘/"></span> <span class="text">条</span></span></div></div></div><nav id="nav"><div class="inner"><div class="toggle"><div class="lines" aria-label="切换导航栏"><span class="line"></span> <span class="line"></span> <span class="line"></span></div></div><ul class="menu"><li class="item title"><a href="/" rel="start">☆∵∴Hito∴∵★</a></li></ul><ul class="right"><li class="item theme"><i class="ic i-sun"></i></li><li class="item search"><i class="ic i-search"></i></li></ul></div></nav></div><div id="imgs" class="pjax"><ul><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?686599"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?342603"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?954447"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?311500"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?90520"></li><li class="item" data-background-image="https://ndis.hitoli.com:8443/nas-dispatcher/common/downloadImg?539859"></li></ul></div></header><div id="waves"><svg class="waves" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z"/></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0"/><use xlink:href="#gentle-wave" x="48" y="3"/><use xlink:href="#gentle-wave" x="48" y="5"/><use xlink:href="#gentle-wave" x="48" y="7"/></g></svg></div><main><div class="inner"><div id="main" class="pjax"><div class="article wrap"><div class="breadcrumb" itemscope itemtype="https://schema.org/BreadcrumbList"><i class="ic i-home"></i> <span><a href="/">首页</a></span><i class="ic i-angle-right"></i> <span itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a href="/categories/Linux/" itemprop="item" rel="index" title="分类于 Linux"><span itemprop="name">Linux</span></a><meta itemprop="position" content="1"></span><i class="ic i-angle-right"></i> <span class="current" itemprop="itemListElement" itemscope itemtype="https://schema.org/ListItem"><a href="/categories/Linux/Centos/" itemprop="item" rel="index" title="分类于 Centos"><span itemprop="name">Centos</span></a><meta itemprop="position" content="2"></span></div><article itemscope itemtype="http://schema.org/Article" class="post block" lang="zh-CN"><link itemprop="mainEntityOfPage" href="https://hitoli.com/2023/10/28/Centos%E6%8C%82%E8%BD%BD%E6%96%B0%E7%A1%AC%E7%9B%98/"><span hidden itemprop="author" itemscope itemtype="http://schema.org/Person"><meta itemprop="image" content="/images/avatar.jpg"><meta itemprop="name" content="Hito Li"><meta itemprop="description" content="天下事有难易乎?为之,则难者亦易矣, 天生我材必有用"></span><span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization"><meta itemprop="name" content="涛声依旧"></span><div class="body md" itemprop="articleBody"><h4 id="查看磁盘信息"><a class="anchor" href="#查看磁盘信息">#</a> 查看磁盘信息</h4><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">fdisk</span> <span class="token parameter variable">-l</span> 查看当前磁盘的分区情况</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/4dc953fc5a5e.png" alt=""><br>可从图中获取以下信息:<br>/dev/vdb 数据盘容量为 60GB,包含 MBR 分区 /dev/vdb1,容量为 50GB。<br>/dev/vdc 数据盘容量为 60GB,包含 GPT 分区 /dev/vdc1,容量为 50GB。</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">df</span> <span class="token parameter variable">-TH</span> 分区的文件系统类型</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/8996c9620632.png" alt=""><br>可从图中获取以下信息:<br>/dev/vdb1 文件系统类型为 ext4,已挂载至 /mnt/disk1。<br>/dev/vdc1 文件系统类型为 xfs,已挂载至 /mnt/disk2。</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">fdisk</span> /dev/vdb 查看新磁盘情况</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/0f1237aef57b.png" alt=""></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>lsbl 查看分区情况</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/8071a3832e29.png" alt=""></p><h4 id="挂载新硬盘"><a class="anchor" href="#挂载新硬盘">#</a> 挂载新硬盘</h4><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>mkfs.ext4 /dev/vdb 格式化磁盘</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/9353dd85579f.png" alt=""></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token builtin class-name">cd</span> /mnt</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token function">mkdir</span> data 新建挂载点</pre></td></tr><tr><td data-num="3"></td><td><pre><span class="token function">mount</span> /dev/vdb /mnt/data 挂载</pre></td></tr></table></figure><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">df</span> <span class="token parameter variable">-h</span> 查看挂载情况</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/ead4f7b1323f.png" alt=""><br>查看 UUID 有三种方式:</p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>blkid</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/236412bc1e3f.png" alt=""></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>lsblk <span class="token parameter variable">-f</span></pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/35d7182c5647.png" alt=""></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>ll /dev/disk/by-uuid/</pre></td></tr></table></figure><p><img data-src="https://npic.hitoli.com:8443/images/2023/10/28/3f9d4f69d8ea.png" alt=""></p><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre>设置自动挂载:</pre></td></tr><tr><td data-num="2"></td><td><pre><span class="token builtin class-name">echo</span> <span class="token string">"UUID=c8ac09ca-fd4d-4511-bd2c-4fdf96f08168 /data ext4 defaults 0 0"</span> <span class="token operator">>></span> /etc/fstab</pre></td></tr><tr><td data-num="3"></td><td><pre>自动挂载/etc/fstab里面的东西</pre></td></tr><tr><td data-num="4"></td><td><pre><span class="token function">mount</span> <span class="token parameter variable">-a</span></pre></td></tr></table></figure><h4 id="临时卸载"><a class="anchor" href="#临时卸载">#</a> 临时卸载</h4><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">umount</span> /dev/vdb 重启机器之后又恢复到挂载状态</pre></td></tr></table></figure><h4 id="永久卸载"><a class="anchor" href="#永久卸载">#</a> 永久卸载</h4><figure class="highlight bash"><figcaption data-lang="bash"></figcaption><table><tr><td data-num="1"></td><td><pre><span class="token function">vim</span> /etc/fstab 把添加的磁盘信息删除即可。</pre></td></tr></table></figure><div class="tags"><a href="/tags/Centos/" rel="tag"><i class="ic i-tag"></i> Centos</a> <a href="/tags/Linux/" rel="tag"><i class="ic i-tag"></i> Linux</a> <a href="/tags/Mount/" rel="tag"><i class="ic i-tag"></i> Mount</a></div></div><footer><div class="meta"><span class="item"><span class="icon"><i class="ic i-calendar-check"></i> </span><span class="text">更新于</span> <time title="修改时间:2025-01-16 15:06:05" itemprop="dateModified" datetime="2025-01-16T15:06:05+08:00">2025-01-16</time></span></div><div class="reward"><button><i class="ic i-heartbeat"></i> 赞赏</button><p>请我喝[茶]~( ̄▽ ̄)~*</p><div id="qr"><div><img data-src="/images/wechatpay.png" alt="Hito Li 微信支付"><p>微信支付</p></div><div><img data-src="/images/alipay.png" alt="Hito Li 支付宝"><p>支付宝</p></div></div></div><div id="copyright"><ul><li class="author"><strong>本文作者: </strong>Hito Li <i class="ic i-at"><em>@</em></i>涛声依旧</li><li class="link"><strong>本文链接:</strong> <a href="https://hitoli.com/2023/10/28/Centos%E6%8C%82%E8%BD%BD%E6%96%B0%E7%A1%AC%E7%9B%98/" title="Centos 挂载新硬盘">https://hitoli.com/2023/10/28/Centos挂载新硬盘/</a></li><li class="license"><strong>版权声明: </strong>本站所有文章除特别声明外,均采用 <span class="exturl" data-url="aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzQuMC9kZWVkLnpo"><i class="ic i-creative-commons"><em>(CC)</em></i>BY-NC-SA</span> 许可协议。转载请注明出处!</li></ul></div></footer></article></div><div class="post-nav"><div class="item left"><a href="/2023/09/09/squid-stunnel-%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/" itemprop="url" rel="prev" data-background-image="https:&#x2F;&#x2F;ndis.hitoli.com:8443&#x2F;nas-dispatcher&#x2F;common&#x2F;downloadImg?536372" title="squid+stunnel 科学上网"><span class="type">上一篇</span> <span class="category"><i class="ic i-flag"></i> 技术分享</span><h3>squid+stunnel 科学上网</h3></a></div><div class="item right"><a href="/2023/10/28/Windows%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E6%89%B9%E5%A4%84%E7%90%86/" itemprop="url" rel="next" data-background-image="https:&#x2F;&#x2F;ndis.hitoli.com:8443&#x2F;nas-dispatcher&#x2F;common&#x2F;downloadImg?811016" title="Windows下快速部署SpringBoot项目的批处理"><span class="type">下一篇</span> <span class="category"><i class="ic i-flag"></i> 工具</span><h3>Windows下快速部署SpringBoot项目的批处理</h3></a></div></div><div class="wrap" id="comments"><div id="waline"></div><link rel="stylesheet" href="https://nblog.hitoli.com:8443/assets/waline.css"><script>(async () => {
// waline.js 是 ESM 模块,用动态 import 加载(普通 <script src> 会报 export 语法错误)
const { init, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
// PJAX 跳转时先清理上一个实例和监听器,防止重复挂载
if (window.__walineTeardown) { window.__walineTeardown(); }
const walineIns = init({
el: '#waline',
serverURL: 'https://comment.hitoli.com:8443',
path: window.location.pathname,
lang: 'zh-CN',
placeholder: '欢迎留言讨论~',
dark: 'html[data-theme="dark"]',
emoji: [
'https://nblog.hitoli.com:8443/assets/emojis-1.4.0/weibo/',
'https://nblog.hitoli.com:8443/assets/emojis-1.4.0/qq/',
'https://nblog.hitoli.com:8443/assets/emojis-1.4.0/bilibili/'
]
})
// 文章标题旁 / 页脚的评论数;0 的条目隐藏
commentCount({
serverURL: 'https://comment.hitoli.com:8443'
}).then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
})
const onPjaxSend = function () {
if (window.__walineIns) { window.__walineIns.destroy(); window.__walineIns = null; }
}
document.addEventListener('pjax:send', onPjaxSend)
window.__walineIns = walineIns
window.__walineTeardown = function () {
document.removeEventListener('pjax:send', onPjaxSend)
if (window.__walineIns) { window.__walineIns.destroy(); window.__walineIns = null; }
}
})()</script></div></div><div id="sidebar"><div class="inner"><div class="panels"><div class="inner"><div class="contents panel pjax" data-title="文章目录"><ol class="toc"><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%9F%A5%E7%9C%8B%E7%A3%81%E7%9B%98%E4%BF%A1%E6%81%AF"><span class="toc-number">1.</span> <span class="toc-text">查看磁盘信息</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%8C%82%E8%BD%BD%E6%96%B0%E7%A1%AC%E7%9B%98"><span class="toc-number">2.</span> <span class="toc-text">挂载新硬盘</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E4%B8%B4%E6%97%B6%E5%8D%B8%E8%BD%BD"><span class="toc-number">3.</span> <span class="toc-text">临时卸载</span></a></li><li class="toc-item toc-level-4"><a class="toc-link" href="#%E6%B0%B8%E4%B9%85%E5%8D%B8%E8%BD%BD"><span class="toc-number">4.</span> <span class="toc-text">永久卸载</span></a></li></ol></div><div class="related panel pjax" data-title="系列文章"><ul><li class="active"><a href="/2023/10/28/Centos%E6%8C%82%E8%BD%BD%E6%96%B0%E7%A1%AC%E7%9B%98/" rel="bookmark" title="Centos挂载新硬盘">Centos挂载新硬盘</a></li></ul></div><div class="overview panel" data-title="站点概览"><div class="author" itemprop="author" itemscope itemtype="http://schema.org/Person"><img class="image" itemprop="image" alt="Hito Li" data-src="/images/avatar.jpg"><p class="name" itemprop="name">Hito Li</p><div class="description" itemprop="description">天生我材必有用</div></div><nav class="state"><div class="item posts"><a href="/archives/"><span class="count">65</span> <span class="name">文章</span></a></div><div class="item categories"><a href="/categories/"><span class="count">23</span> <span class="name">分类</span></a></div><div class="item tags"><a href="/tags/"><span class="count">110</span> <span class="name">标签</span></a></div></nav><div class="social"><span class="exturl item weibo" data-url="aHR0cHM6Ly93ZWliby5jb20vdS8xMDYxNDYwNzQ1" title="https:&#x2F;&#x2F;weibo.com&#x2F;u&#x2F;1061460745"><i class="ic i-weibo"></i></span> <span class="exturl item douban" data-url="aHR0cHM6Ly93d3cuZG91YmFuLmNvbS9wZW9wbGUvMjU5Mzc2NTY0" title="https:&#x2F;&#x2F;www.douban.com&#x2F;people&#x2F;259376564"><i class="ic i-douban"></i></span> <span class="exturl item music" data-url="aHR0cHM6Ly9tdXNpYy4xNjMuY29tLyMvdXNlci9ob21lP2lkPTEwNTQ2NzQ2Mw==" title="https:&#x2F;&#x2F;music.163.com&#x2F;#&#x2F;user&#x2F;home?id&#x3D;105467463"><i class="ic i-cloud-music"></i></span> <a href="/about/me" title="about&#x2F;me" class="item about"><i class="ic i-address-card"></i></a></div><ul class="menu"><li class="item"><a href="/" rel="section"><i class="ic i-home"></i>首页</a></li><li class="item dropdown"><a href="javascript:void(0);"><i class="ic i-feather"></i>文章</a><ul class="submenu"><li class="item"><a href="/archives/" rel="section"><i class="ic i-list-alt"></i>归档</a></li><li class="item"><a href="/categories/" rel="section"><i class="ic i-th"></i>分类</a></li><li class="item"><a href="/tags/" rel="section"><i class="ic i-tags"></i>标签</a></li></ul></li><li class="item"><a href="/tools/" rel="section"><i class="ic i-magic"></i>工具</a></li><li class="item"><span class="exturl" data-url="aHR0cHM6Ly93d3cuZm9yZXZlcmJsb2cuY24vZ28uaHRtbA=="><i class="ic i-paper-plane"></i>虫洞</span></li><li class="item"><a href="/about/me" rel="section"><i class="ic i-user"></i>关于</a></li></ul></div></div></div><ul id="quick"><li class="prev pjax"><a href="/2023/09/09/squid-stunnel-%E7%A7%91%E5%AD%A6%E4%B8%8A%E7%BD%91/" rel="prev" title="上一篇"><i class="ic i-chevron-left"></i></a></li><li class="up"><i class="ic i-arrow-up"></i></li><li class="down"><i class="ic i-arrow-down"></i></li><li class="next pjax"><a href="/2023/10/28/Windows%E4%B8%8B%E5%BF%AB%E9%80%9F%E9%83%A8%E7%BD%B2SpringBoot%E9%A1%B9%E7%9B%AE%E7%9A%84%E6%89%B9%E5%A4%84%E7%90%86/" rel="next" title="下一篇"><i class="ic i-chevron-right"></i></a></li><li class="percent"></li></ul></div></div><div class="dimmer"></div></div></main><footer id="footer"><div class="inner"><div class="widgets"><div class="rpost pjax"><h2>随机文章</h2><ul><li class="item"><div class="breadcrumb"><a href="/categories/%E5%B7%A5%E4%BD%9C/" title="分类于 工作">工作</a> <i class="ic i-angle-right"></i> <a href="/categories/%E5%B7%A5%E4%BD%9C/%E9%A1%B9%E7%9B%AE%E9%83%A8%E7%BD%B2/" title="分类于 项目部署">项目部署</a></div><span><a href="/2023/04/16/K8S%E9%A1%B9%E7%9B%AE%E6%9C%AC%E5%9C%B0%E9%83%A8%E7%BD%B2%E6%AD%A5%E9%AA%A4/" title="K8S项目本地部署步骤">K8S项目本地部署步骤</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/%E5%B7%A5%E4%BD%9C/" title="分类于 工作">工作</a> <i class="ic i-angle-right"></i> <a href="/categories/%E5%B7%A5%E4%BD%9C/Vue/" title="分类于 Vue">Vue</a></div><span><a href="/2022/11/04/%E8%AE%B0%E4%B8%80%E6%AC%A1Vue%E9%A1%B9%E7%9B%AE%E7%9A%84%E9%83%A8%E7%BD%B2/" title="记一次Vue项目的部署">记一次Vue项目的部署</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Windows/" title="分类于 Windows">Windows</a> <i class="ic i-angle-right"></i> <a href="/categories/Windows/%E5%B7%A5%E5%85%B7/" title="分类于 工具">工具</a></div><span><a href="/2022/11/01/360%E7%8B%AC%E7%AB%8B%E7%89%88%E5%B0%8F%E5%B7%A5%E5%85%B7/" title="360独立版小工具">360独立版小工具</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/%E5%B7%A5%E4%BD%9C/" title="分类于 工作">工作</a> <i class="ic i-angle-right"></i> <a href="/categories/%E5%B7%A5%E4%BD%9C/KLineChart/" title="分类于 KLineChart">KLineChart</a></div><span><a href="/2022/12/02/KLineChart%E5%AE%9E%E7%8E%B0%E8%87%AA%E5%AE%9A%E4%B9%89%E6%8C%87%E6%A0%87%E7%94%BB%E5%9B%BE/" title="KLineChart实现自定义指标画图">KLineChart实现自定义指标画图</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" title="分类于 极空间">极空间</a> <i class="ic i-angle-right"></i> <a href="/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" title="分类于 Docker">Docker</a></div><span><a href="/2022/10/20/%E6%9E%81%E7%A9%BA%E9%97%B4Docker%E7%89%88Wordpress%E5%AE%89%E8%A3%85%E4%B8%8E%E9%85%8D%E7%BD%AE/" title="极空间Docker版Wordpress安装与配置">极空间Docker版Wordpress安装与配置</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/" title="分类于 极空间">极空间</a> <i class="ic i-angle-right"></i> <a href="/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/" title="分类于 Docker">Docker</a> <i class="ic i-angle-right"></i> <a href="/categories/%E6%9E%81%E7%A9%BA%E9%97%B4/Docker/Hexo/" title="分类于 Hexo">Hexo</a></div><span><a href="/2022/09/17/Hexo-Theme-Shoka-algolia%E6%90%9C%E7%B4%A2%E8%B8%A9%E5%9D%91/" title="Hexo + Theme.Shoka + algolia搜索踩坑">Hexo + Theme.Shoka + algolia搜索踩坑</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Windows/" title="分类于 Windows">Windows</a> <i class="ic i-angle-right"></i> <a href="/categories/Windows/%E5%B7%A5%E5%85%B7/" title="分类于 工具">工具</a></div><span><a href="/2022/10/12/%E4%BD%BF%E7%94%A8picgo%E4%B8%8A%E4%BC%A0%E5%9B%BE%E7%89%87%E5%88%B0chevereto/" title="使用PicGo上传图片到chevereto">使用PicGo上传图片到chevereto</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/%E5%B7%A5%E4%BD%9C/" title="分类于 工作">工作</a> <i class="ic i-angle-right"></i> <a href="/categories/%E5%B7%A5%E4%BD%9C/%E8%A7%A3%E5%86%B3%E9%97%AE%E9%A2%98/" title="分类于 解决问题">解决问题</a></div><span><a href="/2024/01/19/IntellIJ%E5%8F%AA%E7%BC%96%E8%AF%91%E6%89%93%E5%8C%85%E6%8C%87%E5%AE%9A%E7%9A%84%E6%A8%A1%E5%9D%97/" title="IntellIJ只编译打包指定的模块">IntellIJ只编译打包指定的模块</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux/" title="分类于 Linux">Linux</a> <i class="ic i-angle-right"></i> <a href="/categories/Linux/Shell/" title="分类于 Shell">Shell</a></div><span><a href="/2022/11/02/2-dev-null%E5%92%8C-dev-null-2-1%E5%92%8C2-1-dev-null%E7%9A%84%E5%8C%BA%E5%88%AB/" title="2&gt;&#x2F;dev&#x2F;null和&gt;&#x2F;dev&#x2F;null 2&gt;&amp;1和2&gt;&amp;1&gt;&#x2F;dev&#x2F;null的区别">2>/dev/null和>/dev/null 2>&1和2>&1>/dev/null的区别</a></span></li><li class="item"><div class="breadcrumb"><a href="/categories/Linux/" title="分类于 Linux">Linux</a> <i class="ic i-angle-right"></i> <a href="/categories/Linux/%E6%9C%8D%E5%8A%A1/" title="分类于 服务">服务</a> <i class="ic i-angle-right"></i> <a href="/categories/Linux/%E6%9C%8D%E5%8A%A1/Nginx/" title="分类于 Nginx">Nginx</a></div><span><a href="/2022/11/30/%E5%B0%86nginx%E6%9B%BF%E6%8D%A2%E4%B8%BAtengine/" title="将nginx替换为tengine">将nginx替换为tengine</a></span></li></ul></div><div><h2>最新评论</h2><ul class="leancloud-recent-comment"></ul></div></div><div class="status"><div class="copyright">&copy; 2010 – <span itemprop="copyrightYear">2026</span> <span class="with-love"><i class="ic i-sakura rotate"></i> </span><span class="author" itemprop="copyrightHolder">Hito Li @ ☆∵∴Hito∴∵★</span></div><div class="count"><span class="post-meta-item-icon"><i class="ic i-chart-area"></i> </span><span title="站点总字数">136k 字</span> <span class="post-meta-divider">|</span> <span class="post-meta-item-icon"><i class="ic i-coffee"></i> </span><span title="站点阅读时长">2:03</span></div><div class="powered-by">基于 <span class="exturl" data-url="aHR0cHM6Ly9oZXhvLmlv">Hexo</span> & Theme.<span class="exturl" data-url="aHR0cHM6Ly9naXRodWIuY29tL2FtZWhpbWUvaGV4by10aGVtZS1zaG9rYQ==">Shoka</span></div></div></div></footer></div><script data-config type="text/javascript">var LOCAL={path:"2023/10/28/Centos挂载新硬盘/",favicon:{show:"(●´3‘●)哎呀呀",hide:"(´Д`)真糟糕!"},search:{placeholder:"文章搜索",empty:"关于 「 ${query} 」,什么也没搜到",stats:"${time} ms 内找到 ${hits} 条结果"},fancybox:!0,copyright:'复制成功,转载请遵守 <i class="ic i-creative-commons"></i>BY-NC-SA 协议。',ignores:[function(e){return e.includes("#")},function(e){return new RegExp(LOCAL.path+"$").test(e)}]}</script><script src="https://nblog.hitoli.com:8443/assets/polyfill.js"></script><script src="https://nblog.hitoli.com:8443/assets/pace.min.js"></script><script src="https://nblog.hitoli.com:8443/assets/pjax.min.js"></script><script src="https://nblog.hitoli.com:8443/assets/fetch.umd.js"></script><script src="https://nblog.hitoli.com:8443/assets/anime.min.js"></script><script src="https://nblog.hitoli.com:8443/assets/algoliasearch-lite.umd.min.js"></script><script src="https://nblog.hitoli.com:8443/assets/instantsearch.production.min.js"></script><script src="https://nblog.hitoli.com:8443/assets/lozad.min.js"></script><script src="https://nblog.hitoli.com:8443/assets/quicklink.umd.min.js"></script><script src="https://nblog.hitoli.com:8443/assets/jquery.min.js,jquery.fancybox.min.js,jquery.justifiedGallery.min.js" async></script><script src="https://nblog.hitoli.com:8443/assets/copy-tex.min.js" async></script><script src="https://nblog.hitoli.com:8443/assets/frappe-charts.min.iife.js"></script><script src="https://nblog.hitoli.com:8443/assets/autosize.min.js,xss.min.js,ua-parser.min.js,tex-svg.js,marked.min.js"></script><script src="/js/app.js?v=0.0.0"></script><script>
// 侧栏「最新评论」:挂在 footer 的 .leancloud-recent-comment 容器(PJAX 不替换 footer,全局渲染一次即可)
// 动态 import 加载 ESM 版 waline.js;普通 <script src> 会报 export 语法错误
(async () => {
try {
const { RecentComments, commentCount } = await import('https://nblog.hitoli.com:8443/assets/waline.js');
RecentComments({
el: '.leancloud-recent-comment',
serverURL: 'https://comment.hitoli.com:8443',
count: 8
})
// 填文章列表/头部的评论数;0 的条目隐藏。PJAX 跳转后由 comment.njk 里重新跑
const fillCounts = () => {
commentCount({ serverURL: 'https://comment.hitoli.com:8443' })
.then(() => {
document.querySelectorAll('.waline-comment-count').forEach(el => {
const item = el.closest('.item') || el.closest('.meta .item');
if (item) item.classList.toggle('no-comment', el.textContent.trim() === '0' || el.textContent.trim() === '');
});
});
};
fillCounts();
// PJAX 跳转后重新填一次(footer 不被替换,但 #main 里的计数元素是新的)
document.addEventListener('pjax:success', fillCounts);
} catch (e) {
console.error('Waline inject failed:', e)
}
})()
</script>
</body></html>