<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>APFS &#8211; mylogs.cn</title>
	<atom:link href="https://mylogs.cn/tag/apfs/feed/" rel="self" type="application/rss+xml" />
	<link>https://mylogs.cn</link>
	<description>发现、记录、分享</description>
	<lastBuildDate>Fri, 14 Aug 2026 02:00:22 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Mac 存储被微信吃光，聊天记录这样搬到外置盘</title>
		<link>https://mylogs.cn/mac-%e5%ad%98%e5%82%a8%e8%a2%ab%e5%be%ae%e4%bf%a1%e5%90%83%e5%85%89%ef%bc%8c%e8%81%8a%e5%a4%a9%e8%ae%b0%e5%bd%95%e8%bf%99%e6%a0%b7%e6%90%ac%e5%88%b0%e5%a4%96%e7%bd%ae%e7%9b%98/</link>
		
		<dc:creator><![CDATA[steve, zhang]]></dc:creator>
		<pubDate>Fri, 14 Aug 2026 02:00:22 +0000</pubDate>
				<category><![CDATA[经验与技巧]]></category>
		<category><![CDATA[APFS]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[macOS]]></category>
		<category><![CDATA[存储扩容]]></category>
		<category><![CDATA[微信]]></category>
		<guid isPermaLink="false">https://mylogs.cn/mac-%e5%ad%98%e5%82%a8%e8%a2%ab%e5%be%ae%e4%bf%a1%e5%90%83%e5%85%89%ef%bc%8c%e8%81%8a%e5%a4%a9%e8%ae%b0%e5%bd%95%e8%bf%99%e6%a0%b7%e6%90%ac%e5%88%b0%e5%a4%96%e7%bd%ae%e7%9b%98/</guid>

					<description><![CDATA[入门配置的 Mac mini 只有 256GB 存储，微信聊天记录却会随着图片、视频和文件不断膨胀，很快把可用 [&#8230;]]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph">入门配置的 Mac mini 只有 256GB 存储，微信聊天记录却会随着图片、视频和文件不断膨胀，很快把可用空间挤干。常见思路是把微信数据目录换成指向外置硬盘的符号链接（一种指向其他位置的路径快捷方式），但 Mac App Store 版微信运行在 App Sandbox（应用沙盒，系统为应用划定的活动范围）里，系统会解析链接的真实目标，外置盘上的目标拿不到访问权限。另一种流行做法是用 <code>codesign</code> 给微信重新签名再授权，代价是改变了应用原有签名状态，每次微信更新后都可能要重做。</p>



<figure data-wp-context="{&quot;imageId&quot;:&quot;6a7e9feb217c3&quot;}" data-wp-interactive="core/image" data-wp-key="6a7e9feb217c3" class="wp-block-image size-large aligncenter wp-lightbox-container"><img fetchpriority="high" decoding="async" width="1200" height="900" data-wp-class--hide="state.isContentHidden" data-wp-class--show="state.isContentVisible" data-wp-init="callbacks.setButtonStyles" data-wp-on--click="actions.showLightbox" data-wp-on--load="callbacks.setButtonStyles" data-wp-on--pointerdown="actions.preloadImage" data-wp-on--pointerenter="actions.preloadImageWithDelay" data-wp-on--pointerleave="actions.cancelPreload" data-wp-on-window--resize="callbacks.setButtonStyles" src="https://mylogs.cn/wp-content/uploads/2026/08/041d880259b216d2e885d2cdee10b50e_header.webp" alt="Mac 存储被微信吃光，聊天记录这样搬到外置盘" class="wp-image-4784" style="max-width:100%;height:auto;" srcset="https://mylogs.cn/wp-content/uploads/2026/08/041d880259b216d2e885d2cdee10b50e_header.webp 1200w, https://mylogs.cn/wp-content/uploads/2026/08/041d880259b216d2e885d2cdee10b50e_header-300x225.webp 300w, https://mylogs.cn/wp-content/uploads/2026/08/041d880259b216d2e885d2cdee10b50e_header-1024x768.webp 1024w, https://mylogs.cn/wp-content/uploads/2026/08/041d880259b216d2e885d2cdee10b50e_header-768x576.webp 768w" sizes="(max-width: 1200px) 100vw, 1200px" /><button
			class="lightbox-trigger"
			type="button"
			aria-haspopup="dialog"
			data-wp-bind--aria-label="state.thisImage.triggerButtonAriaLabel"
			data-wp-init="callbacks.initTriggerButton"
			data-wp-on--click="actions.showLightbox"
			data-wp-style--right="state.thisImage.buttonRight"
			data-wp-style--top="state.thisImage.buttonTop"
		>
			<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" fill="none" viewBox="0 0 12 12">
				<path fill="#fff" d="M2 0a2 2 0 0 0-2 2v2h1.5V2a.5.5 0 0 1 .5-.5h2V0H2Zm2 10.5H2a.5.5 0 0 1-.5-.5V8H0v2a2 2 0 0 0 2 2h2v-1.5ZM8 12v-1.5h2a.5.5 0 0 0 .5-.5V8H12v2a2 2 0 0 1-2 2H8Zm2-12a2 2 0 0 1 2 2v2h-1.5V2a.5.5 0 0 0-.5-.5H8V0h2Z" />
			</svg>
		</button><figcaption class="wp-element-caption">图片来源：少数派</figcaption></figure>





<p class="wp-block-paragraph">少数派撰稿人 wclebb 分享了第三条路：单独建一个 APFS 宗卷（macOS 的存储单元，可共享容器空闲空间），直接挂载到微信容器内的聊天数据目录。对微信来说路径没变，对 macOS 来说这个目录已经落在外置盘上。该方案适合外置盘长期连接、且已是 APFS 格式的场景；经常拔盘带机外出的用户，定期导出记录更稳妥。操作会改动宗卷挂载位置和 <code>/etc/fstab</code>，标识符或路径填错可能让微信找不到记录，动手前务必退出微信并留一份完整备份。</p>



<h2 class="wp-block-heading">一、创建 APFS 宗卷</h2>



<ol class="wp-block-list"><li>打开「磁盘工具」，选中外置 APFS 容器，点击工具栏的「添加宗卷」。</li><li>名称填 WeChatData，格式选「APFS，不区分大小写」，保留大小与配额都留空——APFS 宗卷共享容器可用空间，不必像传统分区那样预先划死容量。</li><li>在「终端」执行 <code>diskutil info "/Volumes/WeChatData"</code>，记下设备标识符（形如 disk7s2）和宗卷 UUID。</li></ol>



<h2 class="wp-block-heading">二、复制聊天数据</h2>



<ol class="wp-block-list"><li>彻底退出微信。</li><li>用系统自带的 <code>ditto --rsrc --extattr</code> 复制，保留目录结构和扩展属性，源路径为 <code>~/Library/Containers/com.tencent.xinWeChat/Data/Documents/xwechat_files</code>，目标为 <code>/Volumes/WeChatData</code>。</li><li>核对两侧文件数量和占用空间大致一致后，把原 xwechat_files 改名成 xwechat_files-backup，先别删除。</li></ol>



<p class="wp-block-paragraph">宗卷根目录应直接出现 all_users、Backup、用户名开头的目录，不应再多套一层 xwechat_files。</p>



<h2 class="wp-block-heading">三、把宗卷挂载到数据目录</h2>



<ol class="wp-block-list"><li>用 <code>mkdir</code> 重新建一个空的 xwechat_files 目录当挂载点。</li><li>先 <code>diskutil unmount disk7s2</code>，再 <code>diskutil mount -mountPoint "上述空目录路径" disk7s2</code>。</li><li>执行 <code>diskutil info disk7s2</code>，确认输出里的 Mount Point 正是该路径；挂载点不对时不要启动微信。</li></ol>



<p class="wp-block-paragraph">挂载层级不能上移。实测挂到容器的 Data 或 Data/Documents 会触发容器完整性检查、导致微信崩溃，只有挂到 Data/Documents/xwechat_files 才能正常运行。</p>



<h2 class="wp-block-heading">四、验证并固定挂载</h2>



<ol class="wp-block-list"><li>启动微信，逐项检查聊天列表是否完整、不同日期的图片和文件能否打开、搜索是否正常、新消息能否写入，最后完整退出再重启一次。若微信像刚安装一样显示空列表，立即退出。</li><li>手动挂载在重启或重新插盘后会失效。用 <code>sudo vifs</code> 编辑 fstab，加一行 <code>UUID=宗卷UUID /Users/用户名/Library/Containers/com.tencent.xinWeChat/Data/Documents/xwechat_files apfs rw,nobrowse 0 0</code>。其中 rw 表示读写挂载，nobrowse 只是隐藏 Finder 里的宗卷图标，不影响读写。</li><li>外置盘没接时，底层空目录会重新出现，微信可能在本机另建一套空数据。可在退出微信、卸载宗卷的状态下对该空目录执行 <code>chmod 000</code>，宗卷挂上后会覆盖这层权限，盘缺席时微信则写不进去。</li></ol>



<p class="wp-block-paragraph">需要提醒的是，迁移的是微信工作数据，不等同于备份，外置盘损坏数据依然会丢，仍需另存一份。上述步骤的测试环境为 macOS 26.5.2 与 Mac App Store 版微信 4.1.11。</p>



<p class="wp-block-paragraph">来源：少数派</p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
