GEOM Withering
GEOM(8) is a great stack for managing storage medium, and it is in my opinion one of the great advantages of FreeBSD over other operating systems. Nevertheless, GEOM can sometime act strangely with respect to what a sysadmin is expecting, and one controversial feature is withering a provider. But what is withering? Imagine we have a disk, named ada4 with a single GPT partition:
# glabel list ada4
Geom name: ada4
Providers:
1. Name: diskid/DISK-VB97f8d8f5-8f70a2a4
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 4194304
length: 2147483648
index: 0
Consumers:
1. Name: ada4
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Mode: r0w0e0
/dev/
filesystem:
# ls -l /dev/diskid/DISK-VB97f8d8f5-8f70a2a4 /dev/ada4p1
crw-r----- 1 root operator 0x68 Oct 2 16:17 /dev/ada4p1
crw-r----- 1 root operator 0x74 Oct 2 16:29 /dev/diskid/DISK-VB97f8d8f5-8f70a2a4
# glabel label DATA4 ada4
# glabel list ada4
Geom name: ada4
Providers:
1. Name: label/DATA4
Mediasize: 2147483136 (2.0G)
Sectorsize: 512
Mode: r0w0e0
secoffset: 0
offset: 0
seclength: 4194303
length: 2147483136
index: 0
Consumers:
1. Name: ada4
Mediasize: 2147483648 (2.0G)
Sectorsize: 512
Mode: r0w0e0
# ls -l /dev/ada4p1 /dev/label/DATA4 /dev/diskid/DISK-VB97f8d8f5-8f70a2a4
crw-r----- 1 root operator 0x74 Oct 2 16:41 /dev/ada4p1
crw-r----- 1 root operator 0x76 Oct 2 16:41 /dev/diskid/DISK-VB97f8d8f5-8f70a2a4
crw-r----- 1 root operator 0x75 Oct 2 16:41 /dev/label/DATA4
# mount /dev/ada4p1 /mnt/data4
# ls -l /dev/ada4p1 /dev/label/DATA4 /dev/diskid/DISK-VB97f8d8f5-8f70a2a4
ls: /dev/diskid/DISK-VB97f8d8f5-8f70a2a4: No such file or directory
ls: /dev/label/DATA4: No such file or directory
crw-r----- 1 root operator 0x79 Oct 2 16:46 /dev/ada4p1
# umount /mnt/data4
# ls -l /dev/ada4p1 /dev/label/DATA4 /dev/diskid/DISK-VB97f8d8f5-8f70a2a4
crw-r----- 1 root operator 0x79 Oct 2 16:46 /dev/ada4p1
crw-r----- 1 root operator 0x74 Oct 2 16:48 /dev/diskid/DISK-VB97f8d8f5-8f70a2a4
crw-r----- 1 root operator 0x68 Oct 2 16:48 /dev/label/DATA4
- reading
- writing
- with exclusive access
dev
filesystem. For more information see g_wither_geom(9)
and geom(4)
ORPHANIZATION example.