|
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 の日記
を見ながら。
( つっこみ )
|
最近の日記 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) | ||