{"id":466743,"date":"2025-07-11T09:00:19","date_gmt":"2025-07-11T09:00:19","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=466743"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=466743","title":{"rendered":"<span>ZFS on Linux: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 Ubuntu \u0441 \u043a\u043e\u0440\u043d\u0435\u043c \u0432 ZFS, RAID \u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435\u043c<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0d7\/303\/7d5\/0d73037d5c2888785831748e65fd297c.png\" width=\"1344\" height=\"660\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/r\/w780\/getpro\/habr\/upload_files\/0d7\/303\/7d5\/0d73037d5c2888785831748e65fd297c.png 780w,&#10;       https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/0d7\/303\/7d5\/0d73037d5c2888785831748e65fd297c.png 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0412\u0430\u043d\u044f, \u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u00a0<a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_zfs-2_110725_content\" rel=\"noopener noreferrer nofollow\">\u0432 Selectel<\/a>.\u00a0\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0443\u0436\u0435 \u00ab\u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u043f\u0440\u043e\u0441\u0432\u0435\u0442\u043b\u0435\u043d\u0438\u044e\u00bb \u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e ZFS \u2014 \u0443\u0434\u043e\u0431\u043d\u0430\u044f, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f <s>\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f <\/s>\u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c!<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Ubuntu 24.04 \u0441 \u043a\u043e\u0440\u043d\u0435\u043c \u043d\u0430 ZFS \u043d\u0430 UEFI-\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c\u0438: raidz, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u0436\u0430\u0442\u0438\u0435 \u0438 \u0434\u0430\u0436\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0413\u0430\u0439\u0434 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Ubuntu, \u043d\u043e \u0438 Debian \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0433\u043e Debian-based \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0447\u0435\u0440\u0435\u0437 debootstrap. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0447\u0430\u0441\u0442\u044c \u0433\u0430\u0439\u0434\u0430 \u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u043e\u0439 \u0434\u0438\u0441\u043a\u043e\u0432 \u0438 zpool \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430 \u2014 \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u044b\u043c \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u043c. \u041d\u043e \u044d\u0442\u0430\u043f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 non-Debian \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<blockquote>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043d\u0430 BIOS-\u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u2014 \u0432\u0441\u0435 \u0436\u0435 \u0437\u0430 \u043e\u043a\u043d\u043e\u043c 2025 \u0433\u043e\u0434. \ud83d\ude42 \u0418\u0437 \u0431\u043e\u043d\u0443\u0441\u043e\u0432: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 debootstrap \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043b\u0438\u0448\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u0434\u0430\u0436\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e snap \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u00ab\u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430\u00bb, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Ubuntu \u0447\u0430\u0441\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u043a\u0443\u044e\u0442.<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c:<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"#1\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043a\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ZFS \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u043b\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#5\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043a\u043e\u0432<\/h2>\n<p>\u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f, \u2014 \u044d\u0442\u043e LiveCD \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 ZFS \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0441\u0435\u0442\u044c. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 ISO-\u043e\u0431\u0440\u0430\u0437\u044b Ubuntu \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 ZFS.<\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0412\u041c \u0441 ISO \u0438\u043b\u0438 \u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 \u0444\u043b\u0435\u0448\u043a\u0443 \u0438 \u0433\u0440\u0443\u0437\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u0435 \u2014 \u043a\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u0412 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0434\u043e root-\u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u041b\u044e\u0431\u0438\u043c\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0434\u0438\u0441\u043a\u043e\u0432 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, fdisk, gparted \u0438\u043b\u0438 sfdisk \u2014 \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0435\u043c \u0434\u0438\u0441\u043a:<\/p>\n<pre><code class=\"nginx\">nvme1n1     259:1    0 476.9G  0 disk \u251c\u2500nvme1n1p1 259:5    0   127M  0 part \u251c\u2500nvme1n1p2 259:6    0   1.9G  0 part \u2514\u2500nvme1n1p3 259:7    0 474.9G  0 part<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>~100 \u041c\u0411 <code>vfat<\/code>-\u0440\u0430\u0437\u0434\u0435\u043b \u043f\u043e\u0434 <code>\/boot\/efi<\/code>, \u0444\u043b\u0430\u0433\u0438 <code>esp<\/code>, <code>boot<\/code>;<\/p>\n<\/li>\n<li>\n<p>~ 2 \u0413\u0411 <code>ext4<\/code>-\u0440\u0430\u0437\u0434\u0435\u043b \u0434\u043b\u044f <code>\/boot<\/code> (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d \u2014 \u0434\u043b\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438);<\/p>\n<\/li>\n<li>\n<p>\u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u043c\u0435\u0441\u0442\u043e \u2014 \u0434\u043b\u044f zpool. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043a <code>dataset<\/code> \u0438\u043b\u0438 <code>volume<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 <code>zpool<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c raidz, \u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u0438\u0441\u043a \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0439\u0442\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u00ab\u0431\u0430\u0439\u0442 \u0432 \u0431\u0430\u0439\u0442\u00bb. \u0410 <code>\/boot<\/code> \u2014 \u0443\u043f\u0430\u043a\u0443\u0439\u0442\u0435 \u0432 <code>mdadm RAID1<\/code>-\u043c\u0430\u0441\u0441\u0438\u0432 (GRUB \u0443\u043c\u0435\u0435\u0442 \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c). \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u0434\u0432\u0443\u043c\u044f \u0434\u0438\u0441\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">mdadm --create \/dev\/md0 --level=1 --raid-devices=2 \/dev\/nvme0n1p2 \/dev\/nvme1n1p2<\/code><\/pre>\n<div class=\"floating-image\">\n<figure class=\"float\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/064\/e95\/0dd\/064e950dd739abadf6110cc0c86d59d3.gif\" alt=\"\" title=\"\" width=\"144\" height=\"144\" sizes=\"auto, (max-width: 780px) 100vw, 50vw\" srcset=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/064\/e95\/0dd\/064e950dd739abadf6110cc0c86d59d3.gif 780w,&#10;       https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/064\/e95\/0dd\/064e950dd739abadf6110cc0c86d59d3.gif 781w\" loading=\"lazy\" decode=\"async\"\/><\/figure>\n<p><strong>\u041e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0432\u00a0\u041c\u043e\u0441\u043a\u0432\u0435, \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0435 \u0438\u00a0\u041d\u043e\u0432\u043e\u0441\u0438\u0431\u0438\u0440\u0441\u043a\u0435 \u0441\u00a0\u043e\u043f\u043b\u0430\u0442\u043e\u0439 \u043f\u043e\u00a0\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e.<\/p>\n<p><a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_zfs-2_110725_banner_001_ord\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u2192<\/strong><\/a><\/p>\n<\/div>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ZFS \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u043b\u0430<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 (\u0435\u0441\u043b\u0438 \u0432 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c DHCP, \u0442\u043e \u043e\u043d\u0430 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430) \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 ZFS:<\/p>\n<pre><code class=\"bash\">apt update apt install zfsutils-linux -y<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"bash\">mkfs.fat -F 32 \/dev\/nvme1n1p1 mkfs.ext4 \/dev\/md0 (\u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b \u0434\u0438\u0441\u043a\u0430, \u0435\u0441\u043b\u0438 \u0440\u0435\u0439\u0434 \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \/dev\/nvme1n1p2)<\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u043b\u0430 zpool<\/h3>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434 \u2014 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0412\u043c\u0435\u0441\u0442\u043e POOLNAME \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e zpool \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0445\u043e\u0441\u0442\u0430.<\/p>\n<p>\u0411\u0435\u0437 \u0441\u0436\u0430\u0442\u0438\u044f, raidz \u0438\u043b\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt POOLNAME \/dev\/nvme1n1p3<\/code><\/pre>\n<p>\u0421 \u0437\u0435\u0440\u043a\u0430\u043b\u043e\u043c \u043d\u0430 \u0434\u0432\u0443\u0445 \u0434\u0438\u0441\u043a\u0430\u0445:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt POOLNAME mirror \/dev\/nvme0n1p3 \/dev\/nvme1n1p3<\/code><\/pre>\n<p>Raidz2 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0434\u0438\u0441\u043a\u0430\u0445:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt POOLNAME raidz2 \/dev\/sda \/dev\/sdb \/dev\/sdc \/dev\/sdd<\/code><\/pre>\n<p>C\u0436\u0430\u0442\u044b\u0439 \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O compression=lz4 -O encryption=on -O keyformat=passphrase -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt $POOLNAME \/dev\/nvme1n1p3<\/code><\/pre>\n<p>\u0421\u0436\u0430\u0442\u044b\u0439 \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0434\u0438\u0441\u043a\u0430\u0445 \u0432 raidz2:<\/p>\n<pre><code class=\"bash\">zpoolcreate-oashift=12-oautotrim=on-Ocompression=lz4-Oencryption=on-Okeyformat=passphrase-Onormalization=formD-Oacltype=posixacl-Oxattr=sa-Odnodesize=auto-Ocanmount=off-Omountpoint=none-R\/mnt$POOLNAMEraidz2\/dev\/sda\/dev\/sdb\/dev\/sdc\/dev\/sdd<\/code><\/pre>\n<p><strong>\u041a\u0440\u0430\u0442\u043a\u0438\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a \u043e\u043f\u0446\u0438\u044f\u043c<\/strong><\/p>\n<ul>\n<li>\n<p><code>autotrim=on<\/code> \u2014 \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 SSD. \u041e\u043f\u0446\u0438\u044f \u0441\u043d\u0438\u0437\u0438\u0442 \u0438\u0437\u043d\u043e\u0441 \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0430 \u043e\u0431 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><code>ashift<\/code> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430. \u0412 ashift \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0434\u0432\u043e\u0439\u043a\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>ashift=12<\/code> \u2014 \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438 4 \u041a\u0411 (2\u00b9\u00b2 = 4 096 \u0431\u0430\u0439\u0442), \u0430 <code>ashift=9<\/code> \u2014 \u0431\u043b\u043e\u043a\u0438 512 \u0431\u0430\u0439\u0442. \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 12, \u043d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u0438\u0441\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0443\u043c\u0435\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 4 \u041a\u0411-\u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 9.\u00a0<\/p>\n<\/li>\n<li>\n<p><code>compression=lz4 <\/code>\u2014 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u0436\u0430\u0442\u0438\u0435, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c lzjb, zle, gzip \u0438\u043b\u0438 zstd.<\/p>\n<\/li>\n<li>\n<p><code>encryption=on<\/code>, <code>keyformat=passphrase<\/code> \u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 AES-256-CCM, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c).<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/openzfs.github.io\/openzfs-docs\/\" rel=\"noopener noreferrer nofollow\">\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/h2>\n<p>1. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c dataset \u0434\u043b\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421:<\/p>\n<pre><code class=\"bash\">zfs create -o canmount=noauto -o mountpoint=\/ POOLNAME\/root zfs mount POOLNAME\/root<\/code><\/pre>\n<blockquote>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e <code>canmount=noauto<\/code>: \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u044f\u0434\u0440\u043e \u0441\u0430\u043c\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 dataset \u0441 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421.<\/p>\n<\/blockquote>\n<p>2. \u041f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 dataset \u0434\u043b\u044f \u0438\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"bash\">zfs create -o mountpoint=\/home POOLNAME\/home \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \/boot \u0438 \/boot\/efi: mkdir \/mnt\/boot; mount \/dev\/md0 \/mnt\/boot # (\u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0435\u0439\u0434) mkdir \/mnt\/boot\/efi; mount \/dev\/nvme1n1p1 \/mnt\/boot\/efi<\/code><\/pre>\n<p>3. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0430\u0437\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"bash\">apt install debootstrap -y debootstrap noble \/mnt zfs set devices=off POOLNAME<\/code><\/pre>\n<p>4. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0434\u0430\u0436\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0435\u0439 \u043d\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u043e (\u043d\u0435 \u0437\u0430\u0431\u044b\u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0432\u043c\u0435\u0441\u0442\u043e <code>HOSTNAME<\/code>):<\/p>\n<pre><code class=\"bash\">echo HOSTNAME &gt; \/mnt\/hostname echo 127.0.0.1 localhost HOSTNAME &gt; \/mnt\/hosts grep -v cdrom \/etc\/apt\/sources.list &gt; \/mnt\/etc\/apt\/sources.list rsync -aPvh \/etc\/apt\/sources.list.d\/ \/mnt\/etc\/apt\/sources.list.d\/<\/code><\/pre>\n<p>5. \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 chroot \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"bash\">mount --rbind \/dev\u00a0 \/mnt\/dev mount --rbind \/proc \/mnt\/proc mount--rbind\/sys\u00a0 \/mnt\/<\/code><\/pre>\n<p>6. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u0438 \u0438 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441:<\/p>\n<pre><code class=\"bash\">locale-gen --purge \"en_US.UTF-8\" update-locale LANG=en_US.UTF-8 LANGUAGE=en_US dpkg-reconfigure --frontend noninteractive locales dpkg-reconfigure tzdata<\/code><\/pre>\n<p>7. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<pre><code class=\"bash\">apt update; apt dist-upgrade -y apt install zfs-initramfs shim-signed grub-efi-amd64-signed linux-image-generic linux-headers-generic openssh-server -y<\/code><\/pre>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430 \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0434\u0435\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e, \u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u043c <code>dropbear-initramfs<\/code>:<\/p>\n<pre><code class=\"bash\">apt install dropbear-initramfs # tmux nano net-tools curl fdisk rsync etc<\/code><\/pre>\n<p>8. \u0412 <code>\/etc\/fstab<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0442 ZFS \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"bash\">\/dev\/md0\/bootext4noatime,nofail,x-systemd.device-timeout=5s01 \/dev\/nvme1n1p1\/boot\/efivfatnoatime,nofail,x-systemd.device-timeout=5s01<\/code><\/pre>\n<p>9. ZFS \u0441\u0430\u043c \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 dataset-\u044b \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 <code>canmount= noauto<\/code> (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u0440\u043d\u044f), \u0442\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0412 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430 ZFS \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u044e\u043d\u0438\u0442\u0430 <code>systemd<\/code>, \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 <code>\/etc\/fstab<\/code> \u0438 \u0442. \u0434. \u0420\u0443\u0447\u043d\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">zfs mount POOLNAME\/DATASET<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 (\u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u043e\u0442 mountpoint \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e), \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>mount -t zfs -o zfsutil POOLNAME\/DATASET \/path\/to\/mount<\/code><\/pre>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Dropbear:\u00a0<\/p>\n<p>1. \u041a\u043b\u0430\u0434\u0435\u043c \u043a\u043b\u044e\u0447 \u0432 <code>\/etc\/dropbear\/initramfs\/authorized_keys<\/code>.<\/p>\n<p>2. \u0412 <code>\/etc\/dropbear\/initramfs\/dropbear.conf<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u043f\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 <code>2077<\/code> \u043d\u0430 \u00ab\u043b\u044e\u0431\u0438\u043c\u044b\u0439\u00bb \u043f\u043e\u0440\u0442:<\/p>\n<pre><code class=\"bash\">DROPBEAR_OPTIONS=\"-I 180 -j -k -p 2077 -s -c zfsunlock\"<\/code><\/pre>\n<p>3. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0442\u044c \u0434\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e dataset. \u042f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>initramfs-tools<\/code> (<code>\/etc\/initramfs-tools\/initramfs.conf<\/code>):<\/p>\n<pre><code class=\"bash\">IP=SERVER-IP::GATEWAY:NETMASK:SERVER-HOSTNAME<\/code><\/pre>\n<blockquote>\n<p>\u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DHCP \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 IP \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044f\u0434\u0440\u0430 \u2014 \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0435\u0435.<\/p>\n<\/blockquote>\n<p>4. \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <code>mdadm<\/code> \u0434\u043b\u044f <code>\/boot<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0442\u043e\u0436\u0435:<\/p>\n<pre><code class=\"bash\">apt install mdadm -y mdadm --detail --scan &gt; \/etc\/mdadm\/mdadm.conf<\/code><\/pre>\n<p>5. \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f <code>initramfs<\/code>, \u043f\u0435\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a (GRUB):<\/p>\n<pre><code class=\"bash\">update-initramfs -u -k all grub-install \/dev\/nvme1n1p1 update-grub<\/code><\/pre>\n<p>6. \u041f\u043e\u0441\u043b\u0435 <code>update-grub<\/code> \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 grub \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u044f\u0434\u0440\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 root. \u0418\u043d\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043d\u0435\u0442 \u0438\u043b\u0438 \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0417\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b, \u043d\u043e \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0421\u0442\u0440\u043e\u043a\u0430 \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u044f\u0434\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">linux\"\/vmlinuz-6.8.0-59-generic\" root=ZFS=\"POOLNAME\/root\" ro<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 (<code>openssh-server<\/code> \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, <code>KDE\/Gnome\/XFCE<\/code> \u043d\u0430 \u041f\u041a \u0438 \u0442. \u0434.), \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 chroot, \u0432\u0441\u0435 \u0440\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c zpool:<\/p>\n<pre><code class=\"bash\">exit umount \/mnt\/boot\/efi umount \/mnt\/boot umount -lf \/mnt zpool export -a<\/code><\/pre>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h2>\u0413\u043e\u0442\u043e\u0432\u043e!<\/h2>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443. \u0418 \u0435\u0449\u0435 \u0440\u0430\u0437: \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445.<\/p>\n<ul>\n<li>\n<p>Grub \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u043b \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b \u043d\u0435 \u0437\u0430\u0431\u044b\u043b\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u043b.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/926806\/\"> https:\/\/habr.com\/ru\/articles\/926806\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0442! \u041c\u0435\u043d\u044f \u0437\u043e\u0432\u0443\u0442 \u0412\u0430\u043d\u044f, \u044f \u0441\u0438\u0441\u0442\u0435\u043c\u043d\u044b\u0439 \u0430\u0434\u043c\u0438\u043d\u0438\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u00a0<a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_zfs-2_110725_content\" rel=\"noopener noreferrer nofollow\">\u0432 Selectel<\/a>.\u00a0\u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0432\u044b \u0443\u0436\u0435 \u00ab\u043f\u0440\u0438\u0448\u043b\u0438 \u043a \u043f\u0440\u043e\u0441\u0432\u0435\u0442\u043b\u0435\u043d\u0438\u044e\u00bb \u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043b\u0438, \u0447\u0442\u043e ZFS \u2014 \u0443\u0434\u043e\u0431\u043d\u0430\u044f, \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u0430\u044f <s>\u0438 \u0432\u043e\u043e\u0431\u0449\u0435 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u0430\u044f <\/s>\u0444\u0430\u0439\u043b\u043e\u0432\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430. \u041e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0442\u043e\u043b\u044c\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c, \u043a\u0430\u043a \u043d\u0430\u0447\u0430\u0442\u044c \u0435\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c. \u041e\u0431 \u044d\u0442\u043e\u043c \u0438 \u043f\u043e\u0433\u043e\u0432\u043e\u0440\u0438\u043c \u043f\u043e\u0434 \u043a\u0430\u0442\u043e\u043c!<\/p>\n<p>\u0420\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 Ubuntu 24.04 \u0441 \u043a\u043e\u0440\u043d\u0435\u043c \u043d\u0430 ZFS \u043d\u0430 UEFI-\u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0441\u043e \u0432\u0441\u0435\u043c\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u043c\u0438 \u0441\u0446\u0435\u043d\u0430\u0440\u0438\u044f\u043c\u0438: raidz, \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435, \u0441\u0436\u0430\u0442\u0438\u0435 \u0438 \u0434\u0430\u0436\u0435 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u0430\u044f \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0430 \u0434\u043b\u044f \u0441\u0435\u0440\u0432\u0435\u0440\u0430. \u0413\u0430\u0439\u0434 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f Ubuntu, \u043d\u043e \u0438 Debian \u0438\u043b\u0438 \u043b\u044e\u0431\u043e\u0433\u043e Debian-based \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u0430, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c\u043e\u0433\u043e \u0447\u0435\u0440\u0435\u0437 debootstrap. \u041f\u0440\u0438 \u044d\u0442\u043e\u043c \u0447\u0430\u0441\u0442\u044c \u0433\u0430\u0439\u0434\u0430 \u0441 \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u043e\u0439 \u0434\u0438\u0441\u043a\u043e\u0432 \u0438 zpool \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u0430 \u2014 \u0435\u0435 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0441 \u043b\u044e\u0431\u044b\u043c \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u0443\u0442\u0438\u0432\u043e\u043c. \u041d\u043e \u044d\u0442\u0430\u043f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 non-Debian \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0430\u0434\u0430\u043f\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e. <\/p>\n<blockquote>\n<p>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u043d\u0430 BIOS-\u043c\u0430\u0448\u0438\u043d\u044b \u0432 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438 \u043d\u0435 \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u2014 \u0432\u0441\u0435 \u0436\u0435 \u0437\u0430 \u043e\u043a\u043d\u043e\u043c 2025 \u0433\u043e\u0434. \ud83d\ude42 \u0418\u0437 \u0431\u043e\u043d\u0443\u0441\u043e\u0432: \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0447\u0435\u0440\u0435\u0437 debootstrap \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442 \u043b\u0438\u0448\u044c \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0439 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u0434\u0430\u0436\u0435 \u043d\u0438\u043a\u0430\u043a\u043e\u0433\u043e snap \u0438 \u043f\u0440\u043e\u0447\u0435\u0433\u043e \u00ab\u043f\u0440\u0435\u0434\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0443\u0441\u043e\u0440\u0430\u00bb, \u0437\u0430 \u043a\u043e\u0442\u043e\u0440\u044b\u0439 Ubuntu \u0447\u0430\u0441\u0442\u043e \u043a\u0440\u0438\u0442\u0438\u043a\u0443\u044e\u0442.<\/p>\n<\/blockquote>\n<details class=\"spoiler\">\n<summary>\u0418\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u043d\u0430\u0432\u0438\u0433\u0430\u0446\u0438\u044e, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0445\u043e\u0442\u0438\u0442\u0435 \u0447\u0438\u0442\u0430\u0442\u044c \u0442\u0435\u043a\u0441\u0442 \u0446\u0435\u043b\u0438\u043a\u043e\u043c:<\/summary>\n<div class=\"spoiler__content\">\n<ul>\n<li>\n<p><a href=\"#1\" rel=\"noopener noreferrer nofollow\">\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043a\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#2\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ZFS \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u043b\u0430<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#3\" rel=\"noopener noreferrer nofollow\">\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#4\" rel=\"noopener noreferrer nofollow\">\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"#5\" rel=\"noopener noreferrer nofollow\">\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/details>\n<p><a class=\"anchor\" name=\"1\" id=\"1\"><\/a><\/p>\n<h2>\u041f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043a\u0430 \u043e\u043a\u0440\u0443\u0436\u0435\u043d\u0438\u044f \u0438 \u0440\u0430\u0437\u043c\u0435\u0442\u043a\u0430 \u0434\u0438\u0441\u043a\u043e\u0432<\/h2>\n<p>\u0412\u0441\u0435, \u0447\u0442\u043e \u043d\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f, \u2014 \u044d\u0442\u043e LiveCD \u0441 \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u043e\u0439 ZFS \u0438 \u0434\u043e\u0441\u0442\u0443\u043f \u0432 \u0441\u0435\u0442\u044c. \u041a \u0441\u0447\u0430\u0441\u0442\u044c\u044e, \u0432 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u044b\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043e\u0447\u043d\u044b\u0435 ISO-\u043e\u0431\u0440\u0430\u0437\u044b Ubuntu \u043b\u0435\u0433\u043a\u043e \u0434\u043e\u0431\u0430\u0432\u0438\u0442\u044c \u043f\u043e\u0434\u0434\u0435\u0440\u0436\u043a\u0443 ZFS.<\/p>\n<p>\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043c \u0412\u041c \u0441 ISO \u0438\u043b\u0438 \u043f\u0438\u0448\u0435\u043c \u043e\u0431\u0440\u0430\u0437 \u043d\u0430 \u0444\u043b\u0435\u0448\u043a\u0443 \u0438 \u0433\u0440\u0443\u0437\u0438\u043c \u0441\u0435\u0440\u0432\u0435\u0440 \u0441 \u043d\u0435\u0435 \u2014 \u043a\u0430\u043a \u0443\u0434\u043e\u0431\u043d\u0435\u0435. \u0412 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0449\u0438\u043a\u0435 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u0432\u0441\u0435 \u043f\u0440\u0435\u0434\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0438 \u0434\u043e\u0431\u0438\u0440\u0430\u0435\u043c\u0441\u044f \u0434\u043e root-\u043a\u043e\u043d\u0441\u043e\u043b\u0438. \u041b\u044e\u0431\u0438\u043c\u044b\u043c \u043c\u0435\u043d\u0435\u0434\u0436\u0435\u0440\u043e\u043c \u0434\u0438\u0441\u043a\u043e\u0432 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, fdisk, gparted \u0438\u043b\u0438 sfdisk \u2014 \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0435\u043c \u0434\u0438\u0441\u043a:<\/p>\n<pre><code class=\"nginx\">nvme1n1     259:1    0 476.9G  0 disk \u251c\u2500nvme1n1p1 259:5    0   127M  0 part \u251c\u2500nvme1n1p2 259:6    0   1.9G  0 part \u2514\u2500nvme1n1p3 259:7    0 474.9G  0 part<\/code><\/pre>\n<p>\u0427\u0442\u043e \u0434\u043b\u044f \u043d\u0430\u0441 \u0432\u0430\u0436\u043d\u043e:<\/p>\n<ul>\n<li>\n<p>~100 \u041c\u0411 <code>vfat<\/code>-\u0440\u0430\u0437\u0434\u0435\u043b \u043f\u043e\u0434 <code>\/boot\/efi<\/code>, \u0444\u043b\u0430\u0433\u0438 <code>esp<\/code>, <code>boot<\/code>;<\/p>\n<\/li>\n<li>\n<p>~ 2 \u0413\u0411 <code>ext4<\/code>-\u0440\u0430\u0437\u0434\u0435\u043b \u0434\u043b\u044f <code>\/boot<\/code> (\u043d\u0435 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u0435\u043d, \u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u043e\u0432\u0430\u043d \u2014 \u0434\u043b\u044f \u0443\u043d\u0438\u0432\u0435\u0440\u0441\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u0438);<\/p>\n<\/li>\n<li>\n<p>\u043e\u0441\u0442\u0430\u0432\u0448\u0435\u0435\u0441\u044f \u043c\u0435\u0441\u0442\u043e \u2014 \u0434\u043b\u044f zpool. \u0412\u0441\u0435 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u044b \u043f\u0440\u0438 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0441\u0442\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u043a\u0430\u043a <code>dataset<\/code> \u0438\u043b\u0438 <code>volume<\/code> \u0432\u043d\u0443\u0442\u0440\u0438 <code>zpool<\/code>.<\/p>\n<\/li>\n<\/ul>\n<p>\u0415\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c raidz, \u0442\u043e \u0432\u0442\u043e\u0440\u043e\u0439 \u0434\u0438\u0441\u043a \u0440\u0430\u0437\u043c\u0435\u0447\u0430\u0439\u0442\u0435 \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e \u00ab\u0431\u0430\u0439\u0442 \u0432 \u0431\u0430\u0439\u0442\u00bb. \u0410 <code>\/boot<\/code> \u2014 \u0443\u043f\u0430\u043a\u0443\u0439\u0442\u0435 \u0432 <code>mdadm RAID1<\/code>-\u043c\u0430\u0441\u0441\u0438\u0432 (GRUB \u0443\u043c\u0435\u0435\u0442 \u0441 \u043d\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c). \u041f\u0440\u0438\u043c\u0435\u0440 \u0434\u043b\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0441 \u0434\u0432\u0443\u043c\u044f \u0434\u0438\u0441\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"bash\">mdadm --create \/dev\/md0 --level=1 --raid-devices=2 \/dev\/nvme0n1p2 \/dev\/nvme1n1p2<\/code><\/pre>\n<div class=\"floating-image\">\n<figure class=\"float\"><\/figure>\n<p><strong>\u041e\u0431\u043b\u0430\u0447\u043d\u0430\u044f \u0438\u043d\u0444\u0440\u0430\u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0430 \u0434\u043b\u044f \u0432\u0430\u0448\u0438\u0445 \u043f\u0440\u043e\u0435\u043a\u0442\u043e\u0432<\/strong><\/p>\n<p>\u0412\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0435 \u043c\u0430\u0448\u0438\u043d\u044b \u0432\u00a0\u041c\u043e\u0441\u043a\u0432\u0435, \u0421\u0430\u043d\u043a\u0442-\u041f\u0435\u0442\u0435\u0440\u0431\u0443\u0440\u0433\u0435 \u0438\u00a0\u041d\u043e\u0432\u043e\u0441\u0438\u0431\u0438\u0440\u0441\u043a\u0435 \u0441\u00a0\u043e\u043f\u043b\u0430\u0442\u043e\u0439 \u043f\u043e\u00a0\u043f\u043e\u0442\u0440\u0435\u0431\u043b\u0435\u043d\u0438\u044e.<\/p>\n<p><a href=\"https:\/\/selectel.ru\/services\/cloud\/servers\/?utm_source=habr.com&amp;utm_medium=referral&amp;utm_campaign=cloud_article_zfs-2_110725_banner_001_ord\" rel=\"noopener noreferrer nofollow\"><strong>\u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u2192<\/strong><\/a><\/p>\n<\/div>\n<p><a class=\"anchor\" name=\"2\" id=\"2\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 ZFS \u0438 \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u043b\u0430<\/h2>\n<p>\u041f\u043e\u0441\u043b\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \u0441\u0435\u0442\u0438 (\u0435\u0441\u043b\u0438 \u0432 \u0441\u0435\u0442\u0438 \u0435\u0441\u0442\u044c DHCP, \u0442\u043e \u043e\u043d\u0430 \u0443\u0436\u0435 \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430) \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 ZFS:<\/p>\n<pre><code class=\"bash\">apt update apt install zfsutils-linux -y<\/code><\/pre>\n<p>\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"bash\">mkfs.fat -F 32 \/dev\/nvme1n1p1 mkfs.ext4 \/dev\/md0 (\u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b \u0434\u0438\u0441\u043a\u0430, \u0435\u0441\u043b\u0438 \u0440\u0435\u0439\u0434 \u043d\u0435 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440: \/dev\/nvme1n1p2)<\/code><\/pre>\n<h3>\u0421\u043e\u0437\u0434\u0430\u043d\u0438\u0435 \u043f\u0443\u043b\u0430 zpool<\/h3>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u043a\u043e\u043c\u0430\u043d\u0434 \u2014 \u043f\u043e\u0434 \u0440\u0430\u0437\u043d\u044b\u0435 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438. \u0412\u043c\u0435\u0441\u0442\u043e POOLNAME \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0439\u0442\u0435 \u0438\u043c\u044f \u0432\u0430\u0448\u0435\u0433\u043e zpool \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0449\u0435\u0435 \u0441 \u0438\u043c\u0435\u043d\u0435\u043c \u0445\u043e\u0441\u0442\u0430.<\/p>\n<p>\u0411\u0435\u0437 \u0441\u0436\u0430\u0442\u0438\u044f, raidz \u0438\u043b\u0438 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u044f:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt POOLNAME \/dev\/nvme1n1p3<\/code><\/pre>\n<p>\u0421 \u0437\u0435\u0440\u043a\u0430\u043b\u043e\u043c \u043d\u0430 \u0434\u0432\u0443\u0445 \u0434\u0438\u0441\u043a\u0430\u0445:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt POOLNAME mirror \/dev\/nvme0n1p3 \/dev\/nvme1n1p3<\/code><\/pre>\n<p>Raidz2 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0434\u0438\u0441\u043a\u0430\u0445:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt POOLNAME raidz2 \/dev\/sda \/dev\/sdb \/dev\/sdc \/dev\/sdd<\/code><\/pre>\n<p>C\u0436\u0430\u0442\u044b\u0439 \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439:<\/p>\n<pre><code class=\"bash\">zpool create -o ashift=12 -o autotrim=on -O compression=lz4 -O encryption=on -O keyformat=passphrase -O normalization=formD -O acltype=posixacl -O xattr=sa -O dnodesize=auto -O canmount=off -O mountpoint=none -R \/mnt $POOLNAME \/dev\/nvme1n1p3<\/code><\/pre>\n<p>\u0421\u0436\u0430\u0442\u044b\u0439 \u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043d\u0430 \u0447\u0435\u0442\u044b\u0440\u0435\u0445 \u0434\u0438\u0441\u043a\u0430\u0445 \u0432 raidz2:<\/p>\n<pre><code class=\"bash\">zpoolcreate-oashift=12-oautotrim=on-Ocompression=lz4-Oencryption=on-Okeyformat=passphrase-Onormalization=formD-Oacltype=posixacl-Oxattr=sa-Odnodesize=auto-Ocanmount=off-Omountpoint=none-R\/mnt$POOLNAMEraidz2\/dev\/sda\/dev\/sdb\/dev\/sdc\/dev\/sdd<\/code><\/pre>\n<p><strong>\u041a\u0440\u0430\u0442\u043a\u0438\u0435 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u044f \u043a \u043e\u043f\u0446\u0438\u044f\u043c<\/strong><\/p>\n<ul>\n<li>\n<p><code>autotrim=on<\/code> \u2014 \u0435\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0435 SSD. \u041e\u043f\u0446\u0438\u044f \u0441\u043d\u0438\u0437\u0438\u0442 \u0438\u0437\u043d\u043e\u0441 \u0438 \u043f\u043e\u0432\u044b\u0441\u0438\u0442 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0437\u0430 \u0441\u0447\u0435\u0442 \u0438\u043d\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0434\u0438\u0441\u043a\u0430 \u043e\u0431 \u043e\u0441\u0432\u043e\u0431\u043e\u0436\u0434\u0435\u043d\u043d\u044b\u0445 \u0431\u043b\u043e\u043a\u0430\u0445.<\/p>\n<\/li>\n<li>\n<p><code>ashift<\/code> \u2014 \u0440\u0430\u0437\u043c\u0435\u0440 \u0431\u043b\u043e\u043a\u0430. \u0412 ashift \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0434\u0432\u043e\u0439\u043a\u0438 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440 <code>ashift=12<\/code> \u2014 \u044d\u0442\u043e \u0431\u043b\u043e\u043a\u0438 4 \u041a\u0411 (2\u00b9\u00b2 = 4 096 \u0431\u0430\u0439\u0442), \u0430 <code>ashift=9<\/code> \u2014 \u0431\u043b\u043e\u043a\u0438 512 \u0431\u0430\u0439\u0442. \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u0438 \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 12, \u043d\u043e \u0432 \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0447\u0430\u0441\u0442\u043d\u044b\u0445 \u0441\u043b\u0443\u0447\u0430\u044f\u0445 \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0441\u0442\u0430\u0440\u044b\u0435 \u0434\u0438\u0441\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043d\u0435 \u0443\u043c\u0435\u044e\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 4 \u041a\u0411-\u0431\u043b\u043e\u043a\u0430\u043c\u0438, \u043c\u043e\u0436\u043d\u043e \u0441\u043c\u0435\u043d\u0438\u0442\u044c \u043d\u0430 9.\u00a0<\/p>\n<\/li>\n<li>\n<p><code>compression=lz4 <\/code>\u2014 \u0431\u044b\u0441\u0442\u0440\u043e\u0435 \u0438 \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u043e\u0435 \u0441\u0436\u0430\u0442\u0438\u0435, \u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c lzjb, zle, gzip \u0438\u043b\u0438 zstd.<\/p>\n<\/li>\n<li>\n<p><code>encryption=on<\/code>, <code>keyformat=passphrase<\/code> \u2014 \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u0438\u0435 (\u043f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u2014 AES-256-CCM, \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043d\u0435 \u043c\u0435\u043d\u044f\u0442\u044c).<\/p>\n<\/li>\n<\/ul>\n<blockquote>\n<p>\u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u0435\u043d\u044f\u0442\u044c \u043d\u0435 \u043d\u0443\u0436\u043d\u043e. \u041f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u043e \u043a\u0430\u0436\u0434\u043e\u043c \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c <a href=\"https:\/\/openzfs.github.io\/openzfs-docs\/\" rel=\"noopener noreferrer nofollow\">\u0432 \u043e\u0444\u0438\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0439 \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438<\/a>.<\/p>\n<\/blockquote>\n<p><a class=\"anchor\" name=\"3\" id=\"3\"><\/a><\/p>\n<h2>\u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0430 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438<\/h2>\n<p>1. \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c dataset \u0434\u043b\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421:<\/p>\n<pre><code class=\"bash\">zfs create -o canmount=noauto -o mountpoint=\/ POOLNAME\/root zfs mount POOLNAME\/root<\/code><\/pre>\n<blockquote>\n<p>\u0418\u043c\u0435\u043d\u043d\u043e <code>canmount=noauto<\/code>: \u043f\u0440\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0435 \u044f\u0434\u0440\u043e \u0441\u0430\u043c\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 dataset \u0441 \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421.<\/p>\n<\/blockquote>\n<p>2. \u041f\u0435\u0440\u0435\u0434 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u043e\u0439 \u043c\u043e\u0436\u043d\u043e \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0438 \u0434\u0440\u0443\u0433\u0438\u0435 dataset \u0434\u043b\u044f \u0438\u043d\u044b\u0445 \u0442\u043e\u0447\u0435\u043a \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"bash\">zfs create -o mountpoint=\/home POOLNAME\/home \u0422\u0430\u043a\u0436\u0435 \u0441\u043e\u0437\u0434\u0430\u0435\u043c \u0438 \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \/boot \u0438 \/boot\/efi: mkdir \/mnt\/boot; mount \/dev\/md0 \/mnt\/boot # (\u0438\u043b\u0438 \u0440\u0430\u0437\u0434\u0435\u043b, \u0435\u0441\u043b\u0438 \u043d\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u0440\u0435\u0439\u0434) mkdir \/mnt\/boot\/efi; mount \/dev\/nvme1n1p1 \/mnt\/boot\/efi<\/code><\/pre>\n<p>3. \u0423\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0431\u0430\u0437\u0443 \u0441\u0438\u0441\u0442\u0435\u043c\u044b:<\/p>\n<pre><code class=\"bash\">apt install debootstrap -y debootstrap noble \/mnt zfs set devices=off POOLNAME<\/code><\/pre>\n<p>4. \u0423\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u043d\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0434\u0430\u0436\u0435 \u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u044f\u043c\u0438, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0432 \u043d\u0435\u0439 \u043d\u0435\u0442 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0444\u0430\u0439\u043b\u043e\u0432. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u044d\u0442\u043e (\u043d\u0435 \u0437\u0430\u0431\u044b\u0432 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u0436\u0435\u043b\u0430\u0435\u043c\u043e\u0435 \u0438\u043c\u044f \u0445\u043e\u0441\u0442\u0430 \u0432\u043c\u0435\u0441\u0442\u043e <code>HOSTNAME<\/code>):<\/p>\n<pre><code class=\"bash\">echo HOSTNAME &gt; \/mnt\/hostname echo 127.0.0.1 localhost HOSTNAME &gt; \/mnt\/hosts grep -v cdrom \/etc\/apt\/sources.list &gt; \/mnt\/etc\/apt\/sources.list rsync -aPvh \/etc\/apt\/sources.list.d\/ \/mnt\/etc\/apt\/sources.list.d\/<\/code><\/pre>\n<p>5. \u0417\u0430\u0445\u043e\u0434\u0438\u043c \u0432 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u043d\u0443\u044e \u0441\u0438\u0441\u0442\u0435\u043c\u0443 \u0447\u0435\u0440\u0435\u0437 chroot \u0434\u043b\u044f \u0437\u0430\u0432\u0435\u0440\u0448\u0435\u043d\u0438\u044f \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0438:<\/p>\n<pre><code class=\"bash\">mount --rbind \/dev\u00a0 \/mnt\/dev mount --rbind \/proc \/mnt\/proc mount--rbind\/sys\u00a0 \/mnt\/<\/code><\/pre>\n<p>6. \u0418\u0441\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u043c \u043b\u043e\u043a\u0430\u043b\u0438 \u0438 \u0447\u0430\u0441\u043e\u0432\u043e\u0439 \u043f\u043e\u044f\u0441:<\/p>\n<pre><code class=\"bash\">locale-gen --purge \"en_US.UTF-8\" update-locale LANG=en_US.UTF-8 LANGUAGE=en_US dpkg-reconfigure --frontend noninteractive locales dpkg-reconfigure tzdata<\/code><\/pre>\n<p>7. \u041e\u0431\u043d\u043e\u0432\u043b\u044f\u0435\u043c \u0441\u043f\u0438\u0441\u043a\u0438 \u043f\u0430\u043a\u0435\u0442\u043e\u0432 \u0438 \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0432\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e\u0435 \u0434\u043b\u044f \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438:<\/p>\n<pre><code class=\"bash\">apt update; apt dist-upgrade -y apt install zfs-initramfs shim-signed grub-efi-amd64-signed linux-image-generic linux-headers-generic openssh-server -y<\/code><\/pre>\n<p>\u0421\u0435\u0439\u0447\u0430\u0441 \u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c \u043f\u043e\u043b\u0435\u0437\u043d\u044b\u0435 \u0443\u0442\u0438\u043b\u0438\u0442\u044b, \u0430 \u0435\u0441\u043b\u0438 \u043f\u043b\u0430\u043d\u0438\u0440\u0443\u0435\u043c \u0432\u0432\u043e\u0434\u0438\u0442\u044c \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0434\u0435\u0448\u0438\u0444\u0440\u043e\u0432\u043a\u0438 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e, \u0442\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0441\u0442\u0430\u0432\u0438\u043c <code>dropbear-initramfs<\/code>:<\/p>\n<pre><code class=\"bash\">apt install dropbear-initramfs # tmux nano net-tools curl fdisk rsync etc<\/code><\/pre>\n<p>8. \u0412 <code>\/etc\/fstab<\/code> \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u043e\u0442\u043b\u0438\u0447\u043d\u044b\u0435 \u043e\u0442 ZFS \u0444\u0430\u0439\u043b\u043e\u0432\u044b\u0435 \u0441\u0438\u0441\u0442\u0435\u043c\u044b \u2014 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440:<\/p>\n<pre><code class=\"bash\">\/dev\/md0\/bootext4noatime,nofail,x-systemd.device-timeout=5s01 \/dev\/nvme1n1p1\/boot\/efivfatnoatime,nofail,x-systemd.device-timeout=5s01<\/code><\/pre>\n<p>9. ZFS \u0441\u0430\u043c \u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 dataset-\u044b \u043f\u0440\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0435. \u041e\u0434\u043d\u0430\u043a\u043e \u0435\u0441\u043b\u0438 <code>canmount= noauto<\/code> (\u0437\u0430 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u0440\u043d\u044f), \u0442\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0432\u0440\u0443\u0447\u043d\u0443\u044e. \u0412 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043c\u043e\u0434\u0443\u043b\u044c \u044f\u0434\u0440\u0430 ZFS \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u0442 \u0432\u0441\u0435 \u0441\u0430\u043c\u043e\u0441\u0442\u043e\u044f\u0442\u0435\u043b\u044c\u043d\u043e, \u0434\u0430\u0436\u0435 \u0435\u0441\u043b\u0438 \u0443 \u043d\u0430\u0441 \u043d\u0435\u0442 \u044e\u043d\u0438\u0442\u0430 <code>systemd<\/code>, \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 <code>\/etc\/fstab<\/code> \u0438 \u0442. \u0434. \u0420\u0443\u0447\u043d\u043e\u0435 \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"bash\">zfs mount POOLNAME\/DATASET<\/code><\/pre>\n<p>\u0415\u0441\u043b\u0438 \u043d\u0443\u0436\u043d\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e \u0441\u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432 \u043d\u0435\u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 (\u043e\u0442\u043b\u0438\u0447\u043d\u0443\u044e \u043e\u0442 mountpoint \u0434\u0438\u0440\u0435\u043a\u0442\u043e\u0440\u0438\u044e), \u0434\u0435\u043b\u0430\u0435\u043c \u044d\u0442\u043e \u0442\u0430\u043a:<\/p>\n<pre><code>mount -t zfs -o zfsutil POOLNAME\/DATASET \/path\/to\/mount<\/code><\/pre>\n<p><a class=\"anchor\" name=\"4\" id=\"4\"><\/a><\/p>\n<h2>\u041d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0430 \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438<\/h2>\n<p>\u0414\u043b\u044f \u0443\u0434\u0430\u043b\u0435\u043d\u043d\u043e\u0439 \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c Dropbear:\u00a0<\/p>\n<p>1. \u041a\u043b\u0430\u0434\u0435\u043c \u043a\u043b\u044e\u0447 \u0432 <code>\/etc\/dropbear\/initramfs\/authorized_keys<\/code>.<\/p>\n<p>2. \u0412 <code>\/etc\/dropbear\/initramfs\/dropbear.conf<\/code> \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043e\u043f\u0446\u0438\u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430, \u0438\u0437\u043c\u0435\u043d\u0438\u0432 <code>2077<\/code> \u043d\u0430 \u00ab\u043b\u044e\u0431\u0438\u043c\u044b\u0439\u00bb \u043f\u043e\u0440\u0442:<\/p>\n<pre><code class=\"bash\">DROPBEAR_OPTIONS=\"-I 180 -j -k -p 2077 -s -c zfsunlock\"<\/code><\/pre>\n<p>3. \u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0441\u0435\u0442\u044c \u0434\u043e \u043c\u043e\u043d\u0442\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u043a\u043e\u0440\u043d\u0435\u0432\u043e\u0439 \u0424\u0421, \u0447\u0442\u043e\u0431\u044b \u043c\u044b \u043c\u043e\u0433\u043b\u0438 \u0432 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u043a\u0438 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0438\u0442\u044c\u0441\u044f \u043a \u043d\u0430\u0448\u0435\u043c\u0443 \u0441\u0435\u0440\u0432\u0435\u0440\u0443 \u0438 \u0432\u0432\u0435\u0441\u0442\u0438 \u043f\u0430\u0440\u043e\u043b\u044c \u0434\u043b\u044f \u0440\u0430\u0437\u0431\u043b\u043e\u043a\u0438\u0440\u043e\u0432\u043a\u0438 \u0437\u0430\u0448\u0438\u0444\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e dataset. \u042f \u043e\u0431\u044b\u0447\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 IP, \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u0438 <code>initramfs-tools<\/code> (<code>\/etc\/initramfs-tools\/initramfs.conf<\/code>):<\/p>\n<pre><code class=\"bash\">IP=SERVER-IP::GATEWAY:NETMASK:SERVER-HOSTNAME<\/code><\/pre>\n<blockquote>\n<p>\u041c\u043e\u0436\u043d\u043e \u0442\u0430\u043a\u0436\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c DHCP \u0438\u043b\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0434\u0438\u0440\u0435\u043a\u0442\u0438\u0432\u0443 IP \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u0437\u0430\u043f\u0443\u0441\u043a\u0430 \u044f\u0434\u0440\u0430 \u2014 \u0447\u0442\u043e \u0434\u043b\u044f \u0432\u0430\u0441 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u0435\u0435.<\/p>\n<\/blockquote>\n<p>4. \u0415\u0441\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438 <code>mdadm<\/code> \u0434\u043b\u044f <code>\/boot<\/code>, \u0443\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u043c \u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c \u0435\u0433\u043e \u0442\u043e\u0436\u0435:<\/p>\n<pre><code class=\"bash\">apt install mdadm -y mdadm --detail --scan &gt; \/etc\/mdadm\/mdadm.conf<\/code><\/pre>\n<p>5. \u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u0432\u0435\u0440\u0448\u0438\u043b\u0438 \u0432\u0441\u0435 \u043f\u0440\u0438\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0438\u044f <code>initramfs<\/code>, \u043f\u0435\u0440\u0435\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c \u0437\u0430\u0433\u0440\u0443\u0437\u0447\u0438\u043a (GRUB):<\/p>\n<pre><code class=\"bash\">update-initramfs -u -k all grub-install \/dev\/nvme1n1p1 update-grub<\/code><\/pre>\n<p>6. \u041f\u043e\u0441\u043b\u0435 <code>update-grub<\/code> \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u0435\u043c \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u0441\u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u043a\u043e\u043d\u0444\u0438\u0433 grub \u0438 \u0443\u0431\u0435\u0434\u0438\u0442\u044c\u0441\u044f, \u0447\u0442\u043e \u043e\u043d \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0435\u0442 \u044f\u0434\u0440\u0443 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 root. \u0418\u043d\u043e\u0433\u0434\u0430 \u0435\u0433\u043e \u043d\u0435\u0442 \u0438\u043b\u0438 \u043e\u043d \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e. \u0417\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u044f \u043d\u0435 \u043d\u0430\u0448\u0435\u043b, \u043d\u043e \u0438 \u043d\u0435 \u0441\u043c\u043e\u0433 \u0432\u043e\u0441\u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0441\u0442\u0438 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0443 \u043f\u0440\u0438 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0438\u0438 \u0438\u043d\u0441\u0442\u0440\u0443\u043a\u0446\u0438\u0438. \u0421\u0442\u0440\u043e\u043a\u0430 \u0441 \u0437\u0430\u043f\u0443\u0441\u043a\u043e\u043c \u044f\u0434\u0440\u0430 \u0434\u043e\u043b\u0436\u043d\u0430 \u0432\u044b\u0433\u043b\u044f\u0434\u0435\u0442\u044c \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0432\u043e\u0442 \u0442\u0430\u043a:<\/p>\n<pre><code class=\"bash\">linux\"\/vmlinuz-6.8.0-59-generic\" root=ZFS=\"POOLNAME\/root\" ro<\/code><\/pre>\n<p>\u041a\u043e\u0433\u0434\u0430 \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043b\u0438 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043a\u0443 \u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 \u0432\u0441\u0435\u0433\u043e, \u0447\u0442\u043e \u0432\u0430\u043c \u043f\u043e\u043d\u0430\u0434\u043e\u0431\u0438\u0442\u0441\u044f \u043d\u0430 \u043c\u0430\u0448\u0438\u043d\u0435 (<code>openssh-server<\/code> \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435, <code>KDE\/Gnome\/XFCE<\/code> \u043d\u0430 \u041f\u041a \u0438 \u0442. \u0434.), \u0432\u044b\u0445\u043e\u0434\u0438\u043c \u0438\u0437 chroot, \u0432\u0441\u0435 \u0440\u0430\u0437\u043c\u043e\u043d\u0442\u0438\u0440\u0443\u0435\u043c \u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c zpool:<\/p>\n<pre><code class=\"bash\">exit umount \/mnt\/boot\/efi umount \/mnt\/boot umount -lf \/mnt zpool export -a<\/code><\/pre>\n<p><a class=\"anchor\" name=\"5\" id=\"5\"><\/a><\/p>\n<h2>\u0413\u043e\u0442\u043e\u0432\u043e!<\/h2>\n<p>\u0421\u0438\u0441\u0442\u0435\u043c\u0430 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d\u0430 \u0438 \u0433\u043e\u0442\u043e\u0432\u0430 \u043a \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044e. \u041c\u043e\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0442\u044c\u0441\u044f \u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0442\u044c \u0440\u0430\u0431\u043e\u0442\u0443. \u0418 \u0435\u0449\u0435 \u0440\u0430\u0437: \u0443\u0431\u0435\u0434\u0438\u0442\u0435\u0441\u044c \u0432 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u0445 \u043a\u043b\u044e\u0447\u0435\u0432\u044b\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u0430\u0445.<\/p>\n<ul>\n<li>\n<p>Grub \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e \u0441\u043e\u0431\u0440\u0430\u043b \u0441\u0432\u043e\u0439 \u043a\u043e\u043d\u0444\u0438\u0433.<\/p>\n<\/li>\n<li>\n<p>\u0421\u0435\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e.<\/p>\n<\/li>\n<li>\n<p>\u0412\u044b \u043d\u0435 \u0437\u0430\u0431\u044b\u043b\u0438 \u044d\u043a\u0441\u043f\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u0443\u043b.<\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/926806\/\"> https:\/\/habr.com\/ru\/articles\/926806\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-466743","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/466743","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=466743"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/466743\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=466743"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=466743"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=466743"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}