<?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>VMware &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/tag/vmware/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Sun, 03 May 2020 12:47:08 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.9.4</generator>
	<item>
		<title>[原创]VMware EXSi磁盘容量上限</title>
		<link>https://www.codelast.com/%e5%8e%9f%e5%88%9bvmware-exsi%e7%a3%81%e7%9b%98%e5%ae%b9%e9%87%8f%e4%b8%8a%e9%99%90/</link>
					<comments>https://www.codelast.com/%e5%8e%9f%e5%88%9bvmware-exsi%e7%a3%81%e7%9b%98%e5%ae%b9%e9%87%8f%e4%b8%8a%e9%99%90/#respond</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Fri, 11 Feb 2011 07:03:14 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[2T]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[EXSi]]></category>
		<category><![CDATA[harddisk]]></category>
		<category><![CDATA[limit]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[vswp]]></category>
		<category><![CDATA[上限]]></category>
		<category><![CDATA[交换文件]]></category>
		<category><![CDATA[任务]]></category>
		<category><![CDATA[容量]]></category>
		<category><![CDATA[磁盘]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=1158</guid>

					<description><![CDATA[<p>
	<br />
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">在一台做了Raid、只有一个&#62;7TB的磁盘（之所以会这么大，是因为用Raid把N块物理硬盘做成了一块虚拟硬盘）的服务器上，安装了VMware EXSi后，发现数据存储可用空间只有1.27TB，神奇，另外的6T多空间哪去了呢？如下图：</span></span></p>
<p>
<span id="more-1158"></span></p>
<p style="text-align: center; ">
	<img fetchpriority="high" decoding="async" alt="VMFS" height="414" src="http://www.codelast.com/wp-content/uploads/2011/02/VMFS.png" width="600" /></p>
<p>
	可见，物理磁盘总共有7.28TB的空间，而VMware可用的数据存储区只有1.27TB，并且，当点击上方的&#8220;增加&#8221;按钮来增加存储空间时，发现没有任何可以添加的：</p>
<p style="text-align: center; ">
	<img decoding="async" alt="VMFS_添加数据存储容量" height="403" src="http://www.codelast.com/wp-content/uploads/2011/02/VMFS_Add.png" width="520" /></p>
<p>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255);">http://www.codelast.com/</span></a></p>
<p>
	这是因为我只有一块7.28T的磁盘（在底层，是通过Raid卡将N块物理硬盘做成一块虚拟磁盘的，所以实际上软件层看到的就只有一块物理磁盘），所以无法添加任何存储空间。</p>
<p>
	那么，到底VMware ESXi支持多大的单个逻辑单元（LUN）呢？网上的大多数说法是2TB，超过了2TB的话，就除以2取余数，因此我上面的7.28TB最后就变成了1.27TB。</p>
<p>
	所以，如果你想要使用完你全部的磁盘空间，就需要在Raid中（如果做了Raid的话）按最大2TB来分成N个虚拟磁盘，然后再把它们全部&#8220;添加&#8221;到VMware ESXi中。</p>
<p>
	&#160;</p>
<p>
	&#160;</p>
<p>
	<span style="color:#00f;">另附两个VMware ESXi的技巧（来自于网上）</span>：</p>
<p>
	<span style="color:#f00;">（1</span><span style="color:#f00;">）</span><span style="color:#800080;">向VMware ESXi中添加crontab任务的方法</span>：点击<a href="http://www.jules.fm/Logbook/files/add_cron_job_vmware.html" target="_blank" rel="noopener noreferrer">这个链接</a>。</p>
<p>
	在VMware ESXi中添加crontab任务可不像通常的Linux系统一样简单，所以，不要凭空想像，具体操作方法请看上面的链接吧。下面把它摘录如下：</p>
<p></p>
<div>
	<span style="color:#006400;">This explains how to add a cron job to VMware in such a way that it will still be there after reboots.</span></div>&#8230; <a href="https://www.codelast.com/%e5%8e%9f%e5%88%9bvmware-exsi%e7%a3%81%e7%9b%98%e5%ae%b9%e9%87%8f%e4%b8%8a%e9%99%90/" class="read-more">Read More </a>]]></description>
										<content:encoded><![CDATA[<p>
	<br />
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">在一台做了Raid、只有一个&gt;7TB的磁盘（之所以会这么大，是因为用Raid把N块物理硬盘做成了一块虚拟硬盘）的服务器上，安装了VMware EXSi后，发现数据存储可用空间只有1.27TB，神奇，另外的6T多空间哪去了呢？如下图：</span></span></p>
<p>
<span id="more-1158"></span></p>
<p style="text-align: center; ">
	<img decoding="async" alt="VMFS" height="414" src="http://www.codelast.com/wp-content/uploads/2011/02/VMFS.png" width="600" /></p>
<p>
	可见，物理磁盘总共有7.28TB的空间，而VMware可用的数据存储区只有1.27TB，并且，当点击上方的&ldquo;增加&rdquo;按钮来增加存储空间时，发现没有任何可以添加的：</p>
<p style="text-align: center; ">
	<img loading="lazy" decoding="async" alt="VMFS_添加数据存储容量" height="403" src="http://www.codelast.com/wp-content/uploads/2011/02/VMFS_Add.png" width="520" /></p>
<p>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255);">http://www.codelast.com/</span></a></p>
<p>
	这是因为我只有一块7.28T的磁盘（在底层，是通过Raid卡将N块物理硬盘做成一块虚拟磁盘的，所以实际上软件层看到的就只有一块物理磁盘），所以无法添加任何存储空间。</p>
<p>
	那么，到底VMware ESXi支持多大的单个逻辑单元（LUN）呢？网上的大多数说法是2TB，超过了2TB的话，就除以2取余数，因此我上面的7.28TB最后就变成了1.27TB。</p>
<p>
	所以，如果你想要使用完你全部的磁盘空间，就需要在Raid中（如果做了Raid的话）按最大2TB来分成N个虚拟磁盘，然后再把它们全部&ldquo;添加&rdquo;到VMware ESXi中。</p>
<p>
	&nbsp;</p>
<p>
	&nbsp;</p>
<p>
	<span style="color:#00f;">另附两个VMware ESXi的技巧（来自于网上）</span>：</p>
<p>
	<span style="color:#f00;">（1</span><span style="color:#f00;">）</span><span style="color:#800080;">向VMware ESXi中添加crontab任务的方法</span>：点击<a href="http://www.jules.fm/Logbook/files/add_cron_job_vmware.html" target="_blank" rel="noopener noreferrer">这个链接</a>。</p>
<p>
	在VMware ESXi中添加crontab任务可不像通常的Linux系统一样简单，所以，不要凭空想像，具体操作方法请看上面的链接吧。下面把它摘录如下：</p>
<p></p>
<div>
	<span style="color:#006400;">This explains how to add a cron job to VMware in such a way that it will still be there after reboots.</span></div>
<div>
	<span style="color:#006400;">Having enabled ssh access to your ESX/ESXi server, ssh in as root.</span></div>
<div>
	&nbsp;</div>
<div>
	<span style="color:#006400;">Firstly, add the cron job to the root crontab:</span></div>
<div>
	<span style="color:#006400;">(1)Edit /var/spool/cron/crontabs/root</span></div>
<div>
	<span style="color:#006400;">(2)Add the line (all on one line)</span></div>
<div>
	<span style="color:#006400;">5 0 * * * /full/path/to/script arguments/with/full/path &gt; /full/path/to/logfile 2&gt;&amp;1</span></div>
<div>
	<span style="color:#006400;">(3)Run the command &quot;cat /var/run/crond.pid&quot;</span></div>
<div>
	<span style="color:#006400;">That will print the process number of the running crond, such as 12345</span></div>
<div>
	<span style="color:#006400;">(4)Run the command &quot;kill 12345&quot;</span></div>
<div>
	<span style="color:#006400;">where &quot;12345&quot; should be replaced with the number output by the previous command</span></div>
<div>
	&nbsp;</div>
<div>
	<span style="color:#006400;">For details of the meaning of &quot;5 0 * * *&quot; (5 minutes past midnight every day) read the man page for crontab(5) on any Unix/Linux server, or else on the web.</span></div>
<div>
	&nbsp;</div>
<div>
	<span style="color:#006400;">Now, add a command to /etc/rc.local to re-generate the cron job when ESX/ESXi reboots</span></div>
<div>
	<span style="color:#006400;">(1)Edit /etc/rc.local, using a command such as &quot;vi /etc/rc.local&quot;.</span></div>
<div>
	<span style="color:#006400;">(2)At the end of the file, add 3 lines (using &quot;G&quot; then &quot;O&quot; in vi). The first kills crond, the second adds the new cron job to the root crontab file, ad the third restarts crond:</span></div>
<div>
	<span style="color:#006400;">/bin/kill $(cat /var/run/crond.pid)</span></div>
<div>
	<span style="color:#006400;">/bin/echo &#39;5 0 * * * /full/path/to/script arguments/with/full/path &gt; /full/path/to/logfile 2&gt;&amp;1&#39; &gt;&gt; /var/spool/cron/crontabs/root</span></div>
<div>
	<span style="color:#006400;">/bin/busybox crond</span></div>
<div>
	<span style="color:#006400;">(3)Save and exit the editor (Press the &quot;Esc&quot; key then &quot;:wq&quot; then press &quot;Return&quot; in vi)</span></div>
<div>
	<span style="color:#006400;">(4)Run the command &quot;auto-backup.sh&quot; so that the change to /etc/rc.local survives a reboot.</span></div>
<div>
	&nbsp;</div>
<div>
	<span style="color:#006400;">Every time you change the cron job, remember to update /etc/rc.local as well and run the &quot;auto-backup.sh&quot; command to backup the new /etc/rc.local file.</span></div>
<p>
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="http://www.codelast.com/" target="_blank" rel="noopener noreferrer"><span style="color: rgb(255, 255, 255);">http://www.codelast.com/</span></a><br />
	<span style="color:#f00;">（2）</span>如<span style="color:#800080;">何在VMware ESX里指定交换文件（swapfile）的不同位置</span>：</p>
<p>
	<font class="Apple-style-span" face="arial, helvetica, sans-serif">你可以在VMware ESX 3.5里为你的虚拟机指定不同交换文件的位置。此位置可以设为是在ESX主机上的一个全局的虚拟机vswp文件。vswp文件是在虚拟机开机时创建的。当你关闭虚拟机后vswp文件被自动删除。此文件只有当主机使用了其所有的物理内存后才使用。</font></p>
<p>
	<font class="Apple-style-span" face="arial, helvetica, sans-serif">vswp文件的大小与你虚拟机RAM相等。你也可以在虚拟机上使用&ldquo;内存预留&rdquo;功能，这将减少vswp文件的大小。 vswp文件的大小 = VM的内存量 &ndash; &ldquo;内存预留&rdquo;的大小。比方说，你给VM的RAM是1024MB，和&ldquo;内存预留&rdquo;512MB，那么该VSWP文件将是512MB。</font></p>
<p>
	<font class="Apple-style-span" face="arial, helvetica, sans-serif">更改此设置，在VI客户上进入Configuration &ndash; Virtual Machine Swap File Location。你也可以更改设置存储vswp文件到另一台数据存储上。但是请记住，如果ESX主机不能连接到你选择的数据存储，那么vMotion和DRS将无法工作。你还可以通过编辑虚拟机的vmx文件来指定其他的位置。</font></p>
<p>
	<br />
	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/%e5%8e%9f%e5%88%9bvmware-exsi%e7%a3%81%e7%9b%98%e5%ae%b9%e9%87%8f%e4%b8%8a%e9%99%90/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>VMware下新添加一块磁盘后：Disk /dev/sdb doesn&#039;t contain a valid partition table</title>
		<link>https://www.codelast.com/vmware%e4%b8%8b%e6%96%b0%e6%b7%bb%e5%8a%a0%e4%b8%80%e5%9d%97%e7%a3%81%e7%9b%98%e5%90%8e%ef%bc%9adisk-devsdb-doesnt-contain-a-valid-partition-table/</link>
					<comments>https://www.codelast.com/vmware%e4%b8%8b%e6%96%b0%e6%b7%bb%e5%8a%a0%e4%b8%80%e5%9d%97%e7%a3%81%e7%9b%98%e5%90%8e%ef%bc%9adisk-devsdb-doesnt-contain-a-valid-partition-table/#comments</comments>
		
		<dc:creator><![CDATA[learnhard]]></dc:creator>
		<pubDate>Wed, 12 Jan 2011 04:01:25 +0000</pubDate>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[原创]]></category>
		<category><![CDATA[contain a valid partition table]]></category>
		<category><![CDATA[disk]]></category>
		<category><![CDATA[VMware]]></category>
		<category><![CDATA[分区]]></category>
		<category><![CDATA[添加磁盘]]></category>
		<guid isPermaLink="false">http://www.codelast.com/?p=1041</guid>

					<description><![CDATA[<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">在VMware管理界面中为一台Linux虚拟机新添加一块虚拟磁盘后，在系统中查看：</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">fdisk -l</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">然后将其格式化为ext3：</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">mkfs.ext3 /dev/sdb</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">然后挂载到某个目录下，例如 /mnt/disk2/ ：</span></span></p>
<p>
<span id="more-1041"></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">mount /dev/sdb /mnt/disk2/&#160;</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">然后再将&#8220;挂载&#8221;动作添加到开机执行中<br />
	<span style="color:#00f;">vi&#160;/etc/fstab</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">添加一行：</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">/dev/sdb &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160;/mnt/disk2 &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; &#160; ext3 &#160; &#160;defaults &#160; &#160; &#160; &#160;0 1</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">重启，以为没问题了？fdisk -l看看，竟然有这样的错误提示：</span></span></p>
<p>
	<span style="color:#00f;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Disk /dev/sdb doesn&#39;t contain a valid partition table</span></span></span></p>
<p>
	<strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(46, 46, 46); border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(255, 255, 255); font-weight: normal; line-height: 20px; ">文章来源：http://www.codelast.com/</span></span></span></strong>&#8230; <a href="https://www.codelast.com/vmware%e4%b8%8b%e6%96%b0%e6%b7%bb%e5%8a%a0%e4%b8%80%e5%9d%97%e7%a3%81%e7%9b%98%e5%90%8e%ef%bc%9adisk-devsdb-doesnt-contain-a-valid-partition-table/" class="read-more">Read More </a></p>]]></description>
										<content:encoded><![CDATA[<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">在VMware管理界面中为一台Linux虚拟机新添加一块虚拟磁盘后，在系统中查看：</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">fdisk -l</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">然后将其格式化为ext3：</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">mkfs.ext3 /dev/sdb</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">然后挂载到某个目录下，例如 /mnt/disk2/ ：</span></span></p>
<p>
<span id="more-1041"></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">mount /dev/sdb /mnt/disk2/&nbsp;</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">然后再将&ldquo;挂载&rdquo;动作添加到开机执行中<br />
	<span style="color:#00f;">vi&nbsp;/etc/fstab</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">添加一行：</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="color:#00f;"><span style="font-size:14px;">/dev/sdb &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/mnt/disk2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ext3 &nbsp; &nbsp;defaults &nbsp; &nbsp; &nbsp; &nbsp;0 1</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">重启，以为没问题了？fdisk -l看看，竟然有这样的错误提示：</span></span></p>
<p>
	<span style="color:#00f;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Disk /dev/sdb doesn&#39;t contain a valid partition table</span></span></span></p>
<p>
	<strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(46, 46, 46); border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(255, 255, 255); font-weight: normal; line-height: 20px; ">文章来源：http://www.codelast.com/</span></span></span></strong></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;">咋回事？因为分区表没有更新。你需要这样做：</span></p>
<p>
	<span style="color:#00f;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">fdisk /dev/sdb</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">跟着向导一步步做下去（如果不知道该输入什么，就输入&ldquo;m&rdquo;并回车，可以打印出菜单）：</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Command (m for help): <strong><span style="color:#f00;">m</span></strong></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Command action</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; a &nbsp; toggle a bootable flag</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; b &nbsp; edit bsd disklabel</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; c &nbsp; toggle the dos compatibility flag</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; d &nbsp; delete a partition</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; l &nbsp; list known partition types</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; m &nbsp; print this menu</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; n &nbsp; add a new partition</span></span></p>
<p>
	<font class="Apple-style-span" face="arial, helvetica, sans-serif">（后面的菜单省略，太长了）</font></p>
<p>
	<span style="color:#00f;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">这里我们要添加一个新的分区，所以输入&ldquo;n&rdquo;：</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Command (m for help): <strong><span style="color:#f00;">n</span></strong></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Command action</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; e &nbsp; extended</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; p &nbsp; primary partition (1-4)</span></span></p>
<p>
	<strong><span style="color:#f00;"><span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">p</span></span></span></strong></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Partition number (1-4): <strong><span style="color:#f00;">1</span></strong></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">First cylinder (1-14098, default 1): <span style="color:#f00;">（此处直接回车）</span></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Using default value 1</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Last cylinder or +size or +sizeM or +sizeK (1-14098, default 14098):&nbsp;</span></span>（此处直接回车）</p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Using default value 14098</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Command (m for help): <strong><span style="color:#f00;">p</span></strong></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Disk /dev/sdb: 115.9 GB, 115964116992 bytes</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">255 heads, 63 sectors/track, 14098 cylinders</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Units = cylinders of 16065 * 512 = 8225280 bytes</span></span></p>
<p>
	&nbsp;</p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">&nbsp;&nbsp; Device Boot &nbsp; &nbsp; &nbsp;Start &nbsp; &nbsp; &nbsp; &nbsp; End &nbsp; &nbsp; &nbsp;Blocks &nbsp; Id &nbsp;System</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">/dev/sdb1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1 &nbsp; &nbsp; &nbsp; 14098 &nbsp; 113242153+ &nbsp;83 &nbsp;Linux</span></span></p>
<p>
	现在可以写入分区表了，所以输入&ldquo;w&rdquo;：</p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Command (m for help): <strong><span style="color:#f00;">w</span></strong></span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">The partition table has been altered!</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Calling ioctl() to re-read partition table.</span></span></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">Syncing disks.</span></span></p>
<p>
	<strong style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; color: rgb(46, 46, 46); border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(0, 0, 255); "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; "><span style="border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 13px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; outline-width: 0px; outline-style: initial; outline-color: initial; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-style: initial; border-color: initial; border-style: initial; border-color: initial; border-style: initial; border-color: initial; color: rgb(255, 255, 255); font-weight: normal; line-height: 20px; ">文章来源：http://www.codelast.com/</span></span></span></strong></p>
<p>
	<span style="font-family:arial,helvetica,sans-serif;"><span style="font-size:14px;">现在你再看看fdisk -l的结果，是不是没有错误提示了？问题解决。</span></span></p>
<p>	<span style="color: rgb(255, 255, 255);">文章来源：</span><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><span style="color: rgb(255, 255, 255);">https://www.codelast.com/</span></a><br />
	<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;版权声明&nbsp;<span style="color: rgb(255, 0, 0);">➤➤</span>&nbsp;<br />
	转载需注明出处：<u><a href="https://www.codelast.com/" rel="noopener noreferrer" target="_blank"><em><span style="color: rgb(0, 0, 255);"><strong style="font-size: 16px;"><span style="font-family: arial, helvetica, sans-serif;">codelast.com</span></strong></span></em></a></u>&nbsp;<br />
	感谢关注我的微信公众号（微信扫一扫）：</p>
<p style="border: 0px; font-size: 13px; margin: 0px 0px 9px; outline: 0px; padding: 0px; color: rgb(77, 77, 77);">
	<img decoding="async" alt="wechat qrcode of codelast" src="https://www.codelast.com/codelast_wechat_qr_code.jpg" style="width: 200px; height: 200px;" /></p>
<p>
	<span style="color:#fff;">NULL</span></p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.codelast.com/vmware%e4%b8%8b%e6%96%b0%e6%b7%bb%e5%8a%a0%e4%b8%80%e5%9d%97%e7%a3%81%e7%9b%98%e5%90%8e%ef%bc%9adisk-devsdb-doesnt-contain-a-valid-partition-table/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
	</channel>
</rss>
