foltia ANIME LOCKER †
foltia ANIME LOCKERとは? †
購入 †
構成 †
インストール †
後処理 †
固定IPアドレス運用 †
ホスト名の変更 †
パスワードの変更 †
セキュリティアップデート †
SSHのポートの変更 †
構成変更 †
VideoディスクのRAID化 †
OSディスクのソフトRAID化 †
[root@asuna ~]# parted /dev/sda GNU Parted 2.1 Using /dev/sda Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) p Model: ATA WDC WD10EFRX-68F (scsi) Disk /dev/sda: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 337MB 336MB primary ext4 boot 2 337MB 7732MB 7396MB primary ext4 3 7732MB 14.0GB 6268MB primary linux-swap(v1) 4 14.0GB 1000GB 986GB primary lvm (parted)
[root@asuna dev]# parted -s /dev/sdb mklabel msdos [root@asuna dev]# parted /dev/sdb GNU Parted 2.1 Using /dev/sdb Welcome to GNU Parted! Type 'help' to view a list of commands. (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? ext4 Start? 0% End? 337M (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? ext4 Start? 337M End? 7732M (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? linux-swap Start? 7732M End? 14.0G (parted) mkpart Partition type? primary/extended? primary File system type? [ext2]? lvm parted: invalid token: lvm File system type? [ext2]? ext4 Start? 14.0G End? -0 (parted) p Model: ATA WDC WD10EFRX-68F (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 337MB 336MB primary 2 337MB 7732MB 7396MB primary 3 7732MB 14.0GB 6267MB primary 4 14.0GB 1000GB 986GB primary (parted) set 1 raid on Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. (parted) set 2 raid on Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. (parted) set 4 lvm on Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. (parted) set 1 boot on Warning: WARNING: the kernel failed to re-read the partition table on /dev/sdb (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. (parted) p Model: ATA WDC WD10EFRX-68F (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 337MB 336MB primary boot, raid 2 337MB 7732MB 7396MB primary raid 3 7732MB 14.0GB 6267MB primary 4 14.0GB 1000GB 986GB primary lvm (parted) q Information: You may need to update /etc/fstab. [root@asuna dev]#
[root@asuna dev]# mdadm --create /dev/md/0_1 --auto=yes --level=raid1 --raid-dev ices=2 missing /dev/sdb1 mdadm: Note: this array has metadata at the start and may not be suitable as a boot device. If you plan to store '/boot' on this device please ensure that your boot-loader understands md/v1.x metadata, or use --metadata=0.90 Continue creating array? y mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md/0_1 started. [root@asuna dev]# mdadm --create /dev/md/0_2 --auto=yes --level=raid1 --raid-dev ices=2 missing /dev/sdb2 mdadm: Note: this array has metadata at the start and may not be suitable as a boot device. If you plan to store '/boot' on this device please ensure that your boot-loader understands md/v1.x metadata, or use --metadata=0.90 Continue creating array? y mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md/0_2 started. [root@asuna dev]# mdadm --create /dev/md/0_4 --auto=yes --level=raid1 --raid-devices=2 missing /dev/sdb4 mdadm: Note: this array has metadata at the start and may not be suitable as a boot device. If you plan to store '/boot' on this device please ensure that your boot-loader understands md/v1.x metadata, or use --metadata=0.90 Continue creating array? y mdadm: Defaulting to version 1.2 metadata mdadm: array /dev/md/0_4 started. [root@asuna dev]# [root@asuna dev]# cat /proc/mdstat Personalities : [raid1] md124 : active raid1 sdb4[1] 962960064 blocks super 1.2 [2/1] [_U] bitmap: 0/8 pages [0KB], 65536KB chunk md125 : active raid1 sdb2[1] 7218176 blocks super 1.2 [2/1] [_U] md126 : active raid1 sdb1[1] 327360 blocks super 1.2 [2/1] [_U] md127 : active raid1 sdd1[1] sdc1[0] 2930134016 blocks super 1.2 [2/2] [UU] bitmap: 0/22 pages [0KB], 65536KB chunk unused devices: <none> [root@asuna dev]# 注:/dev/sddは先にRAIDを作成し、RAIDデバイス/dev/md/2_0として/videoにマウント済み。
[root@asuna dev]# mdadm --detail --scan >> /etc/mdadm.conf [root@asuna dev]#
[root@asuna dev]# mkfs.ext4 /dev/md/0_1 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=1024 (log=0) Fragment size=1024 (log=0) Stride=4 blocks, Stripe width=0 blocks 81920 inodes, 327360 blocks 16368 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67633152 40 block groups 8192 blocks per group, 8192 fragments per group 2048 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 23 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@asuna dev]# mkfs.ext4 /dev/md/0_2 mke2fs 1.41.12 (17-May-2010) Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) Stride=1 blocks, Stripe width=0 blocks 451584 inodes, 1804544 blocks 90227 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=1849688064 56 block groups 32768 blocks per group, 32768 fragments per group 8064 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632 Writing inode tables: done Creating journal (32768 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 27 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. [root@asuna dev]# [root@asuna dev]# tune2fs -c -1 /dev/md/0_1 [root@asuna dev]# tune2fs -c -1 /dev/md/0_2 [root@asuna dev]# mkswap /dev/sdb3 Setting up swapspace version 1, size = 6120444 KiB no label, UUID=d47056e2-be0d-471a-9f1d-0a07ad8cea7c [root@asuna dev]# [root@asuna dev]# parted /dev/sdb p Model: ATA WDC WD10EFRX-68F (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/4096B Partition Table: msdos Number Start End Size Type File system Flags 1 1049kB 337MB 336MB primary boot, raid 2 337MB 7732MB 7396MB primary raid 3 7732MB 14.0GB 6267MB primary linux-swap(v1) 4 14.0GB 1000GB 986GB primary lvm [root@asuna dev]#
[root@asuna dev]# mkdir /mnt/md0_1 [root@asuna dev]# mkdir /mnt/md0_2 [root@asuna dev]# mount /dev/md/0_1 /mnt/md0_1 [root@asuna dev]# mount /dev/md/0_2 /mnt/md0_2 [root@asuna dev]# rsync -avz -H --delete /boot/ /mnt/md0_1 [root@asuna dev]# rsync -avz -H --delete / /mnt/md0_2 --exclude=/boot --exclude=/sys --exclude=/proc --exclude=/dev --exclude=/mnt --exclude=/home/foltia/php/tv --exclude=/video
title foltia ANIME LOCKER Original (2.6.32-573.3.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-573.3.1.el6.x86_64 ro root=LABEL=foltiaroot LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=jp106 crashkernel=auto initrd /initramfs-2.6.32-573.3.1.el6.x86_64.img title foltia ANIME LOCKER hd0 (2.6.32-573.3.1.el6.x86_64) root (hd0,0) kernel /vmlinuz-2.6.32-573.3.1.el6.x86_64 ro root=/dev/sda2 LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=jp106 crashkernel=auto initrd /initramfs-2.6.32-573.3.1.el6.x86_64.img title foltia ANIME LOCKER hd1 (2.6.32-573.3.1.el6.x86_64) root (hd1,0) kernel /vmlinuz-2.6.32-573.3.1.el6.x86_64 ro root=/dev/md/0_2 LANG=en_US.UTF-8 SYSFONT=latarcyrheb-sun16 KEYBOARDTYPE=pc KEYTABLE=jp106 crashkernel=auto initrd /initramfs-2.6.32-573.3.1.el6.x86_64.img
参考ページ †
まだ試してませんが... †
参考情報 †さあ、使うぞ! †録画してみました。 †
SMB(Windowsファイル共有) †
AQUOSでは、DNLA で視聴できない! †
DLNA端末対応 †
HLS配信 †
Android †
iPod †
他の動画ファイルを登録する †
Sleep設定 †
#!/bin/bash # # shutdown script for foltia ANIME LOCKER 4.0.x # # SHUTDOWN_CMD="/sbin/shutdown -h now" CNTREC=`ps -A | grep recpt1 | wc -l` CNTCNV=`ps -A | grep ffmpeg | wc -l` # 録画中ではない if [ $CNTREC -eq 0 ] ; then # CONVERT中ではない if [ $CNTCNV -eq 0 ] ; then sudo $SHUTDOWN_CMD > /dev/null 2>&1 fi fi exit 0
30 8-12 * * 1-5 /root/cron_scripts/shutdown.sh
30 16 * * * /sbin/ether-wake XX:XX:XX:XX:XX:XX > /dev/null 2>1& TS録画エラー †現象 †
原因 † |