Hello!
How to make kernel reread partition information from disk without reboot?
I want to make new slice on second HDD. Disk has two slices - ad7s1 (/tmp and second swap) and ad7s2 (/opt - UFS). I want to delete old /opt and make new /opt with ZFS.
I unmounted /opt and deleted slice:
but when I try to make new slice, gpart can't do this:
I tried also with '-b' and '-s' options with same result.
When I use sade or fdisk - it creates second slice (after sysctl kern.geom.debugflags=16). But geom can't see second slice on disk - gpart show shows only one slice on the disk when fdisk shows two!
Moreover - disk ad7 has two slices but there is no ad7s2 in /dev! So I can't use bsdlabel! As I read in Google fdisk and sade use direct access to the disk when gpart and bsdlabel uses kernel GEOM subsystem so I need to renew GEOM information in kernel so gpart and bsdlabel can use it.
So - how can I make kernel to renew information about slices, partitions and so on without restarting system?
How to make kernel reread partition information from disk without reboot?
I want to make new slice on second HDD. Disk has two slices - ad7s1 (/tmp and second swap) and ad7s2 (/opt - UFS). I want to delete old /opt and make new /opt with ZFS.
I unmounted /opt and deleted slice:
Code:
#umount /opt
#gpart delete -i 2 ad7
Code:
#gpart add -t freebsd-zfs ad7
gpart: Invalid argument
I tried also with '-b' and '-s' options with same result.
When I use sade or fdisk - it creates second slice (after sysctl kern.geom.debugflags=16). But geom can't see second slice on disk - gpart show shows only one slice on the disk when fdisk shows two!
Moreover - disk ad7 has two slices but there is no ad7s2 in /dev! So I can't use bsdlabel! As I read in Google fdisk and sade use direct access to the disk when gpart and bsdlabel uses kernel GEOM subsystem so I need to renew GEOM information in kernel so gpart and bsdlabel can use it.
So - how can I make kernel to renew information about slices, partitions and so on without restarting system?