ZFS on Linux: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
(Die Seite wurde neu angelegt: „ZFS Linux Create /etc/udev/rules.d/99-local-grub.rules with this content: <source lang=bash> # Create by-id links in /de…“) |
No edit summary |
||
Line 1: | Line 1: | ||
[[Kategorie:Linux|ZFS]] | [[Kategorie:Linux|ZFS]] | ||
[[Kategorie:ZFS|Linux]] | [[Kategorie:ZFS|Linux]] | ||
[[Kategorie:VirtualBox|ZFS]] | |||
Create /etc/udev/rules.d/99-local-grub.rules with this content: | Create /etc/udev/rules.d/99-local-grub.rules with this content: | ||
Line 7: | Line 8: | ||
# Add links for zfs_member only | # Add links for zfs_member only | ||
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}-part%n" | KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}-part%n" | ||
</source> | |||
If you use ZVols as rawvmdk-device in VirtualBox as normal user (vmuser in this example) create /etc/udev/rules.d/99-local-zvol.rules with this content: | |||
<source lang=bash> | |||
KERNEL=="zd*" SUBSYSTEM=="block" ACTION=="add|change" PROGRAM="/lib/udev/zvol_id /dev/%k" RESULT=="rpool/VM/*" OWNER="vmuser" | |||
</source> | |||
<source lang=bash> | |||
vmuser@virtualbox-server:~$ VBoxManage internalcommands createrawvmdk -filename /var/data/VMs/dev/Solaris10.vmdk -rawdisk /dev/zvol/rpool/VM/Solaris10 | |||
</source> | </source> |
Revision as of 16:45, 12 August 2015
Create /etc/udev/rules.d/99-local-grub.rules with this content:
# Create by-id links in /dev as well for zfs vdev. Needed by grub
# Add links for zfs_member only
KERNEL=="sd*[0-9]", IMPORT{parent}=="ID_*", ENV{ID_FS_TYPE}=="zfs_member", SYMLINK+="$env{ID_BUS}-$env{ID_SERIAL}-part%n"
If you use ZVols as rawvmdk-device in VirtualBox as normal user (vmuser in this example) create /etc/udev/rules.d/99-local-zvol.rules with this content:
KERNEL=="zd*" SUBSYSTEM=="block" ACTION=="add|change" PROGRAM="/lib/udev/zvol_id /dev/%k" RESULT=="rpool/VM/*" OWNER="vmuser"
vmuser@virtualbox-server:~$ VBoxManage internalcommands createrawvmdk -filename /var/data/VMs/dev/Solaris10.vmdk -rawdisk /dev/zvol/rpool/VM/Solaris10