Bug 72333

Summary: vinum doesn't scan for drives on slices on amd64
Product: Base System Reporter: Javier Ramirez <jramirez>
Component: amd64Assignee: freebsd-amd64 (Nobody) <amd64>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 5.3-BETA6   
Hardware: Any   
OS: Any   

Description Javier Ramirez 2004-10-04 20:20:12 UTC
Code at file /usr/src/sys/dev/vinum/vinumio.c , where vinum scans for drives looking for vinum partitions, it only considers slices existence (aka ad0s1h) when "__i386__" is defined. 

So, i suppose that code doesn't execute on amd64 machines and vinum doesn't find vinum partitions on a pc slice. So, it doesn't find vinum partitions (this is critical for mounting root filesystem over vinum) when you put vinum.autostart="YES" in /boot/loader.conf.

By hand, vinum works if you do "vinum read ad4", because it find the vinum partition at this drive. But "vinum read" doesn't scan on pc slices, too (i suppose that use the same scan routine than boot scan).

Fix: 

Probably code at file /usr/src/sys/dev/vinum/vinumio.c , where vinum scans for drives looking for vinum partitions, must consider slices existence (aka ad0s1h) when "__i386__" or "__amd64__" is defined (not only "__i386__".
How-To-Repeat: On a amd64 box: install with /stand/sysinstall over a slice (aka ad0s1). Configure a vinum partition for root on than slice (aka ad0s1h). 

Configure 
vinum_load="YES"
vinum.autostart="YES"
in /boot/loader.conf

Reboot (on single user, for example), and see "vinum: no drives found". 

Warning: test with vinum partitions only on slices (if vinum takes its configuration from another copy in any drive, i suppose it will read the configuration from that drive.
Comment 1 Peter Wemm freebsd_committer freebsd_triage 2004-11-29 23:40:25 UTC
State Changed
From-To: open->closed

Patch to enable slice scanning for amd64 committed as vinumio.c:1.100.2.1 
in RELENG_5