<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; Создание SWAP используя dd]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=29473&amp;type=atom" />
	<updated>2013-08-06T16:29:47Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=29473</id>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357193#p357193" />
			<content type="html"><![CDATA[<p>Я что-то не понял, а зачем раздел забивать нулями? Для создания swap-раздела вроде бы достаточно </p><div class="codebox"><pre><code># mkswap /dev/devicename
swapon /dev/devicename</code></pre></div><p> ну и при необходимости внести изменения в fstab.</p>]]></content>
			<author>
				<name><![CDATA[yars]]></name>
				<uri>https://linuxforum.ru/profile.php?id=22799</uri>
			</author>
			<updated>2013-08-06T16:29:47Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357193#p357193</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357150#p357150" />
			<content type="html"><![CDATA[<p>Может и средствами утилиты dd это можно сделать. Будет время попробую на тестовой системе.</p>]]></content>
			<author>
				<name><![CDATA[tamahcki]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25365</uri>
			</author>
			<updated>2013-08-06T10:54:31Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357150#p357150</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357149#p357149" />
			<content type="html"><![CDATA[<p>Разобрался: </p><p>1. Нужно определить что за разметка на диске. <br />2. Если LVM то </p><p><a href="http://irternus.blogspot.com/2011/07/lvm.html">http://irternus.blogspot.com/2011/07/lvm.html</a> <br /><a href="http://irternus.blogspot.com/2011/07/lvm-swap.html">http://irternus.blogspot.com/2011/07/lvm-swap.html</a><br />Теперь все работает )</p>]]></content>
			<author>
				<name><![CDATA[tamahcki]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25365</uri>
			</author>
			<updated>2013-08-06T10:53:49Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357149#p357149</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357147#p357147" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>tamahcki⇓ пишет:</cite><blockquote><p>Косяк в том что корневой католог / имеется только один. И если&nbsp; и резать место то нужно от него. А для этого его нужно размониторовать unmont . Только что-то мне подсказывать что не стоит размонтировать root каталог ))))</p></blockquote></div><p>Создайте swap не на устройстве, а в файле на смонтированной файловой системе, т.е. примерно так:<br /></p><div class="codebox"><pre><code>dd if=/dev/zero of=/tmp/swap.img bs=1M count=6144
mkswap /tmp/swap.img
swapon /tmp/swap.img</code></pre></div><p>...ну и в <em>/etc/fstab</em> при необходимости дописать.</p>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-08-06T10:07:55Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357147#p357147</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357145#p357145" />
			<content type="html"><![CDATA[<p>/dev/dm-1 у меня есть, но его создаю как понял в логическом разделе размеры которого ограничены. Для этого мне нужно поменять размер логического тома - <br /> ~]# lvdisplay<br />&nbsp; --- Logical volume ---<br />&nbsp; LV Path&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /dev/VolGroup/lv_root<br />&nbsp; LV Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_root<br />&nbsp; VG Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VolGroup<br />&nbsp; LV UUID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; kKjjy7-yDRc-Pggb-QAft-3tSA-gRKY-51p6Ca<br />&nbsp; LV Write Access&nbsp; &nbsp; &nbsp; &nbsp; read/write<br />&nbsp; LV Creation host, time localhost.localdomain, 2013-04-30 09:42:01 +0300<br />&nbsp; LV Status&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; available<br />&nbsp; # open&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1<br />&nbsp; LV Size&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 15.59 GiB<br />&nbsp; Current LE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3990<br />&nbsp; Segments&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1<br />&nbsp; Allocation&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;inherit<br />&nbsp; Read ahead sectors&nbsp; &nbsp; &nbsp;auto<br />&nbsp; - currently set to&nbsp; &nbsp; &nbsp;256<br />&nbsp; Block device&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;253:0<br />&nbsp; &nbsp;<br />&nbsp; --- Logical volume ---<br />&nbsp; LV Path&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; /dev/VolGroup/lv_swap<br />&nbsp; LV Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; lv_swap<br />&nbsp; VG Name&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; VolGroup<br />&nbsp; LV UUID&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; tklE1A-0NAk-ZzkM-HuVX-EwOW-7P9x-2IQA0L<br />&nbsp; LV Write Access&nbsp; &nbsp; &nbsp; &nbsp; read/write<br />&nbsp; LV Creation host, time localhost.localdomain, 2013-04-30 09:42:07 +0300<br />&nbsp; LV Status&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; available<br />&nbsp; # open&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;0<br />&nbsp; LV Size&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 3.92 GiB<br />&nbsp; Current LE&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1004<br />&nbsp; Segments&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1<br />&nbsp; Allocation&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;inherit<br />&nbsp; Read ahead sectors&nbsp; &nbsp; &nbsp;auto<br />&nbsp; - currently set to&nbsp; &nbsp; &nbsp;256<br />&nbsp; Block device&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;253:1</p><p>Нашел статью - <a href="http://irternus.blogspot.com/2011/07/lvm.html">http://irternus.blogspot.com/2011/07/lvm.html</a> где на пальцах объясняется как это сделать. <br />Косяк в том что корневой католог / имеется только один. И если&nbsp; и резать место то нужно от него. А для этого его нужно размониторовать unmont . Только что-то мне подсказывать что не стоит размонтировать root каталог ))))</p>]]></content>
			<author>
				<name><![CDATA[tamahcki]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25365</uri>
			</author>
			<updated>2013-08-06T09:57:33Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357145#p357145</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357144#p357144" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>tamahcki⇓ пишет:</cite><blockquote><p>Но похоже понял в чем дело - у меня логические томы</p></blockquote></div><p>Т.е. устройства <em>/dev/dm-1</em> у вас нет?<br />...как я понял, память забивалась и место заканчивалось.</p><p>P.S. «Копипаст» коварная штука <img src="https://linuxforum.ru/img/smilies/bx.gif" alt="bx" /></p>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-08-06T09:37:08Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357144#p357144</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357143#p357143" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>tamahcki⇓ пишет:</cite><blockquote><p>Так и вводил.</p></blockquote></div><div class="quotebox"><cite>tamahcki⇓ пишет:</cite><blockquote><p># dd if=/dev/zero of=/dev/dm-1 bs=1024 count=6144K</p></blockquote></div><div class="codebox"><pre><code>man dd
...
bs=BYTES
              read and write up to BYTES bytes at a time
...
count=N
              copy only N input blocks</code></pre></div><p>«Буковке» место поменяйте <img src="https://linuxforum.ru/img/smilies/bx.gif" alt="bx" /></p>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-08-06T09:28:47Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357143#p357143</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357141#p357141" />
			<content type="html"><![CDATA[<p>Так и вводил. Но похоже понял в чем дело - у меня логические томы </p><p> ~]# df -h<br />Filesystem&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Size&nbsp; Used Avail Use% Mounted on<br />/dev/mapper/VolGroup-lv_root<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;16G&nbsp; 4.4G&nbsp; &nbsp;11G&nbsp; 30% /<br />tmpfs&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;3.4G&nbsp; &nbsp; &nbsp;0&nbsp; 3.4G&nbsp; &nbsp;0% /dev/shm<br />/dev/xvda1&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 485M&nbsp; &nbsp;94M&nbsp; 366M&nbsp; 21% /boot</p>]]></content>
			<author>
				<name><![CDATA[tamahcki]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25365</uri>
			</author>
			<updated>2013-08-06T09:21:31Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357141#p357141</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357136#p357136" />
			<content type="html"><![CDATA[<p>Покажите вывод<br /></p><div class="codebox"><pre><code>df -h</code></pre></div>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-08-06T09:08:23Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357136#p357136</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357135#p357135" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>tamahcki⇓ пишет:</cite><blockquote><p>dd if=/dev/zero of=/dev/dm-1 bs=1024 count=6144K</p></blockquote></div><p>Вы эту команду именно так вводите или неудачно «скопипастили» из консоли?</p>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2013-08-06T09:06:58Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357135#p357135</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357134#p357134" />
			<content type="html"><![CDATA[<p>Почему удалил раздел swap а не создал дополнительный временный. Так как нужен постоянный раздел swap нужного размера.</p>]]></content>
			<author>
				<name><![CDATA[tamahcki]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25365</uri>
			</author>
			<updated>2013-08-06T08:59:35Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357134#p357134</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Создание SWAP используя dd]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=357133#p357133" />
			<content type="html"><![CDATA[<p>Oracle Linux 64 bit<br />Удалил раздел SWAP в системе. Создаю новый - </p><p> ~]# dd if=/dev/zero of=/dev/dm-1 bs=1024 count=1024K<br />1048576+0 records in<br />1048576+0 records out<br />1073741824 bytes (1.1 GB) copied, 4.1046 s, 262 MB/s</p><p>1.1 Гб swap все верно. Удаляем его и создаем нужного мне размера -</p><p> ~]# rm /dev/dm-1<br />rm: remove regular file `/dev/dm-1&#039;? y</p><p> ~]# dd if=/dev/zero of=/dev/dm-1 bs=1024 count=6144K<br />dd: writing `/dev/dm-1&#039;: No space left on device<br />3521937+0 records in<br />3521936+0 records out<br />3606462464 bytes (3.6 GB) copied, 13.845 s, 260 MB/s</p><p>Какой бы размер не прописывал в count больше 3.6 Гб диск не создается. <br />Свободного места 11 Гб. После создания SWAP должно остаться 5 Гб свободного места.</p>]]></content>
			<author>
				<name><![CDATA[tamahcki]]></name>
				<uri>https://linuxforum.ru/profile.php?id=25365</uri>
			</author>
			<updated>2013-08-06T08:58:17Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=357133#p357133</id>
		</entry>
</feed>
