|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
|||||||||||||||||||||||||||||||||||||||||||||||
2015年12月31日(木) 旧暦 [n年日記] [更新:"2015/12/31 13:00:22"]#1 [NetBSD] Raid setup
最近 N3150 の機械に Software RAID を設定した。
@ 続いて DL320/G5p にも 同様に入れようと:
(以前どこまでやったか覚えていないので)
p400 controller のもの 1TB x 4 の構成 目印: 00:22:64:01:9c:64 # dmesg |grep ciss ciss0 at pci1 dev 0 function 0: HP Smart Array 3 ciss0: interrupting at ioapic0 pin 16 ciss0: 1 LD, HW rev 3, FW 2.08/2.08 scsibus0 at ciss0: 1 target, 1 lun per target ciss0: normal state on 'ciss0:0' (online) # | sd0 at scsibus0 target 0 lun 0: <HP, LOGICAL VOLUME, 2.08> disk fixed | sd0: 2794 GB, 65535 cyl, 255 head, 350 sec, 512 bytes/sect x 5860378032 sectors | sd0: GPT GUID: b07e7971-f757-11e2-a2a5-002264019c64 | sd0: bad GPT partition array CRC | sd0: async, 8-bit transfers, tagged queueing何だか変。最初からやり直す。Hardware RAID は(僕にとっては)ある意味取扱い難いので、 Software RAID にするつもり。 @ 別の E400 Controller の機械には:
DragonFly BSD 3.6.0 が入っていた (1GB Memory/ 80GB x 4 Disk)
目印 00:24:81:00:91:14 Disk を 1.5T x 4 に入替えて network 起動 sd0 at scsibus0 target 0 lun 0: <HP, LOGICAL VOLUME, 1.86> disk fixed sd0: 4191 GB, 65535 cyl, 255 head, 526 sec, 512 bytes/sect x 8790633264 sectors sd0: async, 8-bit transfers, tagged queueingとなってしまったので、やり直し。しかるべきところで F8 を押し、Delete Logical Drive をしたが、 これでは disk は一つも見えない。 止むを得ないので E400 Controller を外して SATA port から直結にした。 こんどは、次のように見える。 wd0: <WDC WD15EARS-00MVWB0> wd0: 1397 GB, 2907021 cyl, 16 head, 63 sec, 512 bytes/sect x 2930277168 sectors wd1 at atabus0 drive 1 wd1: <WDC WD15EARS-00MVWB0> wd1: 1397 GB, 2907021 cyl, 16 head, 63 sec, 512 bytes/sect x 2930277168 sectors wd2 at atabus1 drive 0 wd2: <WDC WD15EARS-00MVWB0> wd2: 1397 GB, 2907021 cyl, 16 head, 63 sec, 512 bytes/sect x 2930277168 sectors wd3 at atabus1 drive 1 wd3: <WDC WD15EARS-00MVWB0> wd3: 1397 GB, 2907021 cyl, 16 head, 63 sec, 512 bytes/sect x 2930277168 sectorsdisklabel wd0a
# disklabel -i wd0a
Enter '?' for help
partition>P
4 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 2930277168 0 4.2BSD 0 0 0 # (Cyl. 0 - 2907020)
d: 2930277168 0 unused 0 0 # (Cyl. 0 - 2907020)
partition>a
Filesystem type [4.2BSD]:
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: 2048s
Partition size ('$' for all remaining) [2907021c, 2930277168s, 1430799.375M]: 500MB
a: 1024000 2048 4.2BSD 0 0 0 # (Cyl. 2*- 1017*)
partition>e
Filesystem type [unused]: RAID
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: a
Partition size ('$' for all remaining) [0c, 0s, 0M]: 20000M
e: 40960000 1026048 RAID # (Cyl. 1017*- 41652*)
partition>f
Filesystem type [unused]: RAID
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: f
Partition size ('$' for all remaining) [0c, 0s, 0M]:
partition>f
Filesystem type [RAID]:
Start offset ('x' to start after partition 'x') [0c, 0s, 0M]: e
Partition size ('$' for all remaining) [0c, 0s, 0M]: $
f: 2888291120 41986048 RAID # (Cyl. 41652*- 2907020)
partition>P
6 partitions:
# size offset fstype [fsize bsize cpg/sgs]
a: 1024000 2048 4.2BSD 0 0 0 # (Cyl. 2*- 1017*)
d: 2930277168 0 unused 0 0 # (Cyl. 0 - 2907020)
e: 40960000 1026048 RAID # (Cyl. 1017*- 41652*)
f: 2888291120 41986048 RAID # (Cyl. 41652*- 2907020)
partition>W
Label disk [n]?y
Label written
partition>Q
#
次のようにして、全ての disk に複製
# disklabel wd0a > /tmp/R # disklabel -R wd1d /tmp/R # disklabel -R wd2d /tmp/R # disklabel -R wd3d /tmp/R# newfs -O2 /dev/wd0a
/dev/rwd0a: 500.0MB (1024000 sectors) block size 8192, fragment size 1024
using 11 cylinder groups of 45.46MB, 5819 blks, 10976 inodes.
super-block backups (for fsck_ffs -b #) at:
144,
93248,
186352,
279456,
372560,
465664,
558768,
651872,
744976,
838080,
931184,
# mount /dev/wd0a /mnt
# ls /mnt
# mkdir /mnt/etc
# mkdir /mnt/etc/raid
# cat > /mnt/etc/raid/raid0.conf
START array
# numRow numCol numSpare
1 4 0
START disks
/dev/wd0e
/dev/wd1e
/dev/wd2e
/dev/wd3e
#START spare
#/dev/wd3e
START layout
# sectPerSU SUsPerParityUnit SUsPerReconUnit RAID_level_1
128 1 1 5
START queue
fifo 100
#
2014/03/31 の日記
を見ながら
# raidctl -C /mnt/etc/raid/raid0.conf raid0
raid0: Component /dev/wd0e being configured at col: 0
Column: 0 Num Columns: 0
Version: 0 Serial Number: 0 Mod Counter: 0
Clean: No Status: 0
Number of columns do not match for: /dev/wd0e
/dev/wd0e is not clean!
raid0: Component /dev/wd1e being configured at col: 1
Column: 0 Num Columns: 0
Version: 0 Serial Number: 0 Mod Counter: 0
Clean: No Status: 0
Column out of alignment for: /dev/wd1e
Number of columns do not match for: /dev/wd1e
/dev/wd1e is not clean!
raid0: Component /dev/wd2e being configured at col: 2
Column: 0 Num Columns: 0
Version: 0 Serial Number: 0 Mod Counter: 0
Clean: No Status: 0
Column out of alignment for: /dev/wd2e
Number of columns do not match for: /dev/wd2e
/dev/wd2e is not clean!
raid0: Component /dev/wd3e being configured at col: 3
Column: 0 Num Columns: 0
Version: 0 Serial Number: 0 Mod Counter: 0
Clean: No Status: 0
Column out of alignment for: /dev/wd3e
Number of columns do not match for: /dev/wd3e
/dev/wd3e is not clean!
raid0: There were fatal errors
raid0: Fatal errors being ignored.
raid0: RAID Level 5
raid0: Components: /dev/wd0e /dev/wd1e /dev/wd2e /dev/wd3e
raid0: Total Sectors: 122879616 (59999 MB)
#
# raidctl -I 2015123100 raid0 # raidctl -iv raid0 Initiating re-write of parity Parity Re-write status: 2% | | ETA: 08:24 - # raidctl -A hardroot raid0 raid0: New autoconfig value is: 1 raid0: New rootpartition value is: 1 raid0: Autoconfgure: Yes raid0: Root: Force #
@ /netbsd と /boot を /dev/wd0a に写しておく:# installboot -fv -o console=com0 speed=0 /dev/rwd0a bootxx_ffsv1 installboot: Opening file system `speed=0' read-write: No such file or directory # installboot -fv -o console=com0,speed=0 /dev/rwd0a bootxx_ffsv1 File system: /dev/rwd0a Primary bootstrap: bootxx_ffsv1 Boot options: timeout 5, flags 0, speed 0, ioaddr 0, console com0上記は boot しなかった。 # mount /dev/wd0a /mnt # installboot -fv -o console=com0,speed=0 /dev/rwd0a bootxx_ffsv1 /mnt/boot File system: /dev/rwd0a File system type: ffs (blocksize 8192, needswap 0) Primary bootstrap: bootxx_ffsv1 Secondary bootstrap: /mnt/boot Boot options: timeout 5, flags 0, speed 0, ioaddr 0, console com0 #boot しない # installboot -o timeout=30 -v -o console=com0,speed=0 /dev/rwd0e /usr/mdec/bootxx_ffsv1 File system: /dev/rwd0e Primary bootstrap: /usr/mdec/bootxx_ffsv1 Ignoring PBR with invalid magic in sector 0 of `/dev/rwd0e' Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0boot しない # installboot -o timeout=30 -v -o console=com0,speed=0 /dev/wd0a /usr/mdec/bootxx_ffsv2 /mnt/boot File system: /dev/rwd0a File system type: ffs (blocksize 8192, needswap 0) Primary bootstrap: /usr/mdec/bootxx_ffsv2 Secondary bootstrap: /mnt/boot Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0scan_ffs # stty erase ^H # mount /dev/raid0a /mnt # chroot /mnt # mount -a # stat_ffs /dev/wd0a stat_ffs: not found # scan_ffs /dev/wd0a Disk: WDC WD15EARS-00Mfictitious Total sectors on disk: 2930277168 FFSv2 at 0 size 1024000, last mounted on /mnt/mnt scan_ffs: pread: Invalid argument
# newfs /dev/wd0a
/dev/rwd0a: 500.0MB (1024000 sectors) block size 8192, fragment size 1024
using 11 cylinder groups of 45.46MB, 5819 blks, 11328 inodes.
super-block backups (for fsck_ffs -b #) at:
32,
93136,
186240,
279344,
372448,
465552,
558656,
651760,
744864,
837968,
931072,
# scan_ffs /dev/wd0a
Disk: WDC WD15EARS-00Mfictitious
Total sectors on disk: 2930277168
FFSv1 at 0 size 1024000, last mounted on
ffsv1 にしておいて、もう一度 installboot
# installboot -o timeout=30 -v -o console=com0,speed=0 /dev/wd0a /usr/mdec/bootxx_ffsv1 /mnt/boot File system: /dev/rwd0a File system type: ffs (blocksize 8192, needswap 0) Primary bootstrap: /usr/mdec/bootxx_ffsv1 Secondary bootstrap: /mnt/boot Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0 #boot しない # cd /usr/mdec # installboot -o timeout=30 -v -o console=com0,speed=0 /dev/wd0a bootxx_ffsv1 /mnt/boot File system: /dev/rwd0a File system type: ffs (blocksize 8192, needswap 0) Primary bootstrap: bootxx_ffsv1 Secondary bootstrap: /mnt/boot Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0 # installboot -o timeout=30 -v -o console=com0,speed=0 /dev/wd1a bootxx_ffsv1 /mnt/boot File system: /dev/rwd1a File system type: raw (blocksize 8192, needswap 0) Primary bootstrap: bootxx_ffsv1 Secondary bootstrap: /mnt/boot Ignoring PBR with invalid magic in sector 0 of `/dev/rwd1a' Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0 # installboot -o timeout=30 -v -o console=com0,speed=0 /dev/wd2a bootxx_ffsv1 /mnt/boot File system: /dev/rwd2a File system type: raw (blocksize 8192, needswap 0) Primary bootstrap: bootxx_ffsv1 Secondary bootstrap: /mnt/boot Ignoring PBR with invalid magic in sector 0 of `/dev/rwd2a' Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0 # installboot -o timeout=30 -v -o console=com0,speed=0 /dev/wd0e bootxx_ffsv1 /mnt/boot File system: /dev/rwd0e File system type: raw (blocksize 8192, needswap 0) Primary bootstrap: bootxx_ffsv1 Secondary bootstrap: /mnt/boot Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0 #boot しない # stty erase ^H # mount /dev/raid0a /mnt shc# ^U chroot /mnt # mount -a # cd /usr/mdec # mount /dev/wd0a /mnt # ls /mnt boot netbsd # installboot -o timeout=30 -v -o console=com0,speed=0 /dev/wd0d bootxx_ffsv1 /mnt/boot File system: /dev/rwd0d File system type: raw (blocksize 8192, needswap 0) Primary bootstrap: bootxx_ffsv1 Secondary bootstrap: /mnt/boot Ignoring PBR with invalid magic in sector 0 of `/dev/rwd0d' Boot options: timeout 30, flags 0, speed 0, ioaddr 0, console com0 # sync # sync # rebootboot した。wd0a でなく wd0d とする必要があった。 @ pkg_add pkgin:
# export PKG_PATH=ftp://ftp.jp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/7.0_RC1_riz/All
# pkg_add pkgin
load: 1.44 cmd: pkg_add 5551 [biowait] 0.02u 0.00s 0% 3752k
load: 1.32 cmd: pkg_add 5551 [biowait] 0.02u 0.00s 0% 3752k
===========================================================================
$NetBSD: MESSAGE,v 1.6 2014/12/05 14:31:07 schmonz Exp $
You may wish to have the vulnerabilities file downloaded daily so that
it remains current. This may be done by adding an appropriate entry
to a user's crontab(5) entry. For example the entry
# download vulnerabilities file
0 3 * * * /usr/pkg/sbin/pkg_admin fetch-pkg-vulnerabilities >/dev/null 2>&1
will update the vulnerability list every day at 3AM. You may wish to do
this more often than once a day.
In addition, you may wish to run the package audit from the daily
security script. This may be accomplished by adding the following
lines to /etc/security.local
if [ -x /usr/pkg/sbin/pkg_admin ]; then
/usr/pkg/sbin/pkg_admin audit
fi
Alternatively this can also be acomplished by adding an entry to a user's
crontab(5) file. e.g.:
# run audit-packages
0 3 * * * /usr/pkg/sbin/pkg_admin audit
Both pkg_admin subcommands can be run as as an unprivileged user,
as long as the user chosen has permission to read the pkgdb and to write
the pkg-vulnerabilities to /var/db/pkg.
The behavior of pkg_admin and pkg_add can be customised with
pkg_install.conf. Please see pkg_install.conf(5) for details.
If you want to use GPG signature verification you will need to install
GnuPG and set the path for GPG appropriately in your pkg_install.conf.
===========================================================================
@ /export は 4.0TB くらいあるので gpt:
2013/07/28 の日記
を見ながら。
( つっこみ )
2015年12月26日(土) 旧暦 [n年日記] [更新:"2015/12/26 14:43:16"]#1 [Graphics] NVIDIA GTX-750 GM-107 (Maxwell)| drm kern info: nouveau [ PGRAPH][nouveau0] using external firmware | drm kern error: nouveau E[ PGRAPH][nouveau0] failed to load fuc409c | drm kern error: nouveau E[ DEVICE][nouveau0] failed to create 0x18000717, -22 | drm kern debug: nouveau T[ DEVICE][nouveau0] dec() == 21 | drm kern error: nouveau E[ DRM] failed to create 0x80000080, -22 | drm kern debug: nouveau T[ SW][nouveau0] dec() == 0 | drm kern debug: nouveau D[ SW][nouveau0] destroying sys/external/bsd/drm2/dist/drm/nouveau/core/engine/graph/nouveau_engine_graph_nvc0.c:
951 int
952 nvc0_graph_init_ctxctl(struct nvc0_graph_priv *priv)
953 {
954 struct nvc0_graph_oclass *oclass = (void *)nv_object(priv)->oclass;
955 struct nvc0_grctx_oclass *cclass = (void *)nv_engine(priv)->cclass;
956 u32 r000260;
957 int i;
958
959 if (priv->firmware) {
960 /* load fuc microcode */
961 r000260 = nv_mask(priv, 0x000260, 0x00000001, 0x00000000);
962 nvc0_graph_init_fw(priv, 0x409000, &priv->fuc409c,
963 &priv->fuc409d);
964 nvc0_graph_init_fw(priv, 0x41a000, &priv->fuc41ac,
965 &priv->fuc41ad);
1221 static int
1222 nvc0_graph_ctor_fw(struct nvc0_graph_priv *priv, const char *fwname,
1223 struct nvc0_graph_fuc *fuc)
1224 {
1225 struct nouveau_device *device = nv_device(priv);
1226 const struct firmware *fw;
1227 char f[32];
1228 int ret;
1229
1230 snprintf(f, sizeof(f), "nouveau/nv%02x_%s", device->chipset, fwname);
1231 ret = request_firmware(&fw, f, nv_device_base(device));
1232 if (ret) {
1233 snprintf(f, sizeof(f), "nouveau/%s", fwname);
1234 ret = request_firmware(&fw, f, nv_device_base(device));
1235 if (ret) {
1236 nv_error(priv, "failed to load %s\n", fwname);
1237 return ret;
1238 }
1239 }
36 cd /tmp 38 mkdir t 39 cd t 41 wget --no-check-certificat https://raw.githubusercontent.com/imirkin/re-vp2/master/extract_firmware.py 43 python2.7 extract_firmware.py 44 wget http://us.download.nvidia.com/XFree86/Linux-x86/340.32/NVIDIA-Linux-x86-340.32.run 45 file NVIDIA-Linux-x86-340.32.run 46 less NVIDIA-Linux-x86-340.32.run 47 sh NVIDIA-Linux-x86-340.32.run --extract-only 49 ls -lt NVIDIA-Linux-x86-340.32 50 less NVIDIA-Linux-x86-340.32/LICENSE ( つっこみ )
2015年12月22日(火) 旧暦 [n年日記] [更新:"2015/12/26 04:46:51"]#1 [NetBSD][X11] nouveau does not work with GTX 750
With kernel configuration
# $NetBSD: GENERIC_USERMODE,v 1.1 2012/06/30 15:03:57 reinoud Exp $ include "arch/amd64/conf/GENERIC" # it's probably worth testing in -current now if you want. you'll need # to enable these lines in your config: nouveau* at pci? dev ? function ? nouveaufb* at nouveaufbbus? # and you might want to disable nouveau debug -- my console spews a really # large amount, but only if it works ;) you'll have to do this by editing # files.nouveau to have this instead: #no makeoptions nouveau #makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG=0" #makeoptions nouveau CPPFLAGS+="-DCONFIG_NOUVEAU_DEBUG_DEFAULT=0"Graphic Card is GTX-750 and dmesg may say: nouveau0 at pci7 dev 0 function 0: vendor 10de product 1381 (rev. 0xa2)The screen looks like --------------------------- This machine has no serial console, so following part is hand-copied: --------------------------- drm kern debug: nouveau T[ DRM] dec() == 3 drm kern debug: nouveau T[ DEVICE][nouveau0] use(-1) == 0 drm kern debug: nouveau T[ DEVICE][nouveau0] stopping ... drm kern debug: nouveau T[ DEVICE][nouveau0] stopped drm kern debug: nouveau T[ DRM] dec() == 2 drm kern debug: nouveau T[ DRM] fini running drm kern debug: nouveau T[ DRM] 0xffffffff:0xffffffff fini children drm kern debug: nouveau T[ DRM] 0xffffffff:0xffffffff fini running drm kern debug: nouveau T[ DRM] use(-1) == 1 drm kern debug: nouveau T[ DRM] 0xffffffff:0xffffffff fini completed drm kern debug: nouveau T[ DRM] fini completed with 0 drm kern debug: nouveau T[ DRM] dec() == 0 drm kern debug: nouveau T[ DRM] destroying drm kern debug: nouveau T[ DEVICE][nouveau0] dec() == 1 drm kern debug: nouveau T[ DRM] 0xffffffff:0xffffffff destroy running drm kern debug: nouveau T[ DRM] 0xffffffff:0xffffffff destroy completed drm kern debug: nouveau T[ DRM] dec() == -1 nouveau0: unable to attach drm: 22 panic: cnopen: no console device fatal breakpoint trap in supervisor mode trap type 1 code 0 rip ffffffff80114a75 cs 8 rflags 246 cr2 7f7ff6c0cce9 ilevel 0 rsp ffff0e811d985ac8 curlwp 0xfffffe811d863860 pid 2.1 lowest kstack 0xfffffef811d9822ce Stopped in pid 2.1 (init) at netbsd: breakpoint+0x5: leave db(3)>dmesg with GENERIC is here: ( つっこみ )
2015年12月18日(金) 旧暦 [n年日記] [更新:"2015/12/19 11:37:23"]#1 [Machine] ASRock N3150B-ITX Mother board again
最近(この一年くらいの間)に買った Mother board
H81 (2015/02) N3150B-ITX(1) (build.sh) N3150B-ITX @ Case と電源をどうしよう ?:
で、もう一つを 12/12(土) に (12/11 駒場 → 荻窪 → 秋葉原) で
買って来た訳だが
H81 の箱をどうやって用意したのかが不思議 (ひき出し) が使われている。 ( つっこみ )
|
最近の日記 2025年10月25日 ・recover from disk error 2025年10月23日 ・dd does not duplicate Windows 11 boot disk ? 2025年10月13日 ・missing package 2025年10月04日 ・pkgin search pkgname segfaults 2025年08月16日 ・installboot (Although it’s too late) | |||||||||||||||||