<?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>ssd &#8211; Giovanni F. Mazzeo De Santolo</title>
	<atom:link href="https://desantolo.com/tag/ssd/feed/" rel="self" type="application/rss+xml" />
	<link>https://desantolo.com</link>
	<description>That italian IT guy</description>
	<lastBuildDate>Sun, 27 Dec 2020 05:38:52 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.2</generator>
<site xmlns="com-wordpress:feed-additions:1">123042357</site>	<item>
		<title>Install proxmox on a partition instead of a full-disk</title>
		<link>https://desantolo.com/2017/06/zfs-proxmox-on-a-partition-instead-of-a-full-disk/</link>
		
		<dc:creator><![CDATA[Giovanni]]></dc:creator>
		<pubDate>Sun, 11 Jun 2017 11:24:31 +0000</pubDate>
				<category><![CDATA[Guides]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Proxmox]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Virtualization]]></category>
		<category><![CDATA[freenas]]></category>
		<category><![CDATA[proxmox]]></category>
		<category><![CDATA[ssd]]></category>
		<category><![CDATA[zfs]]></category>
		<guid isPermaLink="false">https://desantolo.com/?p=532</guid>

					<description><![CDATA[By default, installing Proxmox with ZFS during the installation process will force you to use the entire disk for the root zpool. For most installs this is good enough. However, I like to do things differently sometimes. I have a &#8230; <a href="https://desantolo.com/2017/06/zfs-proxmox-on-a-partition-instead-of-a-full-disk/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
										<content:encoded><![CDATA[<p>By default, installing Proxmox with ZFS during the installation process will force you to use the entire disk for the root zpool. For most installs this is good enough. However, I like to do things differently sometimes.</p>
<p>I have a pair of Samsung 840 Pro 256GB SSDs that I wanted to use for my new homelab that I am currently building (moving from vmware to proxmox). You may be wondering why I want to install the operating system on a partition instead of an entire disk. Several reasons:<br />
<span id="more-532"></span><br />
1. Proxmox (ZFS-on-Linux) does not yet support SSD TRIM, FreeBSD does support it so migrating from FreeNAS into Proxmox I should be aware of it.<br />
2. Data redundancy for the root filesystem does not need to be large. Even if I do RAID1 with my two SSDs I won&#8217;t be storing my critical data or VMs in the rpool &#8211; I want a smaller sized root pool that has fault-tolerance (RAID1). A partition of 60GB mirrored in two SSDs should fit the bill here.<br />
3. ZIL Intent Log experimentation, I also want to experiment by using the same two SSDs to speed up my ZFS writes. I want a small partition in a stripe (RAID0) for performance, 45GB total (22.5gb per ssd) is plenty for this.<br />
4. The left over unused space will be left untouched so that the SSD will have more available blocks during the controller&#8217;s built-in garbage collection (not the same as TRIM)</p>
<p>I don&#8217;t have enough time to go into a lot of details (it&#8217;s past 4am), so I will get to how to do it. If you are trying to follow my same steps, you will need at least 3 hard drives.</p>
<p>1. On a hard drive or device you don&#8217;t care to use in the final outcome, install Proxmox as you would normally. Wipe the entire partition table and let it install RAID0 on the whole disk.<br />
2. Boot into your new installation, have the two new disks you want to keep attached to the system and ensure linux sees them fdisk should help with this.<br />
3. You will now need to create the partitions on the new disks (not rpool):</p>
<p>You will need to know how to calculate hard disk sectors and multiply by your block size. I don&#8217;t have time to go over it but I will do a quick TL;DR example to give you an idea:</p>
<p>We want 25GB slice so that is around 25000000000 bytes / 512 (block size) = 48828125 total sectors to allocate this storage amount.</p>
<p>Take a look at the partition table to make sure you create something similar, fdisk -l /dev/sd$ (your rpool disk). We will leave 8MB disk at the end of the partition, Proxmox by default creates 3 partitions: GRUB_BOOT, ZFS data, Solaris 8MB.</p>
<p>This command creates the partitions for my new array, I&#8217;ve described them for you by the -c command. It should be self-explanatory.</p>
<p># sgdisk -z /dev/sdb<br />
# sgdisk -a1 -n1:34:2047 -t1:EF02 -c1:&#8221;BIOS boot&#8221; -n2:2048:156252048 -t2:BF01 -c2:&#8221;mirror&#8221; -n3:156252049:205080174 -t3:BF01 -c3:&#8221;stripe&#8221; -n4:205080175:205096559 -t4:BF0 /dev/sda</p>
<p># sgdisk -a1 -n1:34:2047 -t1:EF02 -c1:&#8221;BIOS boot&#8221; -n2:2048:156252048 -t2:BF01 -c2:&#8221;mirror&#8221; -n3:156252049:205080174 -t3:BF01 -c3:&#8221;stripe&#8221; -n4:205080175:205096559 -t4:BF0 /dev/sdc<br />
# zpool create -f stripe -o ashift=13 /dev/sda3 /dev/sdc3<br />
# zpool create -f newroot -o ashift=13 mirror /dev/sda2 /dev/sdc2<br />
# grub-install /dev/disk/by-id/ata-Samsung_SSD_840_PRO_Series_S1ATNSADB46090M<br />
# grub-install /dev/disk/by-id/ata-Samsung_SSD_840_PRO_Series_S12RNEACC59063B</p>
<p>Backup &amp; moving stuff.<br />
# zfs snapshot -r rpool@fullbackup<br />
# zfs list -t snapshot<br />
# zfs send -R rpool@fullbackup | zfs recv -vFd newroot<br />
root@pve:/# zpool get bootfs<br />
NAME PROPERTY VALUE SOURCE<br />
newroot bootfs &#8211; default<br />
rpool bootfs rpool/ROOT/pve-1 local<br />
stripe bootfs &#8211; default<br />
root@pve:/# zpool set bootfs=newroot/ROOT/pve-1 newroot<br />
zpool export newroot<br />
zpool import -o altroot=/mnt newroot<br />
&#8212; rebooted with freenas live cd, enter shell, import newroot with new name rpool. rebooted<br />
&#8212; boot into proxmox recovery &#8212; once it boots, do recovery<br />
grub-install /dev/sdb<br />
grub-install /dev/sda<br />
update-grub2<br />
update-initramfs -u</p>
<p>#zpool set bootfs=newroot rpool could also work without renaming via FreeNAS but didn&#8217;t try.</p>
]]></content:encoded>
					
		
		
		<post-id xmlns="com-wordpress:feed-additions:1">532</post-id>	</item>
	</channel>
</rss>
