Re: SAS Drive identification LEDs
On 21/03/2012 08:23, Matt Burke wrote: Under 9.0-RELEASE I'm having trouble figuring out how to light up the drive identification/fault lights on my enclosure (SAS disks on Chenbro 80H10321513C0 backplanes attached to Areca ARC-1320 HBAs) # setobjstat /dev/ses0 0xb 0x80 0x00 0x02 0x00 < light on drive bay 8 starts flashing> # setobjstat /dev/ses0 0xb 0x80 0x00 0x00 0x00 < light on drive bay 8 stops flashing> Which is great, but how can I work out how /dev/daNN maps to /dev/sesN element 0xNN? Not sure if I can help but I'll throw these thoughts at you - If I run dmesg | grep ada0 the first and last lines are - ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: Previously was known as ad4 or ls -l /dev | grep ada lrw-rw-rw- 1 root wheel - 4B 6 Mar 04:19 ad4@ -> ada0 lrw-rw-rw- 1 root wheel - 6B 6 Mar 04:19 ad4p1@ -> ada0p1 ... lrw-rw-rw- 1 root wheel - 4B 6 Mar 04:19 ad8@ -> ada1 lrw-rw-rw- 1 root wheel - 6B 6 Mar 16:19 ad8p1@ -> ada1p1 ... I think man glabel may give some ideas but man libgeom would be a starting place if your looking at drivers. I've read mav@'s 2011 PDF on Enclosure Management (http://people.freebsd.org/~mav/Enclosure_Management_en.pdf) which shows a work-in-progress driver and getencstat which does what I need, but it looks like the project's not been committed yet. Sounds like this is your best bet. Find out how close he is to release and offer to test, help push to be accepted in trunk. ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Debugging periodic scripts
(Please keep me CC'd as I'm not subscribed) Hi folks, Does anyone know how to go about debugging periodic scripts, such as getting useful debug output from start to finish? Basically the situation is this: - We have 5 systems which are RELENG_8 (some 8.2-STABLE, and a couple 8.3-PRERELEASE). These are all bare metal boxes, not VMs. - All the machines have WITHOUT_IPFILTER=true defined in src.conf. - All the machines also have this in their /etc/periodic.conf : daily_status_security_ipfdenied_enable="no" - All the machines run ntpd and do not have clock skew problems or other odd anomalies (they all work great hardware-wise) or filesystem issues (all are using UFS2). On 2 of the systems, /etc/periodic/security/510.ipfdenied gets run during "periodic security" even though it's explicitly shut off in periodic.conf. Thus on these 2 systems, our security mails contain this line: ipfstat: not found I've checked permissions on everything I can think of (from / all the way down) but it all looks fine. I even wrote a small forloop to check all the systems' periodic.conf files and ensure the ipfdenied_enable line is proper (no weird trailing or preceding spaces, high-bit characters, DOS CRs, etc.) and they all check out (1 line, 44 characters long). One of the boxes was even recently rebuilt from scratch (full format + OS reinstall); it exhibited this problem prior to the rebuild, as well as after the rebuild. None of the systems have any unique changes to /root dotfiles nor the shell adjustments in things like /etc/profile, /etc/csh*, etc.. I've tried doing this: (sh -x /etc/periodic/security/510.ipfdenied >& /dev/stdout) | grep ipfdenied Which returns exactly what I would expect: + daily_status_security_ipfwdenied_enable=YES + daily_status_security_ipfdenied_enable=YES + daily_status_security_ipfwlimit_enable=YES + daily_status_security_ipf6denied_enable=YES + daily_status_security_ipfdenied_enable=no The first 4 come from /etc/defaults/periodic.conf, the last comes from /etc/periodic.conf. Running /etc/periodic/security/510.ipfdenied from a root shell results in no output. Editing /etc/periodic/security/510.ipfdenied's hashbang line to use -x doesn't change the behaviour either (maybe stderr gets sent to /dev/null?), whether I run it by hand as a script or via "periodic security". Other settings in periodic.conf are in fact honoured, such as daily_status_smart_enable and some others, so I'm inclined to believe periodic.conf is indeed being read. I don't know what's making this situation. I haven't resorted to using ktrace yet but will down the road assuming nobody has any other ideas. Otherwise something tells me I'm going to have to go look at the periodic source code to figure out what's going on under the hood. Thoughts/ideas? -- | Jeremy Chadwick jdc at parodius.com | | Parodius Networking http://www.parodius.com/ | | UNIX Systems Administrator Mountain View, CA, US | | Making life hard for others since 1977. PGP 4BD6C0CB | ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: Debugging periodic scripts
On 23/03/2012 11:08, Jeremy Chadwick wrote: > On 2 of the systems, /etc/periodic/security/510.ipfdenied gets run > during "periodic security" even though it's explicitly shut off in > periodic.conf. Thus on these 2 systems, our security mails contain this > line: ipfstat: not found Are you sure that's not coming from 610.ipf6denied ? Cheers, Matthew -- Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate JID: matt...@infracaninophile.co.uk Kent, CT11 9PW signature.asc Description: OpenPGP digital signature
Can't load many network kernel module in 8.3-PREREALEASE
Hi, I can't load many if_* module on FreeBSD 8.3-PRERELEASE on amd64 and i386. I have rebuild the system from the latest source. When I try a kldload /boot/kernel/if_*.ko I have error such as "file exist" or "exec format error". kldstat just after system start: Id Refs AddressSize Name 11 0x8010 e58280 kernel kldload -v /boot/kernel/if_*.ko: kldload: can't load /boot/kernel/if_ae.ko: File exists kldload: can't load /boot/kernel/if_age.ko: File exists kldload: can't load /boot/kernel/if_alc.ko: File exists kldload: can't load /boot/kernel/if_ale.ko: File exists kldload: can't load /boot/kernel/if_an.ko: File exists kldload: can't load /boot/kernel/if_ath.ko: Exec format error kldload: can't load /boot/kernel/if_aue.ko: Exec format error kldload: can't load /boot/kernel/if_axe.ko: Exec format error kldload: can't load /boot/kernel/if_bce.ko: File exists kldload: can't load /boot/kernel/if_bfe.ko: File exists kldload: can't load /boot/kernel/if_bge.ko: File exists kldload: can't load /boot/kernel/if_cdce.ko: Exec format error kldload: can't load /boot/kernel/if_cue.ko: Exec format error kldload: can't load /boot/kernel/if_dc.ko: File exists kldload: can't load /boot/kernel/if_de.ko: File exists kldload: can't load /boot/kernel/if_ed.ko: File exists kldload: can't load /boot/kernel/if_em.ko: File exists kldload: can't load /boot/kernel/if_en.ko: Exec format error kldload: can't load /boot/kernel/if_et.ko: File exists kldload: can't load /boot/kernel/if_faith.ko: Exec format error kldload: can't load /boot/kernel/if_fatm.ko: Exec format error kldload: can't load /boot/kernel/if_fwe.ko: Exec format error kldload: can't load /boot/kernel/if_fwip.ko: Exec format error kldload: can't load /boot/kernel/if_fxp.ko: File exists kldload: can't load /boot/kernel/if_gif.ko: Exec format error kldload: can't load /boot/kernel/if_hatm.ko: Exec format error kldload: can't load /boot/kernel/if_igb.ko: File exists kldload: can't load /boot/kernel/if_jme.ko: File exists kldload: can't load /boot/kernel/if_kue.ko: Exec format error kldload: can't load /boot/kernel/if_le.ko: File exists kldload: can't load /boot/kernel/if_lge.ko: File exists kldload: can't load /boot/kernel/if_msk.ko: File exists kldload: can't load /boot/kernel/if_nfe.ko: File exists kldload: can't load /boot/kernel/if_nge.ko: File exists kldload: can't load /boot/kernel/if_patm.ko: Exec format error kldload: can't load /boot/kernel/if_pcn.ko: File exists kldload: can't load /boot/kernel/if_ral.ko: File exists kldload: can't load /boot/kernel/if_re.ko: File exists kldload: can't load /boot/kernel/if_rl.ko: File exists kldload: can't load /boot/kernel/if_rue.ko: Exec format error kldload: can't load /boot/kernel/if_rum.ko: Exec format error kldload: can't load /boot/kernel/if_sf.ko: File exists kldload: can't load /boot/kernel/if_sge.ko: File exists kldload: can't load /boot/kernel/if_sis.ko: File exists kldload: can't load /boot/kernel/if_sk.ko: File exists kldload: can't load /boot/kernel/if_sn.ko: File exists kldload: can't load /boot/kernel/if_ste.ko: File exists kldload: can't load /boot/kernel/if_stge.ko: File exists kldload: can't load /boot/kernel/if_ti.ko: File exists kldload: can't load /boot/kernel/if_tl.ko: File exists kldload: can't load /boot/kernel/if_tun.ko: File exists kldload: can't load /boot/kernel/if_tx.ko: File exists kldload: can't load /boot/kernel/if_txp.ko: File exists kldload: can't load /boot/kernel/if_uath.ko: Exec format error kldload: can't load /boot/kernel/if_udav.ko: Exec format error kldload: can't load /boot/kernel/if_upgt.ko: Exec format error kldload: can't load /boot/kernel/if_ural.ko: Exec format error kldload: can't load /boot/kernel/if_vge.ko: File exists kldload: can't load /boot/kernel/if_vlan.ko: Exec format error kldload: can't load /boot/kernel/if_vr.ko: File exists kldload: can't load /boot/kernel/if_vx.ko: File exists kldload: can't load /boot/kernel/if_wb.ko: File exists kldload: can't load /boot/kernel/if_wi.ko: File exists kldload: can't load /boot/kernel/if_xl.ko: File exists kldload: can't load /boot/kernel/if_zyd.ko: Exec format error Loaded /boot/kernel/if_bridge.ko, id=2 Loaded /boot/kernel/if_bwi.ko, id=4 Loaded /boot/kernel/if_bwn.ko, id=5 Loaded /boot/kernel/if_carp.ko, id=7 Loaded /boot/kernel/if_cas.ko, id=8 Loaded /boot/kernel/if_cxgb.ko, id=9 Loaded /boot/kernel/if_cxgbe.ko, id=10 Loaded /boot/kernel/if_disc.ko, id=11 Loaded /boot/kernel/if_edsc.ko, id=12 Loaded /boot/kernel/if_ef.ko, id=13 Loaded /boot/kernel/if_epair.ko, id=15 Loaded /boot/kernel/if_gem.ko, id=17 Loaded /boot/kernel/if_gre.ko, id=18 Loaded /boot/kernel/if_hme.ko, id=19 Loaded /boot/kernel/if_ic.ko, id=20 Loaded /boot/kernel/if_ipheth.ko, id=22 Loaded /boot/kernel/if_ipw.ko, id=23 Loaded /boot/kernel/if_iwi.ko, id=24 Loaded /boot/kernel/if_iwn.ko, id=25 Loaded /boot/kernel/if_ixgb.ko, id=26 Loaded /boot/kernel/if_lagg.ko, id=27 Loaded /boot/kernel/if_lmc.ko, id=28 Loaded /boot/kernel/if_malo.
Re: Can't load many network kernel module in 8.3-PREREALEASE
On Fri, 2012-03-23 at 12:19 +0100, Quentin Schwerkolt wrote: > Hi, > > I can't load many if_* module on FreeBSD 8.3-PRERELEASE on amd64 and i386. > I have rebuild the system from the latest source. When I try a kldload > /boot/kernel/if_*.ko I have error such as "file exist" or "exec format > error". > > kldstat just after system start: > Id Refs AddressSize Name > 11 0x8010 e58280 kernel > > kldload -v /boot/kernel/if_*.ko: > kldload: can't load /boot/kernel/if_ae.ko: File exists > kldload: can't load /boot/kernel/if_age.ko: File exists > kldload: can't load /boot/kernel/if_alc.ko: File exists > kldload: can't load /boot/kernel/if_ale.ko: File exists > kldload: can't load /boot/kernel/if_an.ko: File exists > kldload: can't load /boot/kernel/if_ath.ko: Exec format error > kldload: can't load /boot/kernel/if_aue.ko: Exec format error > kldload: can't load /boot/kernel/if_axe.ko: Exec format error > kldload: can't load /boot/kernel/if_bce.ko: File exists > kldload: can't load /boot/kernel/if_bfe.ko: File exists > kldload: can't load /boot/kernel/if_bge.ko: File exists > kldload: can't load /boot/kernel/if_cdce.ko: Exec format error > kldload: can't load /boot/kernel/if_cue.ko: Exec format error > kldload: can't load /boot/kernel/if_dc.ko: File exists > kldload: can't load /boot/kernel/if_de.ko: File exists > kldload: can't load /boot/kernel/if_ed.ko: File exists > kldload: can't load /boot/kernel/if_em.ko: File exists > kldload: can't load /boot/kernel/if_en.ko: Exec format error > kldload: can't load /boot/kernel/if_et.ko: File exists > kldload: can't load /boot/kernel/if_faith.ko: Exec format error > kldload: can't load /boot/kernel/if_fatm.ko: Exec format error > kldload: can't load /boot/kernel/if_fwe.ko: Exec format error > kldload: can't load /boot/kernel/if_fwip.ko: Exec format error > kldload: can't load /boot/kernel/if_fxp.ko: File exists > kldload: can't load /boot/kernel/if_gif.ko: Exec format error > kldload: can't load /boot/kernel/if_hatm.ko: Exec format error > kldload: can't load /boot/kernel/if_igb.ko: File exists > kldload: can't load /boot/kernel/if_jme.ko: File exists > kldload: can't load /boot/kernel/if_kue.ko: Exec format error > kldload: can't load /boot/kernel/if_le.ko: File exists > kldload: can't load /boot/kernel/if_lge.ko: File exists > kldload: can't load /boot/kernel/if_msk.ko: File exists > kldload: can't load /boot/kernel/if_nfe.ko: File exists > kldload: can't load /boot/kernel/if_nge.ko: File exists > kldload: can't load /boot/kernel/if_patm.ko: Exec format error > kldload: can't load /boot/kernel/if_pcn.ko: File exists > kldload: can't load /boot/kernel/if_ral.ko: File exists > kldload: can't load /boot/kernel/if_re.ko: File exists > kldload: can't load /boot/kernel/if_rl.ko: File exists > kldload: can't load /boot/kernel/if_rue.ko: Exec format error > kldload: can't load /boot/kernel/if_rum.ko: Exec format error > kldload: can't load /boot/kernel/if_sf.ko: File exists > kldload: can't load /boot/kernel/if_sge.ko: File exists > kldload: can't load /boot/kernel/if_sis.ko: File exists > kldload: can't load /boot/kernel/if_sk.ko: File exists > kldload: can't load /boot/kernel/if_sn.ko: File exists > kldload: can't load /boot/kernel/if_ste.ko: File exists > kldload: can't load /boot/kernel/if_stge.ko: File exists > kldload: can't load /boot/kernel/if_ti.ko: File exists > kldload: can't load /boot/kernel/if_tl.ko: File exists > kldload: can't load /boot/kernel/if_tun.ko: File exists > kldload: can't load /boot/kernel/if_tx.ko: File exists > kldload: can't load /boot/kernel/if_txp.ko: File exists > kldload: can't load /boot/kernel/if_uath.ko: Exec format error > kldload: can't load /boot/kernel/if_udav.ko: Exec format error > kldload: can't load /boot/kernel/if_upgt.ko: Exec format error > kldload: can't load /boot/kernel/if_ural.ko: Exec format error > kldload: can't load /boot/kernel/if_vge.ko: File exists > kldload: can't load /boot/kernel/if_vlan.ko: Exec format error > kldload: can't load /boot/kernel/if_vr.ko: File exists > kldload: can't load /boot/kernel/if_vx.ko: File exists > kldload: can't load /boot/kernel/if_wb.ko: File exists > kldload: can't load /boot/kernel/if_wi.ko: File exists > kldload: can't load /boot/kernel/if_xl.ko: File exists > kldload: can't load /boot/kernel/if_zyd.ko: Exec format error > Loaded /boot/kernel/if_bridge.ko, id=2 > Loaded /boot/kernel/if_bwi.ko, id=4 > Loaded /boot/kernel/if_bwn.ko, id=5 > Loaded /boot/kernel/if_carp.ko, id=7 > Loaded /boot/kernel/if_cas.ko, id=8 > Loaded /boot/kernel/if_cxgb.ko, id=9 > Loaded /boot/kernel/if_cxgbe.ko, id=10 > Loaded /boot/kernel/if_disc.ko, id=11 > Loaded /boot/kernel/if_edsc.ko, id=12 > Loaded /boot/kernel/if_ef.ko, id=13 > Loaded /boot/kernel/if_epair.ko, id=15 > Loaded /boot/kernel/if_gem.ko, id=17 > Loaded /boot/kernel/if_gre.ko, id=18 > Loaded /boot/kernel/if_hme.ko, id=19 > Loaded /boot/kernel/if_ic.ko, id=20 > Loaded /boot/kernel/if_ipheth.ko, id=22 > Load
Re: Can't load many network kernel module in 8.3-PREREALEASE
On Fri, Mar 23, 2012 at 4:19 AM, Quentin Schwerkolt wrote: > Hi, > > I can't load many if_* module on FreeBSD 8.3-PRERELEASE on amd64 and i386. > I have rebuild the system from the latest source. When I try a kldload > /boot/kernel/if_*.ko I have error such as "file exist" or "exec format > error". > > kldstat just after system start: > Id Refs Address Size Name > 1 1 0x8010 e58280 kernel > > kldload -v /boot/kernel/if_*.ko: > kldload: can't load /boot/kernel/if_ae.ko: File exists > kldload: can't load /boot/kernel/if_age.ko: File exists > kldload: can't load /boot/kernel/if_alc.ko: File exists > kldload: can't load /boot/kernel/if_ale.ko: File exists > kldload: can't load /boot/kernel/if_an.ko: File exists > kldload: can't load /boot/kernel/if_ath.ko: Exec format error > kldload: can't load /boot/kernel/if_aue.ko: Exec format error > kldload: can't load /boot/kernel/if_axe.ko: Exec format error GENERIC already has all of these drivers. Did you buidt a kernel with no network interfaces? If the kernel is built with the drivers, you can't load them as they already exist. (And you can't unload drivers built into the kernel, either.) -- R. Kevin Oberman, Network Engineer E-mail: kob6...@gmail.com ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
FreeBSD 9-STABLE can not mount root from a glabled device
All I upgraded two of my 7-STABLE servers to 9-STABLE today and found two foot shooters. I believe they are bugs only when you upgrade from pre 8.0-RELEASE to 9.0-RELEASE or 9-STABLE 1. On 7.x I had been using glabel to label my root filesystem slice, swap slice , and var slice . Like this glabel label rootfs /dev/da0s1a glabel label var /dev/da0s1d glabel label SWAP /dev/da0s1b Then in fstab I would have entries like this. # DeviceMountpoint FStype Options DumpPass# /dev/label/rootfs / ufs rw 1 1 /dev/label/var /varufs rw 2 2 /dev/label/SWAP noneswapsw 0 0 This has worked for me in 6.x and 7.x however upon upgrading to 9-STABLE ( from yesterday ) or 9.0-RELEASE the boot loader could not find the labeled device. I had to manually set vfs.root.mountfrom=ufs:/dev/da0s1a" or key that in when the boot process bombed out. 2. After fixing the fstabs to use the real da names I wanted to see what the boot loader would do with ufs labels. I rebooted my box into single user mode and ran this tunefs -L rootfs /dev/da0s1a tunefs -L var /dev/da0s1d Then edited the fstab to use the labeled filesystems and rebooted, much to my surprise it failed in the same way. I compared this to a new 9.0-STABLE install i did which used gpt labels that did would # DeviceMountpoint FStype Options DumpPass# /dev/label/SWAP noneswapsw 0 0 /dev/gpt/rootfs / ufs rw 1 1 /dev/gpt/var/varufs rw 2 2 /dev/gpt/data /data ufs rw 2 2 So far as I can tell the only difference is that the fresh install uses the GPT partitioning scheme where as the upgraded boxes us the older mbr/fdisk setup. Any ideas on what I can try to get past this ? I liked using /dev/label as it made the devices sort of agnostic to what filesystem or partitioning scheme was on them. -- mark saad | nones...@longcount.org ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"
Re: FreeBSD 9-STABLE can not mount root from a glabled device
On 23 March 2012 14:50, Mark Saad wrote: > All > I upgraded two of my 7-STABLE servers to 9-STABLE today and found > two foot shooters. I believe they are bugs only when you upgrade from > pre 8.0-RELEASE to 9.0-RELEASE or 9-STABLE > > 1. On 7.x I had been using glabel to label my root filesystem slice, > swap slice , and var slice . Like this > > glabel label rootfs /dev/da0s1a > glabel label var /dev/da0s1d > glabel label SWAP /dev/da0s1b > > Then in fstab I would have entries like this. > # Device Mountpoint FStype Options Dump Pass# > /dev/label/rootfs / ufs rw 1 1 > /dev/label/var /var ufs rw 2 2 > /dev/label/SWAP none swap sw 0 0 > > This has worked for me in 6.x and 7.x however upon upgrading to > 9-STABLE ( from yesterday ) or 9.0-RELEASE the boot loader could not > find the labeled device. > I had to manually set vfs.root.mountfrom=ufs:/dev/da0s1a" or key that > in when the boot process bombed out. > > 2. After fixing the fstabs to use the real da names I wanted to see > what the boot loader would do with ufs labels. I rebooted my box into > single user mode and ran this > > tunefs -L rootfs /dev/da0s1a > tunefs -L var /dev/da0s1d > > Then edited the fstab to use the labeled filesystems and rebooted, > much to my surprise it failed in the same way. > > I compared this to a new 9.0-STABLE install i did which used gpt > labels that did would > > # Device Mountpoint FStype Options Dump Pass# > /dev/label/SWAP none swap sw 0 0 > /dev/gpt/rootfs / ufs rw 1 1 > /dev/gpt/var /var ufs rw 2 2 > /dev/gpt/data /data ufs rw 2 2 > > > So far as I can tell the only difference is that the fresh install > uses the GPT partitioning scheme where as the upgraded boxes us the > older mbr/fdisk setup. > > Any ideas on what I can try to get past this ? I liked using > /dev/label as it made the devices sort of agnostic to what filesystem > or partitioning scheme was on them. > tunefs should put your labels under /dev/ufs/ Though I've not had any problems under 9.0 with labels on root. Is GEOM_LABEL built into your kernel or is it a module? (though I have my doubts about that causing this problem) The boot loader should merely grab the first 512K of whatever partition is marked as bootable without worrying where / might eventually be mounted from. /dev/label/swap0 none swap sw 0 0 /dev/ufs/rootfs / ufs rw,noatime 1 1 /dev/ufs/homefs /home ufs rw,noatime 2 3 /dev/ufs/usrfs /usrufs rw,noatime 2 2 /dev/ufs/varfs /varufs rw,noatime,async 2 2 tmpfs /tmp tmpfs rw 0 0 &cet -- -- ___ freebsd-stable@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-stable To unsubscribe, send any mail to "freebsd-stable-unsubscr...@freebsd.org"