Question about labels/names
CyberLeo Kitsana
cyberleo at cyberleo.net
Wed Nov 5 19:58:47 PST 2008
Hi!
In the interests of keeping things neat and tidy, I recently, completely
at random, randomly included a / character in a geom name (glabel or
gmirror) and discovered that it quite happily created a subdirectory
under /dev (/dev/mirror or /dev/label, respectively).
This seems like a useful method of keeping things tidy, but it smells
like a potentially unintended behavior; specifically because removing
the label or mirror does not remove the associated directory, and thus
recreations fail miserably. No problem for my usage of this feature, but
it was a surprise during tinkering and setup.
So, the question is this: Is the presence of hierarchial structures in
geom provider names an intended feature that can be relied upon, and
simply has a bug with regards to removing old provider names; or can I
expect my FreeBSD systems to mysteriously fail to mount root with some
kernel update in the future?
Thank you.
--
Fuzzy love,
-CyberLeo
Technical Administrator
CyberLeo.Net Webhosting
http://www.CyberLeo.Net
<CyberLeo at CyberLeo.Net>
Furry Peace! - http://wwww.fur.com/peace/
-------------- next part --------------
[cyberleo at nyoka ~]$ glabel list
Geom name: da0
Providers:
1. Name: label/nyoka/
Mediasize: 8589934080 (8.0G)
Sectorsize: 512
Mode: r5w5e5
secoffset: 0
offset: 0
seclength: 16777215
length: 8589934080
index: 0
Consumers:
1. Name: da0
Mediasize: 8589934592 (8.0G)
Sectorsize: 512
Mode: r5w5e6
Geom name: da1
Providers:
1. Name: label/nyoka/srv
Mediasize: 8589934080 (8.0G)
Sectorsize: 512
Mode: r1w1e1
secoffset: 0
offset: 0
seclength: 16777215
length: 8589934080
index: 0
Consumers:
1. Name: da1
Mediasize: 8589934592 (8.0G)
Sectorsize: 512
Mode: r1w1e2
[cyberleo at nyoka ~]$ ls -laRF /dev/label
total 2
dr-xr-xr-x 3 root wheel 512 Dec 31 1969 ./
dr-xr-xr-x 6 root wheel 512 Dec 31 1969 ../
dr-xr-xr-x 2 root wheel 512 Dec 31 1969 nyoka/
/dev/label/nyoka:
ls: : No such file or directory
total 1
dr-xr-xr-x 2 root wheel 512 Dec 31 1969 ./
dr-xr-xr-x 3 root wheel 512 Dec 31 1969 ../
crw-r----- 1 root operator 0, 88 Oct 12 03:27 a
crw-r----- 1 root operator 0, 89 Oct 12 03:27 b
crw-r----- 1 root operator 0, 90 Oct 12 03:27 c
crw-r----- 1 root operator 0, 91 Oct 12 03:27 d
crw-r----- 1 root operator 0, 92 Oct 12 03:27 e
crw-r----- 1 root operator 0, 93 Oct 12 03:27 f
crw-r----- 1 root operator 0, 83 Oct 12 03:32 srv
[cyberleo at nyoka ~]$ bsdlabel /dev/label/nyoka/c
# /dev/label/nyoka/c:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 1048576 16 4.2BSD 2048 16384 8
b: 1504912 1048592 swap
c: 16777215 0 unused 0 0 # "raw" part, don't edit
d: 2848468 2553504 4.2BSD 2048 16384 28552
e: 1048576 5402272 4.2BSD 2048 16384 8
f: 10326367 6450848 4.2BSD 2048 16384 28552
-------------- next part --------------
[cyberleo at paka ~]$ gmirror list
Geom name: paka/
State: COMPLETE
Components: 2
Balance: split
Slice: 4096
Flags: NONE
GenID: 0
SyncID: 1
ID: 1693380488
Providers:
1. Name: mirror/paka/
Mediasize: 249999999488 (233G)
Sectorsize: 512
Mode: r5w5e5
Consumers:
1. Name: da0
Mediasize: 250000000000 (233G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 1
ID: 2271483065
2. Name: da1
Mediasize: 250000000000 (233G)
Sectorsize: 512
Mode: r1w1e1
State: ACTIVE
Priority: 0
Flags: DIRTY
GenID: 0
SyncID: 1
ID: 1683486829
[cyberleo at paka ~]$ ls -laRF /dev/mirror
total 2
dr-xr-xr-x 3 root wheel 512 Oct 25 18:05 ./
dr-xr-xr-x 5 root wheel 512 Oct 25 18:05 ../
dr-xr-xr-x 2 root wheel 512 Oct 25 18:05 paka/
/dev/mirror/paka:
ls: : No such file or directory
total 1
dr-xr-xr-x 2 root wheel 512 Oct 25 18:05 ./
dr-xr-xr-x 3 root wheel 512 Oct 25 18:05 ../
crw-r----- 1 root operator 0, 101 Oct 25 18:05 a
crw-r----- 1 root operator 0, 102 Oct 25 18:05 b
crw-r----- 1 root operator 0, 103 Oct 25 18:05 c
crw-r----- 1 root operator 0, 104 Oct 25 18:05 d
crw-r----- 1 root operator 0, 105 Oct 25 18:05 e
crw-r----- 1 root operator 0, 106 Oct 25 18:05 f
[cyberleo at paka ~]$ bsdlabel /dev/mirror/paka/c
# /dev/mirror/paka/c:
8 partitions:
# size offset fstype [fsize bsize bps/cpg]
a: 1572864 16 4.2BSD 2048 16384 28528
b: 2097152 1572880 swap
c: 488281249 0 unused 0 0 # "raw" part, don't edit
d: 8388608 3670032 4.2BSD 2048 16384 28528
e: 2097152 12058640 4.2BSD 2048 16384 28528
f: 474125457 14155792 4.2BSD 2048 16384 28528
More information about the freebsd-geom
mailing list