{"id":4,"date":"2012-03-04T15:38:08","date_gmt":"2012-03-04T14:38:08","guid":{"rendered":"http:\/\/esxi-v34\/wordpress\/?p=4"},"modified":"2013-01-26T17:39:14","modified_gmt":"2013-01-26T16:39:14","slug":"volume-management-in-zfs","status":"publish","type":"post","link":"\/wordpress\/zfs-2\/volume-management-in-zfs\/","title":{"rendered":"Volume management in ZFS"},"content":{"rendered":"<p>This is ideal for creating LUN&#8217;s over iSCSI or locally.<\/p>\n<pre><code>zfs create -s -V 2G raid5\/volume1<\/code><\/pre>\n<p>This will create a 2Gb volume on the zpool raid5 with thin provisioning.<\/p>\n<pre><code>newfs \/dev\/zvol\/raid5\/volume1<\/code><\/pre>\n<p>Creates a ufs filesystem with default settings on the volume just created.<\/p>\n<pre><code>mount \/dev\/zvol\/raid5\/volume1 \/mnt\/tmp<\/code><\/pre>\n<p>Mounts it as <code>\/mnt\/tmp<\/code><\/p>\n<pre><code>mount|grep volume1<\/code><\/pre>\n<p>Note how it only takes up a couple of kilobytes.<\/p>\n<pre><code>dd if=\/dev\/zero of=\/mnt\/tmp\/testfile bs=4096 count=1024<\/code>\r\n<code>mount|grep volume1<\/code><\/pre>\n<p>Note how it now just takes up a bit over 4Mb. To grow and shrink the volume use the following<\/p>\n<pre><code>zfs set volsize=4G raid5\/volume1<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This is ideal for creating LUN&#8217;s over iSCSI or locally. zfs create -s -V 2G raid5\/volume1 This will create a 2Gb volume on the zpool raid5 with thin provisioning. newfs \/dev\/zvol\/raid5\/volume1 Creates a ufs filesystem with default settings on the volume just created. mount \/dev\/zvol\/raid5\/volume1 \/mnt\/tmp Mounts it as \/mnt\/tmp mount|grep volume1 Note how it <span class=\"ellipsis\">&hellip;<\/span> <span class=\"more-link-wrap\"><a href=\"\/wordpress\/zfs-2\/volume-management-in-zfs\/\" class=\"more-link\"><span>Read More &rarr;<\/span><\/a><\/span><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[6],"tags":[3,5,4,2],"_links":{"self":[{"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/posts\/4"}],"collection":[{"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/comments?post=4"}],"version-history":[{"count":5,"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/posts\/4\/revisions"}],"predecessor-version":[{"id":53,"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/posts\/4\/revisions\/53"}],"wp:attachment":[{"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/media?parent=4"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/categories?post=4"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wp.strahlert.net\/wordpress\/wp-json\/wp\/v2\/tags?post=4"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}