Difference between revisions of "Talk:ZFS"

From ArchWiki
Jump to: navigation, search
(Fixed style and added comment)
(reply)
 
(49 intermediate revisions by 24 users not shown)
Line 1: Line 1:
== <s>Partitioning</s> ==
+
== Bindmount ==
 +
Where does this file go and what other steps are required?
  
ZOL FAQ proposes to use whole disk, therefore partitioning is not required. From the same reason, it is not neccessary to create a partition table (be it GPT or ms-dos compatible), ZFS will create it automatically.
+
I would expect: /etc/systemd/system/
  
However, it might still be useful to use a single partition, which is slightly smaller than the size of the disk. This is to allow for problems at the time of disk replacement (e.g. due to failure). Not all disk marketed as 2TB HDD are of the same size and it is not possible to replace a drive in ZFS's vdev with a smaller drive (even when smaller by a few sectors).
+
Then: systemctl enable srv-nfs4-media.mount
  
:I was getting errors when trying to create a zpool using the whole disk without partions. These are on 4 3TB drives that once had a btrfs partiton on them. I am going to now zero out all of my drives with dd and see if I still get the error when trying to create a pool without partitions. Unfortunately this takes 12 hours. --[[User:Demizer|Demizer]] ([[User talk:Demizer|talk]]) 21:47, 13 August 2012 (UTC)
+
[[User:Msalerno|Msalerno]] ([[User talk:Msalerno|talk]]) 02:36, 22 October 2015 (UTC)
  
:I have ran into the following error again {{ic|cannot import 'bigdata': pool may be in use from other system}} I am going to attempt a complete wipe and start over. --[[User:Demizer|Demizer]] ([[User talk:Demizer|talk]]) 00:38, 14 August 2012 (UTC)
+
== resume hook ==
 +
In think in the page is a typo, the page should state ''resume hook'' instead of hibernate, but the limitation still applies. Can anyone confirm that the resume hook must appear before filesystems? [[User:Ezzetabi|Ezzetabi]] ([[User talk:Ezzetabi|talk]]) 09:49, 18 August 2015 (UTC)
  
:: This is because you have imported your filesystem with a different spl hostid. To fix this issue, you can use <code>zfs export</code> --[[User:kylef]]
+
== Automatic build script ==
  
:I have removed the GPT partitioning recommendations. In my testing and google searches, using <code>-f</code> seems to be a standard practice on linux. --[[User:Demizer|Demizer]] ([[User talk:Demizer|talk]]) 04:02, 18 August 2012 (UTC)
+
I'm fine with deleting the scripts. I only posted it because graysky's script never worked for me. Long stuff like this would be useful if the ArchWiki featured roll-up text. [[User:Severach|Severach]] ([[User talk:Severach|talk]]) 10:07, 9 August 2015 (UTC)
  
== Merging with Installing Arch Linux on ZFS? ==
+
:I'd suggest to maintain it in a github repo. You get better versioning, syntax highlighting, cloning, etc. -- [[User:Alad|Alad]] ([[User talk:Alad|talk]]) 12:46, 9 August 2015 (UTC)
  
Does it make sense to keep two different articles? What about just add the sections about how-to add zfs packages to the installation media and the trouble shooting here?
+
::...or an [https://help.github.com/articles/about-gists/#anonymous-gists anonymous gist] if you don't have nor want to create a GitHub account. — [[User:Kynikos|Kynikos]] ([[User talk:Kynikos|talk]]) 08:40, 10 August 2015 (UTC)
  
:Interesting. I think it could work, but I am not sure where to place it. The installing on zfs article is very long. Do you have any ideas? [[User:Demizer|Demizer]] ([[User talk:Demizer|talk]]) 03:24, 2 March 2013 (UTC)
+
:Isn't that exactly what DKMS is doing? There DKMS packages in the AUR. [[User:Das j|Das j]] ([[User talk:Das j|talk]]) 20:01, 10 January 2016 (UTC)
 +
 
 +
== Automatic snapshots ==
 +
{{AUR|zfs-auto-snapshot-git}} seems to have disappeared from the AUR. I haven't been able to find any information on why it was deleted; does anyone know? In any case, it should probably be removed from this page.
 +
[[User:Warai otoko|warai otoko]] ([[User talk:Warai otoko|talk]]) 03:21, 2 September 2015 (UTC)
 +
 
 +
:On further inspection, looks like it may have gotten lost in the transition to AUR4. It should be resubmitted if we want to continue recommending it here; I've found it useful, at any rate. [[User:Warai otoko|Warai otoko]] ([[User talk:Warai otoko|talk]]) 04:43, 2 September 2015 (UTC)
 +
 
 +
:: I've recreated it. I use this script as well. --[[User:Chungy|Chungy]] ([[User talk:Chungy|talk]]) 02:49, 3 September 2015 (UTC)
 +
 
 +
== Configuration ==
 +
 
 +
The configuration section has WAY to few infos about what systemd unit(s) to enable. Thanks to @kerberizer I finally managed to get the mounts working with the command
 +
 
 +
# systemctl preset $(tail -n +2 /usr/lib/systemd/system-preset/50-zfs.preset | cut -d ' ' -f 2)
 +
 
 +
[[User:Z3ntu|Z3ntu]] ([[User talk:Z3ntu|talk]]) 15:21, 27 October 2016 (UTC)
 +
 
 +
 
 +
@Z3ntu I have ZFS running on a few systems and never had to enable any services, it should work by default, if not then file a bug on the package
 +
 
 +
[[User:Justin8|Justin8]] ([[User talk:Justin8|talk]]) 22:04, 27 October 2016 (UTC)
 +
 
 +
@Justin8 I tried it both in a virtual machine and on a physical computer that when you don't enable any services (I use "zfs-linux" from the archzfs repo), create a pool and reboot, it doesn't exist anymore (zpool status) and the pools don't get mounted without the zfs-mount service (or whatever it is called). I found a related issue on github: https://github.com/archzfs/archzfs/issues/61
 +
 
 +
[[User:Z3ntu|Z3ntu]] ([[User talk:Z3ntu|talk]]) 08:34, 28 October 2016 (UTC)
 +
 
 +
 
 +
There seems to be a new systemd target ''zfs-import.target'' which must be enabled in order to auto-mount? Otherwise ''zfs-mount.service'' will be executed before ''zfs-import-cache.service'' on my machine and nothing will be mounted. --[[User:Swordfeng|Swordfeng]] ([[User talk:Swordfeng|talk]]) 12:55, 8 November 2017 (UTC)
 +
 
 +
I think the section about systemd units should be rewritten to remove the old stale information and bring the required command-line to the fore. As mentioned on the github issue linked from the page and also repeated above by @Z3ntu. I've just been experimenting with ZFS and wasted a little time on this that could have been avoided if the page had been updated back in 2016. I haven't cahnged the page except to add the required command line there in case there is still relevance to the other text that I don't realise. I have just started using ZFS myself.
 +
[[User:starfry|starfry]] ([[User talk:starfry|talk]]) 16:07, 31 May 2018 (UTC)
 +
: I’ve set up ZFS recently and the ''systemctl enable'' commands from the Wiki page have worked fine for me so far. What do you mean by “old stale information,” and why is ''systemctl preset […]'' a “required command line?” —[[User:Auerhuhn|Auerhuhn]] ([[User talk:Auerhuhn|talk]]) 16:33, 31 May 2018 (UTC)
 +
 
 +
That's why I never deleted anything from the page. I found that the ''systemctl enable'' commands worked up to the point that I rebooted. I discovered that the zpools were not imported on boot. Searching for information led me to the command-line on the github post and that did work for me. I thought I should raise its profile a little because I wasted a few hours on it. Actually I realised also I didn't enable the 3 services listed separately - just the ones at the top of the section (there are 6 services referenced by the github issue). But that probably is why I had the problem! Like I said, I have only just started with ZFS (I am testing in a VM with files rather than real devices) and it is possible that doing it in the small hours of the morning wasn't a good idea. The info on the page as it was left me asking more questions which were answered by the github issue and, in particular, that command line sequence. You don't need that command-line but you do need the systemd services that it enables (you could enable them by hand if you preferred). Maybe you don't need all six of them. But, as it was, it wasn't clear (to me).
 +
[[User:starfry|starfry]] ([[User talk:starfry|talk]]) 16:07, 31 May 2018 (UTC)

Latest revision as of 18:17, 31 May 2018

Bindmount

Where does this file go and what other steps are required?

I would expect: /etc/systemd/system/

Then: systemctl enable srv-nfs4-media.mount

Msalerno (talk) 02:36, 22 October 2015 (UTC)

resume hook

In think in the page is a typo, the page should state resume hook instead of hibernate, but the limitation still applies. Can anyone confirm that the resume hook must appear before filesystems? Ezzetabi (talk) 09:49, 18 August 2015 (UTC)

Automatic build script

I'm fine with deleting the scripts. I only posted it because graysky's script never worked for me. Long stuff like this would be useful if the ArchWiki featured roll-up text. Severach (talk) 10:07, 9 August 2015 (UTC)

I'd suggest to maintain it in a github repo. You get better versioning, syntax highlighting, cloning, etc. -- Alad (talk) 12:46, 9 August 2015 (UTC)
...or an anonymous gist if you don't have nor want to create a GitHub account. — Kynikos (talk) 08:40, 10 August 2015 (UTC)
Isn't that exactly what DKMS is doing? There DKMS packages in the AUR. Das j (talk) 20:01, 10 January 2016 (UTC)

Automatic snapshots

zfs-auto-snapshot-gitAUR seems to have disappeared from the AUR. I haven't been able to find any information on why it was deleted; does anyone know? In any case, it should probably be removed from this page. warai otoko (talk) 03:21, 2 September 2015 (UTC)

On further inspection, looks like it may have gotten lost in the transition to AUR4. It should be resubmitted if we want to continue recommending it here; I've found it useful, at any rate. Warai otoko (talk) 04:43, 2 September 2015 (UTC)
I've recreated it. I use this script as well. --Chungy (talk) 02:49, 3 September 2015 (UTC)

Configuration

The configuration section has WAY to few infos about what systemd unit(s) to enable. Thanks to @kerberizer I finally managed to get the mounts working with the command

# systemctl preset $(tail -n +2 /usr/lib/systemd/system-preset/50-zfs.preset | cut -d ' ' -f 2)

Z3ntu (talk) 15:21, 27 October 2016 (UTC)


@Z3ntu I have ZFS running on a few systems and never had to enable any services, it should work by default, if not then file a bug on the package

Justin8 (talk) 22:04, 27 October 2016 (UTC)

@Justin8 I tried it both in a virtual machine and on a physical computer that when you don't enable any services (I use "zfs-linux" from the archzfs repo), create a pool and reboot, it doesn't exist anymore (zpool status) and the pools don't get mounted without the zfs-mount service (or whatever it is called). I found a related issue on github: https://github.com/archzfs/archzfs/issues/61

Z3ntu (talk) 08:34, 28 October 2016 (UTC)


There seems to be a new systemd target zfs-import.target which must be enabled in order to auto-mount? Otherwise zfs-mount.service will be executed before zfs-import-cache.service on my machine and nothing will be mounted. --Swordfeng (talk) 12:55, 8 November 2017 (UTC)

I think the section about systemd units should be rewritten to remove the old stale information and bring the required command-line to the fore. As mentioned on the github issue linked from the page and also repeated above by @Z3ntu. I've just been experimenting with ZFS and wasted a little time on this that could have been avoided if the page had been updated back in 2016. I haven't cahnged the page except to add the required command line there in case there is still relevance to the other text that I don't realise. I have just started using ZFS myself. starfry (talk) 16:07, 31 May 2018 (UTC)

I’ve set up ZFS recently and the systemctl enable commands from the Wiki page have worked fine for me so far. What do you mean by “old stale information,” and why is systemctl preset […] a “required command line?” —Auerhuhn (talk) 16:33, 31 May 2018 (UTC)

That's why I never deleted anything from the page. I found that the systemctl enable commands worked up to the point that I rebooted. I discovered that the zpools were not imported on boot. Searching for information led me to the command-line on the github post and that did work for me. I thought I should raise its profile a little because I wasted a few hours on it. Actually I realised also I didn't enable the 3 services listed separately - just the ones at the top of the section (there are 6 services referenced by the github issue). But that probably is why I had the problem! Like I said, I have only just started with ZFS (I am testing in a VM with files rather than real devices) and it is possible that doing it in the small hours of the morning wasn't a good idea. The info on the page as it was left me asking more questions which were answered by the github issue and, in particular, that command line sequence. You don't need that command-line but you do need the systemd services that it enables (you could enable them by hand if you preferred). Maybe you don't need all six of them. But, as it was, it wasn't clear (to me). starfry (talk) 16:07, 31 May 2018 (UTC)