[zfs-discuss] Are /dev objects required for clean shutdown?
Cliff L. Biffle
cbiffle at gmail.com
Tue Feb 6 11:40:56 EST 2018
So, assuming your /dev is a devtmpfs, meaning it got populated by the
kernel early in startup and maintained by udevd after that -- I can't
figure out how to *automatically* create a device node. The StackOverflow
posts (which I assume you also found) are all wrong.
*However*, devtmpfs is not magic (like devfs was) and so you can do it by
hand. Here's a procedure that's tested and working on my machine.
In the second line you're determining the major/minor device numbers for
the /dev/zfs node. These are automatically assigned in modern kernels so
PLEASE do not just copy mine, run the command to find yours.
# Man, the weird things I do to help people...
[cbiffle at metis ~]$ sudo rm /dev/zfs # you already did this
[cbiffle at metis ~]$ cat /sys/devices/virtual/misc/zfs/dev
10:58 # YOUR NUMBERS MAY BE DIFFERENT! Check.
[cbiffle at metis ~]$ sudo mknod /dev/zfs c 10 58 # recreate device
[cbiffle at metis ~]$ sudo zpool status
This will get you the ability to administer ZFS, but not any e.g. zvol
nodes you once had. I would probably use this to safely offline the pool
and then reboot.
Hope that helped.
On Tue, Feb 6, 2018 at 8:05 AM, Pascal via zfs-discuss <
zfs-discuss at list.zfsonlinux.org> wrote:
> /dev on my CentOS 7 box took a 'rm -rf' yesterday, wiping out most of it,
> including /dev/zfs, /dev/zvol, /dev/zd0, and all the devices my RAIDZ3
> resides on. Easiest way to recover is to reboot (/dev is on a ramdrive and
> created from scratch during boot), but I'm worried about not getting a
> clean shutdown. Does zfs need anything in /dev to shutdown cleanly? If
> so, how do I recreate the devices?
> zpool and zfs both give me:
> The /dev/zfs device is missing and must be created.
> Try running 'udevadm trigger' as root to create it.
> but that command doesn't seem to do anything. I also found documentation
> saying to try "udevadm control --reload-rules" first, but again nothing.
> zfs-discuss mailing list
> zfs-discuss at list.zfsonlinux.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the zfs-discuss