Gentoo Archives: gentoo-user

From: Pariksheet Nanda <pariksheet.nanda@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Persistence of ZFS /dev/zvol/rpool/swap
Date: Sun, 25 Nov 2018 21:36:58
Message-Id: CAPVZ_XVgRQ9Z_Vso0BhrdzqQExEzQJYoZ7X-Ot-crcXAbr=8Ww@mail.gmail.com
1 Hi folks,
2
3 I've followed fearedbliss' guide for installing Gentoo on ZFS [1] and am
4 trying to understand why /dev/zol/rpool/swap does not show up on reboot
5 even though I saw it initially when creating the zvol and can still see it
6 with zfs list:
7
8 xm2 ~ # zfs list
9 NAME USED AVAIL REFER MOUNTPOINT
10 rpool 29.1G 176G 96K none
11 rpool/HOME 4.98G 176G 4.98G /home
12 rpool/ROOT 7.10G 176G 96K none
13 rpool/ROOT/gentoo 7.10G 176G 7.10G /
14 rpool/swap 17.0G 193G 354M -
15 xm2 ~ # ls /dev/zvol
16 ls: cannot access '/dev/zvol': No such file or directory
17 xm2 ~ #
18
19 I'm actually surprised my system boots at all, because /etc/fstab looks for
20 that partition to be the swap:
21
22 xm2 ~ # grep ^/dev /etc/fstab
23 /dev/zvol/rpool/swap none swap sw,discard 0 0
24 xm2 ~ #
25
26 My best guesses at the problem are either that it's udev related or that
27 the various ZFS services need to be better configured to expose the zvol.
28 I read the "Admin Documentation" links on the zfsonlinux.org website
29 looking for mentions on "zvol" and the only relevant section seems to be
30 the `zpool import` should apply `zfs share -a` to zvols [2]. Maybe I need
31 to run `zfs share`? But that doesn't seem to help:
32
33 xm2 ~ # zfs share rpool/swap
34 cannot open 'rpool/swap': operation not applicable to datasets of this type
35 xm2 ~ # zfs share -a
36 xm2 ~ # ls /dev/zvol
37 ls: cannot access '/dev/zvol': No such file or directory
38 xm2 ~ #
39
40 I haven't posted on this list in many years, so go easy on me :)
41
42 Pariksheet
43
44 [1]
45 https://wiki.gentoo.org/wiki/User:Fearedbliss/Installing_Gentoo_Linux_On_ZFS#Create_your_swap_zvol
46 [2] http://open-zfs.org/wiki/System_Administration#Boot_process

Replies

Subject Author
Re: [gentoo-user] Persistence of ZFS /dev/zvol/rpool/swap "J. Roeleveld" <joost@××××××××.org>
Re: [gentoo-user] Persistence of ZFS /dev/zvol/rpool/swap "Roger J. H. Welsh" <rjhwelsh@×××××.com>