qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [4/2] [UU__] md10 : active raid1 sdb5[0] sda5[1] 1003904 blocks [4/2] [UU__] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [4/2] [UU__] unused devices:qube:~# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/md1 4993920 257224 4736696 6% / tmpfs 62888 0 62888 0% /lib/init/rw tmpfs 62888 0 62888 0% /dev/shm /dev/root.old 31729 16849 14880 54% /initrd /dev/md0 995928 179480 816448 19% /boot /dev/sda6 236216764 12359836 223856928 6% /mnt/disk1 /dev/sdb6 968628556 373697468 594931088 39% /mnt/disk2 qube:~# free total used free shared buffers cached Mem: 125780 123896 1884 0 32780 54764 -/+ buffers/cache: 36352 89428 Swap: 1003896 0 1003896 qube:~# mount /dev/md1 on / type xfs (rw,noatime) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/root.old on /initrd type ext2 (rw) /dev/md0 on /boot type ext3 (rw,noatime) /dev/sda6 on /mnt/disk1 type xfs (rw,noatime) /dev/sdb6 on /mnt/disk2 type xfs (rw,noatime) qube:~# parted -s /dev/sda print Model: SAMSUNG HD250HJ (scsi) Disk /dev/sda: 250GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1028MB 1028MB primary ext3 2 1028MB 6153MB 5124MB primary xfs 4 6153MB 250GB 244GB extended 5 6153MB 7181MB 1028MB logical linux-swap 6 7181MB 249GB 242GB logical xfs qube:~# parted -s /dev/sdb print Model: WDC WD10EADS-00M2B0 (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1028MB 1028MB primary ext3 2 1028MB 6153MB 5124MB primary xfs 4 6153MB 1000GB 994GB extended 5 6153MB 7181MB 1028MB logical linux-swap 6 7181MB 999GB 992GB logical xfs qube:~#
現在動作している md0, md1 を Squeeze で上書きするのではなく、
動作確認のために Squeeze 版のハックキットを
インストールした HDD (MAXTOR 6V250F0)の
第一パーティション(sd?1)、第二パーティション(sd?2)を
SAMSUNG HD250HJ と WDC WD10EADS-00M2B0 それぞれの
第一パーティション(sd?1)、第二パーティション(sd?2)に
コピー(resync)する反則技に出る。
MAXTOR 6V250F0 を sda として起動し、
SAMSUNG HD250HJ を sdb として USB で接続して resync、
シャットダウン
SAMSUNG HD250HJ を sda として起動し、
WDC WD10EADS-00M2B0 を sdb として USB で接続して resync、
とすれば、Squeeze に置き換わるはず。
USB で起動するのは、ブート時に勝手に resync が走って Squeeze で Lenny を上書きされないため。
Debian GNU/Linux 6.0 qube ttyS0 qube login: root Password: Linux qube 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[1] 5004160 blocks [4/1] [_U__] md10 : active raid1 sda5[1] 1003904 blocks [4/1] [_U__] md0 : active raid1 sda1[1] 1003904 blocks [4/1] [_U__] unused devices:root@qube:~#
root@qube:~# apt-get install mdadm Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: exim4-base exim4-config exim4-daemon-light libpcre3 Suggested packages: mail-reader eximon4 exim4-doc-html exim4-doc-info gnutls-bin openssl file libmail-spf-query-perl swaks Recommended packages: default-mta mail-transport-agent The following NEW packages will be installed: exim4-base exim4-config exim4-daemon-light libpcre3 mdadm 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 2747 kB of archives. After this operation, 5685 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.jp.debian.org/debian/ squeeze/main exim4-config all 4.72-3 [464 kB] Get:2 http://ftp.jp.debian.org/debian/ squeeze/main exim4-base armel 4.72-3+b1 [1016 kB] Get:3 http://ftp.jp.debian.org/debian/ squeeze/main libpcre3 armel 8.02-1.1 [234 kB] Get:4 http://ftp.jp.debian.org/debian/ squeeze/main exim4-daemon-light armel 4.72-3+b1 [567 kB] Get:5 http://ftp.jp.debian.org/debian/ squeeze/main mdadm armel 3.1.4-1+8efb9d1 [467 kB] Fetched 2747 kB in 1s (1931 kB/s) Preconfiguring packages ... Package configuration lqqqqqqqqqqqqqqqqqqqqqqqqqqqu Configuring mdadm tqqqqqqqqqqqqqqqqqqqqqqqqqqqk x x x If the system's root file system is located on an MD array (RAID), it x needs to be started early during the boot sequence. If it is located on x a logical volume (LVM), which is on MD, all constituent arrays need to x be started. x x If you know exactly which arrays are needed to bring up the root file x system, and you want to postpone starting all other arrays to a later x point in the boot sequence, enter the arrays to start here. x Alternatively, enter 'all' to simply start all available arrays. x x If you do not need or want to start any arrays for the root file system, x leave the answer blank (or enter 'none'). This may be the case if you x are using kernel autostart or do not need any arrays to boot. x x Please enter 'all', 'none', or a space-separated list of devices such as x x <Ok> x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj Package configuration lqqqqqqqqqqqqu Configuring mdadm tqqqqqqqqqqqqk x MD arrays needed for the root file system: x x x x all________________________________________ x x x x <Ok> x x x mqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqj Selecting previously deselected package exim4-config. (Reading database ... 11143 files and directories currently installed.) Unpacking exim4-config (from .../exim4-config_4.72-3_all.deb) ... Selecting previously deselected package exim4-base. Unpacking exim4-base (from .../exim4-base_4.72-3+b1_armel.deb) ... Selecting previously deselected package libpcre3. Unpacking libpcre3 (from .../libpcre3_8.02-1.1_armel.deb) ... Selecting previously deselected package exim4-daemon-light. Unpacking exim4-daemon-light (from .../exim4-daemon-light_4.72-3+b1_armel.deb) ... Selecting previously deselected package mdadm. Unpacking mdadm (from .../mdadm_3.1.4-1+8efb9d1_armel.deb) ... Processing triggers for man-db ... Setting up exim4-config (4.72-3) ... Adding system-user for exim (v4) Setting up exim4-base (4.72-3+b1) ... Setting up libpcre3 (8.02-1.1) ... Setting up exim4-daemon-light (4.72-3+b1) ... Starting MTA: exim4. Setting up mdadm (3.1.4-1+8efb9d1) ... Generating mdadm.conf... done. Starting MD monitoring service: mdadm --monitor. Generating udev events for MD arrays...done. root@qube:~#何か様子が違う
念のため、再起動
root@qube:~# shutdown -r now : : Debian GNU/Linux 6.0 qube ttyS0 qube login: root Password: Last login: Thu Jan 1 09:00:42 JST 1970 on ttyS0 Linux qube 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@qube:~#
root@qube:~# date Thu Jan 1 09:01:09 JST 1970 root@qube:~# date 011521592011 Sat Jan 15 21:59:00 JST 2011 root@qube:~#
root@qube:~# tail -f /var/log/messages : : usb 1-1: configuration #1 chosen from 1 choice scsi2 : SCSI emulation for USB Mass Storage devices Jan 15 22:00:41 qube kernel: usb 1-1: configuration #1 chosen from 1 choice Jan 15 22:00:41 qube kernel: scsi2 : SCSI emulation for USB Mass Storage devices scsi 2:0:0:0: Direct-Access SAMSUNG JDPPB08546 0-05 PQ: 0 ANSI: 2 CCS Jan 15 22:00:46 sd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) qube kernel: scsi 2:0:0:0: Direcsd 2:0:0:0: [sdb] Write Protect is off t-Access SAMsd 2:0:0:0: [sdb] Assuming drive cache: write through SUNG JDPPB08546 0-05 PQ: 0 ANSI: 2 CCS Jsd 2:0:0:0: [sdb] 488397168 512-byte hardware sectors (250059 MB) an 15 22:00:46 qube kernel: sd 2sd 2:0:0:0: [sdb] Write Protect is off :0:0:0: [sdb] 48sd 2:0:0:0: [sdb] Assuming drive cache: write through 8397168 512-byte sdb: hardware sectors (250059 MB) Jan 15 22:00:46 qube kernel: sd 2:0:0:0: [sdb] Write Protect is off Jan 15 22:00:46 qube kernel: sdb1 sd 2:0:0:0: [sd sdb2b] 488397168 512 sdb4-byte hardware sふげぇJan 15 22:00:46 sd 2:0:0:0: [sdb] Attached SCSI disk qube kernel: sdb: sdb1 sdb2 sdb4sd 2:0:0:0: Attached scsi generic sg1 type 0 < sdb5 sdb6 > Jan 15 22:00:46 qube kernel: sd 2:0:0:0: [sdb] Attached SCSI disk Jan 15 22:00:46 qube kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 root@qube:~# parted -s /dev/sdb print -bash: parted: command not found root@qube:~#
root@qube:~# apt-cache search parted drobo-utils - manage data robotics storage units (drobos) fai-setup-storage - automatically prepare storage devices fatresize - FAT16/FAT32 filesystem resizer gnu-fdisk - Linux fdisk replacement based on libparted gparted - GNOME partition editor libparted0-dev - The GNU Parted disk partitioning library development files libparted0-i18n - The GNU Parted disk partitioning library i18n support libparted0 - The GNU Parted disk partitioning shared library (old name) libparted0debian1-dbg - The GNU Parted disk partitioning library debug development files libparted0debian1 - The GNU Parted disk partitioning shared library parted-doc - The GNU Parted disk partition resizing program documentation parted - The GNU Parted disk partition resizing program partitionmanager - A partition management utility python-parted-dbg - Python interface for libparted - Debugging symbols python-parted - Python interface for libparted root@qube:~# apt-get install parted Reading package lists... Done Building dependency tree Reading state information... Done The following extra packages will be installed: dmsetup libdevmapper1.02.1 libparted0debian1 Suggested packages: libparted0-dev libparted0-i18n parted-doc The following NEW packages will be installed: dmsetup libdevmapper1.02.1 libparted0debian1 parted 0 upgraded, 4 newly installed, 0 to remove and 0 not upgraded. Need to get 604 kB of archives. After this operation, 1298 kB of additional disk space will be used. Do you want to continue [Y/n]? y Get:1 http://ftp.jp.debian.org/debian/ squeeze/main libdevmapper1.02.1 armel 2:1.02.48-4 [82.3 kB] Get:2 http://ftp.jp.debian.org/debian/ squeeze/main dmsetup armel 2:1.02.48-4 [55.0 kB] Get:3 http://ftp.jp.debian.org/debian/ squeeze/main libparted0debian1 armel 2.3-5 [309 kB] Get:4 http://ftp.jp.debian.org/debian/ squeeze/main parted armel 2.3-5 [157 kB] Fetched 604 kB in 0s (1284 kB/s) Selecting previously deselected package libdevmapper1.02.1. (Reading database ... 11412 files and directories currently installed.) Unpacking libdevmapper1.02.1 (from .../libdevmapper1.02.1_2%3a1.02.48-4_armel.deb) ... Selecting previously deselected package dmsetup. Unpacking dmsetup (from .../dmsetup_2%3a1.02.48-4_armel.deb) ... Selecting previously deselected package libparted0debian1. Unpacking libparted0debian1 (from .../libparted0debian1_2.3-5_armel.deb) ... Selecting previously deselected package parted. Unpacking parted (from .../parted_2.3-5_armel.deb) ... Processing triggers for man-db ... Setting up dmsetup (2:1.02.48-4) ... Setting up libdevmapper1.02.1 (2:1.02.48-4) ... Setting up libparted0debian1 (2.3-5) ... Setting up parted (2.3-5) ... root@qube:~# parted -s /dev/sdb print Warning: Could not determine physical sector size for /dev/sdb. Using the logical sector size (512). Model: SAMSUNG JDPPB08546 (scsi) Disk /dev/sdb: 250GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1028MB 1028MB primary ext3 2 1028MB 6153MB 5124MB primary xfs 4 6153MB 250GB 244GB extended 5 6153MB 7181MB 1028MB logical linux-swap(v1) 6 7181MB 249GB 242GB logical xfs root@qube:~#
root@qube:~# mdadm -a /dev/md0 /dev/sdb1 md: export_rdev(sdb1) md: bind<sdb1> RAID1 conf printout: --- wd:1 rd:4 disk 0, wo:1, o:1, dev:sdb1 disk 1, wo:0, o:1, dev:sda1 md: recovery of RAID array md0 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery. md: using 128k window, over a total of 1003904 blocks. mdadm: added /dev/sdb1 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[1] 5004160 blocks [4/1] [_U__] md10 : active raid1 sda5[1] 1003904 blocks [4/1] [_U__] md0 : active raid1 sdb1[4] sda1[1] 1003904 blocks [4/1] [_U__] [==>..................] recovery = 14.0% (142080/1003904) finish=0.6min speed=20554K/sec unused devices: <none> root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[1] 5004160 blocks [4/1] [_U__] md10 : active raid1 sda5[1] 1003904 blocks [4/1] [_U__] md0 : active raid1 sdb1[4] sda1[1] 1003904 blocks [4/1] [_U__] [==========>..........] recovery = 53.1% (533888/1003904) finish=0.3min speed=22326K/sec unused devices: <none> root@qube:~# md: md0: recovery done. RAID1 conf printout: --- wd:2 rd:4 disk 0, wo:0, o:1, dev:sdb1 disk 1, wo:0, o:1, dev:sda1 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[1] 5004160 blocks [4/1] [_U__] md10 : active raid1 sda5[1] 1003904 blocks [4/1] [_U__] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~#続いて /dev/sdb2 を /dev/md1 に追加する。
root@qube:~# mdadm -a /dev/md1 /dev/sdb2 md: export_rdev(sdb2) md: bind<sdb2> RAID1 conf printout: --- wd:1 rd:4 disk 0, wo:1, o:1, dev:sdb2 disk 1, wo:0, o:1, dev:sda2 md: recovery of RAID array md1 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery. md: using 128k window, over a total of 5004160 blocks. mdadm: added /dev/sdb2 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[4] sda2[1] 5004160 blocks [4/1] [_U__] [>....................] recovery = 1.9% (99392/5004160) finish=4.0min speed=20250K/sec md10 : active raid1 sda5[1] 1003904 blocks [4/1] [_U__] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~# md: md1: recovery done. RAID1 conf printout: --- wd:2 rd:4 disk 0, wo:0, o:1, dev:sdb2 disk 1, wo:0, o:1, dev:sda2 cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [4/2] [UU__] md10 : active raid1 sda5[1] 1003904 blocks [4/1] [_U__] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~#最後に /dev/sdb5 を /dev/md10 に追加する。
root@qube:~# mdadm -a /dev/md10 /dev/sdb5 md: export_rdev(sdb5) md: bind<sdb5> RAID1 conf printout: --- wd:1 rd:4 disk 0, wo:1, o:1, dev:sdb5 disk 1, wo:0, o:1, dev:sda5 md: recovery of RAID array md10 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery. md: using 128k window, over a total of 1003904 blocks. mdadm: added /dev/sdb5 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [4/2] [UU__] md10 : active raid1 sdb5[4] sda5[1] 1003904 blocks [4/1] [_U__] [==>..................] recovery = 14.2% (144256/1003904) finish=0.6min speed=20883K/sec md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~# md: md10: recovery done. RAID1 conf printout: --- wd:2 rd:4 disk 0, wo:0, o:1, dev:sdb5 disk 1, wo:0, o:1, dev:sda5 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [4/2] [UU__] md10 : active raid1 sdb5[0] sda5[1] 1003904 blocks [4/2] [UU__] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~#同期完了!
root@qube:~# cat /etc/fstab /dev/md1 / xfs defaults,noatime 0 0 proc /proc proc defaults 0 0 /dev/md10 swap swap defaults 0 0 /dev/md0 /boot ext3 defaults,noatime 0 0 #/dev/sda6 /mnt/disk1 xfs defaults,noatime 0 0 root@qube:~#
root@qube:~# shutdown -h now
Debian GNU/Linux 6.0 qube ttyS0 qube login: root Password: Last login: Thu Jan 1 09:00:42 JST 1970 on ttyS0 Linux qube 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@qube:~# mount /dev/md1 on / type xfs (rw,noatime) tmpfs on /lib/init/rw type tmpfs (rw,nosuid,mode=0755) proc on /proc type proc (rw,noexec,nosuid,nodev) sysfs on /sys type sysfs (rw,noexec,nosuid,nodev) tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev) devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=620) /dev/root.old on /initrd type ext2 (rw) /dev/md0 on /boot type ext3 (rw,noatime) root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[0] sda2[1] 5004160 blocks [4/2] [UU__] md10 : active raid1 sdb5[0] sda5[1] 1003904 blocks [4/2] [UU__] md0 : active raid1 sdb1[0] sda1[1] 1003904 blocks [4/2] [UU__] unused devices:問題なさそうroot@qube:~#
Debian GNU/Linux 6.0 qube ttyS0 qube login: root Password: Last login: Thu Jan 1 09:00:59 JST 1970 on ttyS0 Linux qube 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[0] 5004160 blocks [4/1] [U___] md10 : active raid1 sda5[0] 1003904 blocks [4/1] [U___] md0 : active raid1 sda1[0] 1003904 blocks [4/1] [U___] unused devices: <none> root@qube:~#
root@qube:~# date Thu Jan 1 09:03:05 JST 1970 root@qube:~# date 011522282011 Sat Jan 15 22:28:00 JST 2011 root@qube:~#
root@qube:~# tail -f /var/log/messages : : usb 1-1: new high speed USB device using ehci_marvell and address 2 Jan 15 22:29:42 qube kernel: usb 1-1: new high speed USB device using ehci_marvell and address 2 usb 1-1: configuration #1 chosen from 1 choice scsi2 : SCSI emulation for USB Mass Storage devices Jan 15 22:29:42 qube kernel: usb 1-1: configuration #1 chosen from 1 choice Jan 15 22:29:42 qube kernel: scsi2 : SCSI emulation for USB Mass Storage devices scsi 2:0:0:0: Direct-Access WDC WD10 WD-WCAV52628997 0A01 PQ: 0 ANSI: 2 CCS Jan 15 22:29:47 sd 2:0:0:0: [sdb] 1953525168 512-byte hardware sectors (1000205 MB) qube kernel: scsi 2:0:0:0: Direcsd 2:0:0:0: [sdb] Write Protect is off t-Access WDCsd 2:0:0:0: [sdb] Assuming drive cache: write through WD10 WD-WCAV52628997 0A01 PQ: 0 ANSI: 2 CCS Jsd 2:0:0:0: [sdb] 1953525168 512-byte hardware sectors (1000205 MB) an 15 22:29:47 qube kernel: sd 2sd 2:0:0:0: [sdb] Write Protect is off :0:0:0: [sdb] 19sd 2:0:0:0: [sdb] Assuming drive cache: write through 53525168 512-byt sdb:e hardware sectors (1000205 MB) Jan 15 22:29:47 qube kernel: sd 2:0:0:0: [sdb] Write Protect is off Jan 15 22:29:47 qube kernel: sd 2:0:0:0: [sdb] 1953525168 512-byte hardware sectors (1000205 MB) Jan 15 22:29:47 qube kernel: sd 2:0:0:0: [sdb] Write Protect is off sdb1 sdb2 sdb4 < sdb5 sdb6 > Jan 15 22:29:48 sd 2:0:0:0: [sdb] Attached SCSI disk qube kernel: sdb: sdb1 sdb2 sdb4sd 2:0:0:0: Attached scsi generic sg1 type 0 < sdb5 sdb6 > Jan 15 22:29:48 qube kernel: sd 2:0:0:0: [sdb] Attached SCSI disk Jan 15 22:29:48 qube kernel: sd 2:0:0:0: Attached scsi generic sg1 type 0 root@qube:~# parted -s /dev/sdb print Warning: Could not determine physical sector size for /dev/sdb. Using the logical sector size (512). Model: WDC WD10 WD-WCAV52628997 (scsi) Disk /dev/sdb: 1000GB Sector size (logical/physical): 512B/512B Partition Table: msdos Number Start End Size Type File system Flags 1 32.3kB 1028MB 1028MB primary ext3 2 1028MB 6153MB 5124MB primary xfs 4 6153MB 1000GB 994GB extended 5 6153MB 7181MB 1028MB logical linux-swap(v1) 6 7181MB 999GB 992GB logical xfs root@qube:~#
root@qube:~# mdadm -a /dev/md0 /dev/sdb1 md: export_rdev(sdb1) md: bind<sdb1> RAID1 conf printout: --- wd:1 rd:4 disk 0, wo:0, o:1, dev:sda1 disk 1, wo:1, o:1, dev:sdb1 md: recovery of RAID array md0 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery. md: using 128k window, over a total of 1003904 blocks. mdadm: added /dev/sdb1 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[0] 5004160 blocks [4/1] [U___] md10 : active raid1 sda5[0] 1003904 blocks [4/1] [U___] md0 : active raid1 sdb1[4] sda1[0] 1003904 blocks [4/1] [U___] [===>.................] recovery = 15.1% (152960/1003904) finish=0.6min speed=22126K/sec unused devices: <none> root@qube:~# md: md0: recovery done. RAID1 conf printout: --- wd:2 rd:4 disk 0, wo:0, o:1, dev:sda1 disk 1, wo:0, o:1, dev:sdb1 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[0] 5004160 blocks [4/1] [U___] md10 : active raid1 sda5[0] 1003904 blocks [4/1] [U___] md0 : active raid1 sdb1[1] sda1[0] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~#続いて /dev/sdb2 を /dev/md1 に追加する。
root@qube:~# mdadm -a /dev/md1 /dev/sdb2 md: export_rdev(sdb2) md: bind<sdb2> RAID1 conf printout: --- wd:1 rd:4 disk 0, wo:0, o:1, dev:sda2 disk 1, wo:1, o:1, dev:sdb2 md: recovery of RAID array md1 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery. md: using 128k window, over a total of 5004160 blocks. mdadm: added /dev/sdb2 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[4] sda2[0] 5004160 blocks [4/1] [U___] [>....................] recovery = 4.6% (233984/5004160) finish=4.0min speed=19659K/sec md10 : active raid1 sda5[0] 1003904 blocks [4/1] [U___] md0 : active raid1 sdb1[1] sda1[0] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~# program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO program smartctl is using a deprecated SCSI ioctl, please convert it to SG_IO root@qube:~# md: md1: recovery done. RAID1 conf printout: --- wd:2 rd:4 disk 0, wo:0, o:1, dev:sda2 disk 1, wo:0, o:1, dev:sdb2 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[1] sda2[0] 5004160 blocks [4/2] [UU__] md10 : active raid1 sda5[0] 1003904 blocks [4/1] [U___] md0 : active raid1 sdb1[1] sda1[0] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~#最後に /dev/sdb5 を /dev/md10 に追加する。
root@qube:~# mdadm -a /dev/md10 /dev/sdb5 md: export_rdev(sdb5) md: bind<sdb5> RAID1 conf printout: --- wd:1 rd:4 disk 0, wo:0, o:1, dev:sda5 disk 1, wo:1, o:1, dev:sdb5 md: recovery of RAID array md10 md: minimum _guaranteed_ speed: 1000 KB/sec/disk. md: using maximum available idle IO bandwidth (but not more than 50000 KB/sec) for recovery. md: using 128k window, over a total of 1003904 blocks. mdadm: added /dev/sdb5 root@qube:~# md: md10: recovery done. RAID1 conf printout: --- wd:2 rd:4 disk 0, wo:0, o:1, dev:sda5 disk 1, wo:0, o:1, dev:sdb5 root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sdb2[1] sda2[0] 5004160 blocks [4/2] [UU__] md10 : active raid1 sdb5[1] sda5[0] 1003904 blocks [4/2] [UU__] md0 : active raid1 sdb1[1] sda1[0] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~#
Debian GNU/Linux 6.0 qube ttyS0 qube login: root Password: Last login: Thu Jan 1 09:02:07 JST 1970 on ttyS0 Linux qube 2.6.22.7 #1 Thu Jun 18 21:48:29 JST 2009 armv5tejl The programs included with the Debian GNU/Linux system are free software; the exact distribution terms for each program are described in the individual files in /usr/share/doc/*/copyright. Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@qube:~# cat /proc/mdstat Personalities : [raid0] [raid1] [raid6] [raid5] [raid4] md1 : active raid1 sda2[0] sdb2[1] 5004160 blocks [4/2] [UU__] md10 : active raid1 sda5[0] sdb5[1] 1003904 blocks [4/2] [UU__] md0 : active raid1 sda1[0] sdb1[1] 1003904 blocks [4/2] [UU__] unused devices: <none> root@qube:~#できた!
root@qube:~# cat /etc/fstab /dev/md1 / xfs defaults,noatime 0 0 proc /proc proc defaults 0 0 /dev/md10 swap swap defaults 0 0 /dev/md0 /boot ext3 defaults,noatime 0 0 /dev/sda6 /mnt/disk1 xfs defaults,noatime 0 0 /dev/sdb6 /mnt/disk2 xfs defaults,noatime 0 0 root@qube:~# mkdir /mnt/disk1 mkdir: cannot create directory `/mnt/disk1': File exists root@qube:~# mkdir /mnt/disk2 mkdir: cannot create directory `/mnt/disk2': File exists root@qube:~# ls /mnt disk1 disk2 share root@qube:~#何で、disk1, disk2 があるんだろう??
root@qube:~# mount -a XFS mounting filesystem sda6 XFS mounting filesystem sdb6 root@qube:~# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/md1 4993920 315196 4678724 7% / tmpfs 62888 0 62888 0% /lib/init/rw tmpfs 62888 0 62888 0% /dev/shm /dev/root.old 31729 16849 14880 54% /initrd /dev/md0 995928 179508 816420 19% /boot /dev/sda6 236216764 12359836 223856928 6% /mnt/disk1 /dev/sdb6 968628556 373964548 594664008 39% /mnt/disk2 root@qube:~#
・rsync のインストール
・バックアップスクリプトのリストア
・/mnt/disk2/Backup を /mnt/Backup にシンボリックリンク
・cron でバックアップスクリプトを起動するよう設定
・resolv.conf の修正。domain, search と server の追加
こんなところかな???
|
← Squeeze のインストール(24)最初の設定~ftp サーバ |
ハックの記録 LinkStation/玄箱 をハックしよう |
→ tftp サーバの引っ越し |