
我正在嘗試透過將即時系統(Ubtunu 14.04)中的所有檔案從ext4 分割區移至外部設備,在外部裝置上建立ZFS 池,將我的根分割區從ext4 變更為zfs(簡單分割區,沒有ZFS 磁碟區管理功能)分區並將文件移回。
有很多指南解釋如何在根 ZFS 池上設定作業系統(包括 Ubuntu),但我沒有找到一個解釋我想要在不設定 ZFS 啟動分區/資料集的情況下進行的簡單遷移的指南(我發現最有用的是http://blog.ls-al.com/ubuntu-on-a-zfs-root-file-system-for-ubuntu-14-04/)。當然,可以從此類指南中抽像出步驟,但我寧願從專家那裡得到一些小指導,而不是自己進行試誤方法。
一般問題:目前,我缺乏理解如何告訴我的系統在/' at boot. Although it is not recommended I guess setting
mountpoint=legacy and adding an entry in
/etc/fstab` 下掛載 ZFS 分區(就像我在遷移到另一種檔案系統類型後所做的那樣)應該足夠了,對吧?
實際問題:
- 如果我使用 建立池
zpool create /dev/sdaX
,我會收到訊息ALERT! /dev/disk/by-uuid/<uuid of my root partition> doesn't exist
。當zpool create /dev/disk/by-id/<id>
我使用/usr/sbin/grub-probe: error: failed to get canonical path of
/dev/when I run update-grub in chroot in live system. What Do I have to specify in
zpool create`建立它時? - 我是否必須在實時系統中在 chroot 中設定係統(導入池、更新 initramfs)?我將文件複製回一個名為
rpool/ROOT/ubuntu-1
並添加rpool/ROOT/ubuntu-1
到的資料集/etc/fstab
(在該資料集中)。
在 initramfs shell 中運作mount -t zfs rpool/ROOT/ubuntu-1 /root && chroot /root zpool import rpool
不起作用,因為未載入 zfs 模組。ubuntu-zfs
已安裝,並且我將其用作資料分區很長一段時間,沒有遇到任何問題。
答案1
核心參數boot=zfs
、bootfs
且未rpool
被 grub 正確設定(「更新」ppa:zfs-native/grub
僅用於 raring),且必須新增至/boot/grub/grub.cfg
您linux
選擇的語句中,請參閱https://github.com/zfsonlinux/pkg-zfs/wiki/HOWTO-install-Ubuntu-to-a-Native-ZFS-Root-Filesystem了解詳情。