<?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>crontab &#8211; 编码无悔 /  Intent &amp; Focused</title>
	<atom:link href="https://www.codelast.com/tag/crontab/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.codelast.com</link>
	<description>最优化之路</description>
	<lastBuildDate>Sun, 03 May 2020 12:39:41 +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>
	</channel>
</rss>
