ReiserFS on /dev/hda4
をテンプレートにして作成
[
トップ
] [
新規
|
一覧
|
単語検索
|
最終更新
|
ヘルプ
]
開始行:
*ReiserFSをつかってみる [#g8288b94]
ReiserFS(ジャーナリング機能を有し、障害に強いファイルシ...
~
次のような手順で行った。~
-resize2fsとfdiskを使用してパーティション/dev/hda3を縮小。~
-空いた領域にパーティション/dev/hda4を新規作成。~
-/dev/hda4をReiserFSとして、その上にdebian26を構築。~
*ReiserFS化関連ツールのインストール [#pdc4f53d]
-''LANDISKへtelnetしてrootになる''~
手順省略…~
~
-''ルートファイルシステムをrwでリマウント''~
#pre{{
# mount -o rw,remount /
}}
-''インストール''~
reiserfs_tools.tgzは本ページの末尾に添付してます。~
#pre{{
# cd /
# tar vxfz /mnt/hda3/share/disk/reiserfs_tools.tgz
./sbin/
./sbin/mkreiserfs
./sbin/reiserfsck
./sbin/resize_reiserfs
./sbin/debugreiserfs
./sbin/reiserfstune
./sbin/mkfs.reiserfs
./sbin/fsck.reiserfs
./sbin/resize2fs
./lib/
./lib/modules/
./lib/modules/2.4.21/
./lib/modules/2.4.21/kernel/
./lib/modules/2.4.21/kernel/fs/
./lib/modules/2.4.21/kernel/fs/reiserfs/
./lib/modules/2.4.21/kernel/fs/reiserfs/reiserfs.o
./mnt/
./mnt/hda4/
#
# depmod -a
}}
*ファイルシステムのサイズ変更 [#tba2ff6c]
-''容量確認''~
df で /dev/hda3 の容量を確認すると、サイズは 153GB で、そ...
ファイルの整理やバックアップ等を行い、/dev/hda3の使用サイ...
#pre{{
# df
Filesystem 1k-blocks Used Available Use% M...
rootfs 69973 58519 7841 88% /
/dev/root 69973 58519 7841 88% /
/dev/ram0 1003 174 778 18% /...
&color(orange){/dev/hda3 153210596 23558460 1...
}}
-''ファイルシステムのサイズ割り当て方針''~
/dev/hda3のサイズを50GBに変更して、残り(約100GB)を/dev/...
ファイルシステムのサイズ変更は次のような手順で行います。~
--/dev/hda3をumount
--e2fsckを行う
--resize2fsで/dev/hda3ファイルシステムサイズ変更~
~
-''では実際にファイルシステムのサイズ変更を行ってみましょ...
--umount~
※ mount: /mnt/hda3: device is busyと出た場合は、再立ち上...
(samba等が/mnt/hda3をロックしているのが原因)~
#pre{{
# umount /dev/hda3
}}
--e2fsck~
ファイルの不整合が検出され、キー入力待ち状態になる場合が...
大抵の場合、リターン(Yes)を選択すると問題を自動修復してく...
#pre{{
# e2fsck -f /dev/hda3
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (32413034, counted=32413393).
Fix<y>? yes
Free inodes count wrong (18501267, counted=18501226).
Fix<y>? yes
/dev/hda3: ***** FILE SYSTEM WAS MODIFIED *****
/dev/hda3: 962966/19464192 files (6.0% non-contiguous), 6...
}}
--resize2fs~
本コマンドを使用してファイルシステムのリサイズ(縮小)を...
(パーティションのリサイズではなく、ファイルシステムのリサ...
~
予定しているサイズ(50GB)よりすこし少な目の容量(45GB)を...
(fdiskでパーティションのリサイズを行った後、あらためて、...
ファイルシステムのリサイズを行います。ですから、ここでは...
#pre{{
# resize2fs -p /dev/hda3 45G
esize2fs 1.35 (28-Feb-2004)
Resizing the filesystem on /dev/hda3 to 11796480 (4k) blo...
Begin pass 2 (max = 671)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXXXXXXX...
Begin pass 3 (max = 1188)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXX...
Begin pass 4 (max = 56000)
Updating inode references XXXXXXXXXXXXXXXXXXXXXXXXXXX...
The filesystem on /dev/hda3 is now &color(orange){1179648...
&color(orange){※1block=4Kbyteだから、だいたい指定通り↑};
}}
*パーティションの設定とReiserFSの作成 [#f93d5a41]
-''fdisk''~
fdiskを使用して、/dev/hda3のパーティションサイズを縮小し...
--&color(red){注意すべきこと};~
---下記「&color(red){注意:必ずそのままリターン};」の場所...
値を設定すると、/dev/hda3の先頭番地が変更されるため、デー...
--- ミスった場合、CTRL-Cでfdiskを中止して再度やり直してく...
wコマンドで書き込みを行うまで、何度でもやりなおし可能です...
-
#pre{{
# fdisk /dev/hda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than...
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of...
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
/dev/hda3 80 19457 155653785 83 Linux
Command (m for help): &color(red){d};
Partition number (1-4): &color(red){3};
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
Command (m for help): &color(red){n};
Command action
e extended
p primary partition (1-4)
&color(red){p};
Partition number (1-4): &color(red){3};
First cylinder (80-19457, default 80): &color(red){注意:...
Using default value 80
Last cylinder or +size or +sizeM or +sizeK (80-19457, def...
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
/dev/hda3 80 6454 51207187+ 83 Linux
Command (m for help): &color(red){n};
Command action
e extended
p primary partition (1-4)
&color(red){p};
Partition number (1-4): &color(red){4};
First cylinder (6455-19457, default 6455): &color(red){そ...
Using default value 6455
Last cylinder or +size or +sizeM or +sizeK (6455-19457, d...
Using default value 19457
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
/dev/hda3 80 6454 51207187+ 83 Linux
/dev/hda4 6455 19457 104446597+ 83 Linux
Command (m for help): &color(red){w ← 書き込みを行いま...
The partition table has been altered!
Calling ioctl() to re-read partition table.
Re-read table failed with error 16: Device or resource bu...
Reboot your system to ensure the partition table is updat...
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
#
}}
-''一旦リブートします。''~
理由は不明ですが、リブートしないと、mkreiserfsがうまくか...
~
-''mkreiserfs''~
/dev/hda4をReiserFSに設定します。~
#pre{{
# mkreiserfs /dev/hda4
mkreiserfs 3.6.19 (2003 www.namesys.com)
A pair of credits:
BigStorage (www.bigstorage.com) contributes to our gene...
and has done so for quite a long time.
Hans Reiser was the project initiator, source of all fun...
years. He is the architect and official maintainer.
Guessing about desired format.. Kernel 2.4.21 is running.
Format 3.6 with standard journal
Count of blocks on the device: 26111648
Number of blocks consumed by mkreiserfs formatting proces...
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: 57a875a4-fe10-4b01-be78-e4ffe814f9c3
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON '/dev/hda4'!
Continue (y/n):&color(red){y};
Initializing journal - 0%....20%....40%....60%....80%.......
Syncing..ok
Tell your friends to use a kernel based on 2.4.18 or late...
kernel based on 2.4.9, when you use reiserFS. Have fun.
ReiserFS is successfully created on /dev/hda4.
}}
-''/dev/hda3のパーティションサイズ・フィッティング''~
/dev/hda3のパーティションサイズと、ファイルシステムサイズ...
#pre{{
# umount /dev/hda3
# e2fsck -f /dev/hda3
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hda3: 962966/5898240 files (6.0% non-contiguous), 60...
# resize2fs -p /dev/hda3
resize2fs 1.35 (28-Feb-2004)
Resizing the filesystem on /dev/hda3 to 12801796 (4k) blo...
Begin pass 1 (max = 31)
Extending the inode table XXXXXXXXXXXXXXXXXXXXXXXXXXX...
The filesystem on /dev/hda3 is now 12801796 blocks long.
# mount -t ext2 /dev/hda3 /mnt/hda3
}}
-''リブート''~
念のため。~
~
-''マウント&動作確認''~
#pre{{
# mkdir /mnt/hda4
# modprobe reiserfs
# mount -t reiserfs /dev/hda4 /mnt/hda4
# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext2 ro 0 0
/proc /proc proc rw 0 0
none /dev/pts devpts rw 0 0
/dev/ram0 /mnt/ram0 ext2 rw 0 0
/dev/hda3 /mnt/hda3 ext2 rw 0 0
&color(red){/dev/hda4 /mnt/hda4 reiserfs rw 0 0};
# df
Filesystem 1k-blocks Used Available Use% M...
rootfs 69973 58519 7841 88% /
/dev/root 69973 58519 7841 88% /
/dev/ram0 1003 116 836 12% /...
/dev/hda3 50403028 23557024 26846004 47% /...
&color(red){/dev/hda4 104443400 32840 1044...
}}
~
*ReiserFS上にdebian26を構築 [#pcb729a7]
-''基本的には…''~
基本的には、「debian26のインストール」の手順通りにインス...
/mnt/hda4上にdebian26環境を構築できます。~
~
本節では、/dev/hda3上で動作させていたdebian26環境を/dev/h...
~
-''Kernelの更新''~
ReiserFSを組み込んだカーネル(レビジョンlandisk.0.4 以降...
debian26環境を立ち上げて、apt-getすればOKです。~
※ ReiserFS対応カーネル(landisk.0.4)を含むbase26-sh4-20050...
#pre{{
landisk:~# apt-get update
landisk:~# apt-get install kernel-image-2.6.11-sh reiserf...
}}
-''あとは、''~
--再起動後、~
LANDISKオリジナル環境上で、/mnt/hda3上のdebian26を/mnt/hd...
(cp -a を使う。)~
なお、share は、リンクした。~
#pre{{
# cp -a 省略 /mnt/hda4
# mkdir /mnt/hda4/mnt/hda3
# ln -s /mnt/hda3/share /mnt/hda4/share
# ls -la /mnt/hda4
total 54
drwxr-xr-x 21 root root 504 Jun 2 23:41 .
drwxr-xr-x 7 root root 1024 May 31 21:20 ..
drwxr-xr-x 2 root root 1976 Jun 1 15:53 bin
drwxr-xr-x 2 root root 192 Jun 1 16:23 boot
drwxr-xr-x 6 root root 34832 Jun 2 01:17 dev
drwxr-xr-x 38 root root 2624 Jun 2 01:17 etc
drwxrwsr-x 3 root ftp 72 Jun 1 16:28 home
drwxr-xr-x 2 root root 48 Jun 1 15:46 in...
drwxr-xr-x 7 root root 3056 Jun 1 18:20 lib
drwxr-xr-x 2 root root 48 Jun 1 15:46 me...
drwxr-xr-x 2 root root 48 Mar 26 13:09 mnt
drwxr-xr-x 2 root root 48 Jun 1 15:46 opt
drwxr-xr-x 2 root root 48 Mar 26 13:09 proc
drwxr-xr-x 2 root root 240 Jun 1 16:29 root
drwxr-xr-x 2 root root 2992 Jun 1 18:20 sbin
lrwxrwxrwx 1 root root 15 Jun 1 20:41 sh...
drwxr-xr-x 2 root root 48 Jun 1 15:46 srv
drwxr-xr-x 2 root root 48 Apr 22 21:15 sys
drwxrwxrwt 2 root root 48 Jun 2 01:06 tmp
drwxr-xr-x 11 root root 288 Jun 1 15:46 usr
drwxr-xr-x 13 root root 312 Jun 1 15:46 var
}}
--/mnt/hda4/etc/fstab~
を変更して、~
#pre{{
&color(red){/dev/hda4 / reiserfs defaults...
&color(red){/dev/hda3 /mnt/hda3 ext2 defaults...
proc /proc proc defaults 0 0
/dev/hda2 swap swap defaults 0 0
}}
--/mnt/hda3/boot/kernelsw.conf~
を変更して(カーネル本体は、/mnt/hda3/boot下の物を使用す...
#pre{{
linear
boot=/dev/hda
disk=/dev/hda
bios=0x80
timeout=50
default=linux
image=/mnt/hda3/boot/vmlinuz-2.6.11-sh
label=linux
root=&color(red){/dev/hda4};
read-only
offset_address=0x00800000
append="mem=64M console=ttySC1,9600 root=&color(red){/dev...
}}
起動すればOKです。~
#pre{{
# cd /mnt/hda3
# kernelsw.pl boot/kernelsw.conf
Loading .... done.
==============================================
SH-Linux Kernel Switcher V2.1
----------------------------------------------
image = /mnt/hda3/boot/vmlinuz-2.6.11-sh (size:1298432,...
root = /dev/hda4 (read-only)
append = "mem=64M console=ttySC1,9600 root=/dev/hda4 fas...
offset_address = 0x00800000
----------------------------------------------
kernel boot parameter details
0 : 0x1 # read-only root file system
1 : 0x0 # RAMDISK Flags
2 : 0x304 # Root device (/dev/hda4)
3 : 0x1 # Loader type (LILO = 1)
4 : 0x0 # Initrd start
5 : 0x0 # Initrd size
6 : 0x0 # Not defined yet
7 : 0x0 # Not defined yet
==============================================
#
# /home/LANDISK/scripts/powerctrl.sh reboot
}}
~
*トラブルシューティング [#sa2c11f7]
LANDISK-120GBモデル(HDL-120U)では無問題でしたが、 160GBモ...
次のような問題が発生しました。~
うちの160GB品固有の問題なのか、それとも全体的なものなのか...
私が行った回避方法を記しておきます。(場当たり的ですが。)~
~
-''ReiserFS上でファイルをmvするとSegmentation faultが発生...
LANDISK付属カーネル+reiserfsモジュール+LANDISK(160GB)の...
cp -a とrm で回避した。~
(Kernel 2.6ベースだと本不具合は発生しない。)~
-''ブートしない…''~
LANDISK(160GB)で発生。パーティションを切り直した後、/dev/...
debian26を起動して、/dev/hda4のReserFS化を行うと、無事に...
ちなみに不具合時のエラーログはこんな感じ。~
#pre{{
Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.11-sh (root@landisk) (gcc version 3.4.4...
(prerelease) (Debian 3.4.3-12)) #1 Wed Jun 1 13:11:54 JST...
I-O DATA DEVICE, INC. landisk3 support.
Built 1 zonelists
Kernel command line: mem=64M console=ttySC1,9600 root=/de...
Setting GDB trap vector to 0x80000100
PID hash table entries: 512 (order: 9, 8192 bytes)
CPU clock: 266.66MHz
Bus clock: 133.33MHz
Module clock: 33.33MHz
…省略…
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
IP-Config: Incomplete network configuration information.
ReiserFS: hda4: found reiserfs format "3.6" with standard...
ReiserFS: hda4: using ordered data mode
ReiserFS: hda4: journal params: device hda4, size 8192, j...
18, max trans len 1024, max batch 900, max commit age 30...
ReiserFS: hda4: checking transaction log (hda4)
ReiserFS: hda4: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 80k freed
/sbin/initKernel panic - not syncing: Attempted to kill i...
: error while loading shared libraries: /lib/libgcc_s.so...
だんまり。
}}
~
-''情報求む''~
原因解析をしたく、試してみた方は動作報告/不具合報告をよ...
(こんな危険なことする人、そんなにいるとも思えないが。。。)~
----
->理由は不明ですが ←Calling ioctl() to re-read partitio...
#counter
終了行:
*ReiserFSをつかってみる [#g8288b94]
ReiserFS(ジャーナリング機能を有し、障害に強いファイルシ...
~
次のような手順で行った。~
-resize2fsとfdiskを使用してパーティション/dev/hda3を縮小。~
-空いた領域にパーティション/dev/hda4を新規作成。~
-/dev/hda4をReiserFSとして、その上にdebian26を構築。~
*ReiserFS化関連ツールのインストール [#pdc4f53d]
-''LANDISKへtelnetしてrootになる''~
手順省略…~
~
-''ルートファイルシステムをrwでリマウント''~
#pre{{
# mount -o rw,remount /
}}
-''インストール''~
reiserfs_tools.tgzは本ページの末尾に添付してます。~
#pre{{
# cd /
# tar vxfz /mnt/hda3/share/disk/reiserfs_tools.tgz
./sbin/
./sbin/mkreiserfs
./sbin/reiserfsck
./sbin/resize_reiserfs
./sbin/debugreiserfs
./sbin/reiserfstune
./sbin/mkfs.reiserfs
./sbin/fsck.reiserfs
./sbin/resize2fs
./lib/
./lib/modules/
./lib/modules/2.4.21/
./lib/modules/2.4.21/kernel/
./lib/modules/2.4.21/kernel/fs/
./lib/modules/2.4.21/kernel/fs/reiserfs/
./lib/modules/2.4.21/kernel/fs/reiserfs/reiserfs.o
./mnt/
./mnt/hda4/
#
# depmod -a
}}
*ファイルシステムのサイズ変更 [#tba2ff6c]
-''容量確認''~
df で /dev/hda3 の容量を確認すると、サイズは 153GB で、そ...
ファイルの整理やバックアップ等を行い、/dev/hda3の使用サイ...
#pre{{
# df
Filesystem 1k-blocks Used Available Use% M...
rootfs 69973 58519 7841 88% /
/dev/root 69973 58519 7841 88% /
/dev/ram0 1003 174 778 18% /...
&color(orange){/dev/hda3 153210596 23558460 1...
}}
-''ファイルシステムのサイズ割り当て方針''~
/dev/hda3のサイズを50GBに変更して、残り(約100GB)を/dev/...
ファイルシステムのサイズ変更は次のような手順で行います。~
--/dev/hda3をumount
--e2fsckを行う
--resize2fsで/dev/hda3ファイルシステムサイズ変更~
~
-''では実際にファイルシステムのサイズ変更を行ってみましょ...
--umount~
※ mount: /mnt/hda3: device is busyと出た場合は、再立ち上...
(samba等が/mnt/hda3をロックしているのが原因)~
#pre{{
# umount /dev/hda3
}}
--e2fsck~
ファイルの不整合が検出され、キー入力待ち状態になる場合が...
大抵の場合、リターン(Yes)を選択すると問題を自動修復してく...
#pre{{
# e2fsck -f /dev/hda3
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
Free blocks count wrong (32413034, counted=32413393).
Fix<y>? yes
Free inodes count wrong (18501267, counted=18501226).
Fix<y>? yes
/dev/hda3: ***** FILE SYSTEM WAS MODIFIED *****
/dev/hda3: 962966/19464192 files (6.0% non-contiguous), 6...
}}
--resize2fs~
本コマンドを使用してファイルシステムのリサイズ(縮小)を...
(パーティションのリサイズではなく、ファイルシステムのリサ...
~
予定しているサイズ(50GB)よりすこし少な目の容量(45GB)を...
(fdiskでパーティションのリサイズを行った後、あらためて、...
ファイルシステムのリサイズを行います。ですから、ここでは...
#pre{{
# resize2fs -p /dev/hda3 45G
esize2fs 1.35 (28-Feb-2004)
Resizing the filesystem on /dev/hda3 to 11796480 (4k) blo...
Begin pass 2 (max = 671)
Relocating blocks XXXXXXXXXXXXXXXXXXXXXXXXXXX...
Begin pass 3 (max = 1188)
Scanning inode table XXXXXXXXXXXXXXXXXXXXXXXXXXX...
Begin pass 4 (max = 56000)
Updating inode references XXXXXXXXXXXXXXXXXXXXXXXXXXX...
The filesystem on /dev/hda3 is now &color(orange){1179648...
&color(orange){※1block=4Kbyteだから、だいたい指定通り↑};
}}
*パーティションの設定とReiserFSの作成 [#f93d5a41]
-''fdisk''~
fdiskを使用して、/dev/hda3のパーティションサイズを縮小し...
--&color(red){注意すべきこと};~
---下記「&color(red){注意:必ずそのままリターン};」の場所...
値を設定すると、/dev/hda3の先頭番地が変更されるため、デー...
--- ミスった場合、CTRL-Cでfdiskを中止して再度やり直してく...
wコマンドで書き込みを行うまで、何度でもやりなおし可能です...
-
#pre{{
# fdisk /dev/hda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than...
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of...
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
/dev/hda3 80 19457 155653785 83 Linux
Command (m for help): &color(red){d};
Partition number (1-4): &color(red){3};
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
Command (m for help): &color(red){n};
Command action
e extended
p primary partition (1-4)
&color(red){p};
Partition number (1-4): &color(red){3};
First cylinder (80-19457, default 80): &color(red){注意:...
Using default value 80
Last cylinder or +size or +sizeM or +sizeK (80-19457, def...
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
/dev/hda3 80 6454 51207187+ 83 Linux
Command (m for help): &color(red){n};
Command action
e extended
p primary partition (1-4)
&color(red){p};
Partition number (1-4): &color(red){4};
First cylinder (6455-19457, default 6455): &color(red){そ...
Using default value 6455
Last cylinder or +size or +sizeM or +sizeK (6455-19457, d...
Using default value 19457
Command (m for help): &color(red){p};
Disk /dev/hda: 255 heads, 63 sectors, 19457 cylinders
Units = cylinders of 16065 * 512 bytes
Device Boot Start End Blocks Id System
/dev/hda1 1 9 72261 83 Linux
/dev/hda2 10 79 562275 82 Linux s...
/dev/hda3 80 6454 51207187+ 83 Linux
/dev/hda4 6455 19457 104446597+ 83 Linux
Command (m for help): &color(red){w ← 書き込みを行いま...
The partition table has been altered!
Calling ioctl() to re-read partition table.
Re-read table failed with error 16: Device or resource bu...
Reboot your system to ensure the partition table is updat...
WARNING: If you have created or modified any DOS 6.x
partitions, please see the fdisk manual page for additional
information.
Syncing disks.
#
}}
-''一旦リブートします。''~
理由は不明ですが、リブートしないと、mkreiserfsがうまくか...
~
-''mkreiserfs''~
/dev/hda4をReiserFSに設定します。~
#pre{{
# mkreiserfs /dev/hda4
mkreiserfs 3.6.19 (2003 www.namesys.com)
A pair of credits:
BigStorage (www.bigstorage.com) contributes to our gene...
and has done so for quite a long time.
Hans Reiser was the project initiator, source of all fun...
years. He is the architect and official maintainer.
Guessing about desired format.. Kernel 2.4.21 is running.
Format 3.6 with standard journal
Count of blocks on the device: 26111648
Number of blocks consumed by mkreiserfs formatting proces...
Blocksize: 4096
Hash function used to sort names: "r5"
Journal Size 8193 blocks (first block 18)
Journal Max transaction length 1024
inode generation number: 0
UUID: 57a875a4-fe10-4b01-be78-e4ffe814f9c3
ATTENTION: YOU SHOULD REBOOT AFTER FDISK!
ALL DATA WILL BE LOST ON '/dev/hda4'!
Continue (y/n):&color(red){y};
Initializing journal - 0%....20%....40%....60%....80%.......
Syncing..ok
Tell your friends to use a kernel based on 2.4.18 or late...
kernel based on 2.4.9, when you use reiserFS. Have fun.
ReiserFS is successfully created on /dev/hda4.
}}
-''/dev/hda3のパーティションサイズ・フィッティング''~
/dev/hda3のパーティションサイズと、ファイルシステムサイズ...
#pre{{
# umount /dev/hda3
# e2fsck -f /dev/hda3
e2fsck 1.27 (8-Mar-2002)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
/dev/hda3: 962966/5898240 files (6.0% non-contiguous), 60...
# resize2fs -p /dev/hda3
resize2fs 1.35 (28-Feb-2004)
Resizing the filesystem on /dev/hda3 to 12801796 (4k) blo...
Begin pass 1 (max = 31)
Extending the inode table XXXXXXXXXXXXXXXXXXXXXXXXXXX...
The filesystem on /dev/hda3 is now 12801796 blocks long.
# mount -t ext2 /dev/hda3 /mnt/hda3
}}
-''リブート''~
念のため。~
~
-''マウント&動作確認''~
#pre{{
# mkdir /mnt/hda4
# modprobe reiserfs
# mount -t reiserfs /dev/hda4 /mnt/hda4
# cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / ext2 ro 0 0
/proc /proc proc rw 0 0
none /dev/pts devpts rw 0 0
/dev/ram0 /mnt/ram0 ext2 rw 0 0
/dev/hda3 /mnt/hda3 ext2 rw 0 0
&color(red){/dev/hda4 /mnt/hda4 reiserfs rw 0 0};
# df
Filesystem 1k-blocks Used Available Use% M...
rootfs 69973 58519 7841 88% /
/dev/root 69973 58519 7841 88% /
/dev/ram0 1003 116 836 12% /...
/dev/hda3 50403028 23557024 26846004 47% /...
&color(red){/dev/hda4 104443400 32840 1044...
}}
~
*ReiserFS上にdebian26を構築 [#pcb729a7]
-''基本的には…''~
基本的には、「debian26のインストール」の手順通りにインス...
/mnt/hda4上にdebian26環境を構築できます。~
~
本節では、/dev/hda3上で動作させていたdebian26環境を/dev/h...
~
-''Kernelの更新''~
ReiserFSを組み込んだカーネル(レビジョンlandisk.0.4 以降...
debian26環境を立ち上げて、apt-getすればOKです。~
※ ReiserFS対応カーネル(landisk.0.4)を含むbase26-sh4-20050...
#pre{{
landisk:~# apt-get update
landisk:~# apt-get install kernel-image-2.6.11-sh reiserf...
}}
-''あとは、''~
--再起動後、~
LANDISKオリジナル環境上で、/mnt/hda3上のdebian26を/mnt/hd...
(cp -a を使う。)~
なお、share は、リンクした。~
#pre{{
# cp -a 省略 /mnt/hda4
# mkdir /mnt/hda4/mnt/hda3
# ln -s /mnt/hda3/share /mnt/hda4/share
# ls -la /mnt/hda4
total 54
drwxr-xr-x 21 root root 504 Jun 2 23:41 .
drwxr-xr-x 7 root root 1024 May 31 21:20 ..
drwxr-xr-x 2 root root 1976 Jun 1 15:53 bin
drwxr-xr-x 2 root root 192 Jun 1 16:23 boot
drwxr-xr-x 6 root root 34832 Jun 2 01:17 dev
drwxr-xr-x 38 root root 2624 Jun 2 01:17 etc
drwxrwsr-x 3 root ftp 72 Jun 1 16:28 home
drwxr-xr-x 2 root root 48 Jun 1 15:46 in...
drwxr-xr-x 7 root root 3056 Jun 1 18:20 lib
drwxr-xr-x 2 root root 48 Jun 1 15:46 me...
drwxr-xr-x 2 root root 48 Mar 26 13:09 mnt
drwxr-xr-x 2 root root 48 Jun 1 15:46 opt
drwxr-xr-x 2 root root 48 Mar 26 13:09 proc
drwxr-xr-x 2 root root 240 Jun 1 16:29 root
drwxr-xr-x 2 root root 2992 Jun 1 18:20 sbin
lrwxrwxrwx 1 root root 15 Jun 1 20:41 sh...
drwxr-xr-x 2 root root 48 Jun 1 15:46 srv
drwxr-xr-x 2 root root 48 Apr 22 21:15 sys
drwxrwxrwt 2 root root 48 Jun 2 01:06 tmp
drwxr-xr-x 11 root root 288 Jun 1 15:46 usr
drwxr-xr-x 13 root root 312 Jun 1 15:46 var
}}
--/mnt/hda4/etc/fstab~
を変更して、~
#pre{{
&color(red){/dev/hda4 / reiserfs defaults...
&color(red){/dev/hda3 /mnt/hda3 ext2 defaults...
proc /proc proc defaults 0 0
/dev/hda2 swap swap defaults 0 0
}}
--/mnt/hda3/boot/kernelsw.conf~
を変更して(カーネル本体は、/mnt/hda3/boot下の物を使用す...
#pre{{
linear
boot=/dev/hda
disk=/dev/hda
bios=0x80
timeout=50
default=linux
image=/mnt/hda3/boot/vmlinuz-2.6.11-sh
label=linux
root=&color(red){/dev/hda4};
read-only
offset_address=0x00800000
append="mem=64M console=ttySC1,9600 root=&color(red){/dev...
}}
起動すればOKです。~
#pre{{
# cd /mnt/hda3
# kernelsw.pl boot/kernelsw.conf
Loading .... done.
==============================================
SH-Linux Kernel Switcher V2.1
----------------------------------------------
image = /mnt/hda3/boot/vmlinuz-2.6.11-sh (size:1298432,...
root = /dev/hda4 (read-only)
append = "mem=64M console=ttySC1,9600 root=/dev/hda4 fas...
offset_address = 0x00800000
----------------------------------------------
kernel boot parameter details
0 : 0x1 # read-only root file system
1 : 0x0 # RAMDISK Flags
2 : 0x304 # Root device (/dev/hda4)
3 : 0x1 # Loader type (LILO = 1)
4 : 0x0 # Initrd start
5 : 0x0 # Initrd size
6 : 0x0 # Not defined yet
7 : 0x0 # Not defined yet
==============================================
#
# /home/LANDISK/scripts/powerctrl.sh reboot
}}
~
*トラブルシューティング [#sa2c11f7]
LANDISK-120GBモデル(HDL-120U)では無問題でしたが、 160GBモ...
次のような問題が発生しました。~
うちの160GB品固有の問題なのか、それとも全体的なものなのか...
私が行った回避方法を記しておきます。(場当たり的ですが。)~
~
-''ReiserFS上でファイルをmvするとSegmentation faultが発生...
LANDISK付属カーネル+reiserfsモジュール+LANDISK(160GB)の...
cp -a とrm で回避した。~
(Kernel 2.6ベースだと本不具合は発生しない。)~
-''ブートしない…''~
LANDISK(160GB)で発生。パーティションを切り直した後、/dev/...
debian26を起動して、/dev/hda4のReserFS化を行うと、無事に...
ちなみに不具合時のエラーログはこんな感じ。~
#pre{{
Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.11-sh (root@landisk) (gcc version 3.4.4...
(prerelease) (Debian 3.4.3-12)) #1 Wed Jun 1 13:11:54 JST...
I-O DATA DEVICE, INC. landisk3 support.
Built 1 zonelists
Kernel command line: mem=64M console=ttySC1,9600 root=/de...
Setting GDB trap vector to 0x80000100
PID hash table entries: 512 (order: 9, 8192 bytes)
CPU clock: 266.66MHz
Bus clock: 133.33MHz
Module clock: 33.33MHz
…省略…
NET: Registered protocol family 1
NET: Registered protocol family 17
eth0: link up, 100Mbps, full-duplex, lpa 0x41E1
IP-Config: Incomplete network configuration information.
ReiserFS: hda4: found reiserfs format "3.6" with standard...
ReiserFS: hda4: using ordered data mode
ReiserFS: hda4: journal params: device hda4, size 8192, j...
18, max trans len 1024, max batch 900, max commit age 30...
ReiserFS: hda4: checking transaction log (hda4)
ReiserFS: hda4: Using r5 hash to sort names
VFS: Mounted root (reiserfs filesystem) readonly.
Freeing unused kernel memory: 80k freed
/sbin/initKernel panic - not syncing: Attempted to kill i...
: error while loading shared libraries: /lib/libgcc_s.so...
だんまり。
}}
~
-''情報求む''~
原因解析をしたく、試してみた方は動作報告/不具合報告をよ...
(こんな危険なことする人、そんなにいるとも思えないが。。。)~
----
->理由は不明ですが ←Calling ioctl() to re-read partitio...
#counter
ページ名: