3.5 インチ HDD 2台 / 2 3.5 inch hard drive

LS-WSGL/R1

大阪駅北のショップで、
・SATA 電源2分岐
・SATA 延長ケーブル
を買ってきた。

LS-WSGL に 3.5 インチ HDD を2台つなぐため。

パーティションの削除

2台目の HDD は Maxtor 6Y160M0 160GB SATA HDD.
玄箱/Pro のフロントパネル裏の SATA に接続して、 パーティションを削除する。
kup:~# fdisk /dev/sdb

The number of cylinders for this disk is set to 19929.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): p

Disk /dev/sdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1          25      200781   83  Linux
/dev/sdb2              26         275     2008125   83  Linux
/dev/sdb3             276         307      257040   82  Linux swap / Solaris
/dev/sdb4             308       19929   157613715   83  Linux

Command (m for help): d
Partition number (1-4): 1

Command (m for help): d
Partition number (1-4): 2

Command (m for help): d
Partition number (1-4): 3

Command (m for help): d
Selected partition 4

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.
kup:~#

起動

SATA2 に先日スペアドライブにした WD3200 を、
SATA1 にパーティションを削除した Maxtor 6Y160M0 を、
接続して LS-WSGL を起動する。

	:
	:
Marvell Serial ATA Adapter
Integrated Sata device found
  Device 0: OK
Model: WDC WD3200SD-01KNB0                      Firm: 08.05J08 Ser#:      WD-WCAMR1683855
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
  Device 1: OK
Model: Maxtor 6Y160M0                           Firm: YAR511W0 Ser#: Y48DJ6QE            
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 156334.5 MB = 152.6 GB (320173056 x 512)

Using device ide0, partition 1
	:
	:
Intergrated Sata device found
scsi0 : Marvell SCSI to SATA adapter
scsi1 : Marvell SCSI to SATA adapter
** BUFFALO Disable Command Queuing Function [0 0] **
** BUFFALO Disable Command Queuing Function [0 1] **
  Vendor: WDC       Model: WD3200SD-01KNB0   Rev: 08.0
  Type:   Direct-Access                      ANSI SCSI revision: 03
  Vendor: Maxtor    Model: 6Y160M0           Rev: YAR5
  Type:   Direct-Access                      ANSI SCSI revision: 03
Linux IAL (ERROR) : retry command host=0, bus=0 SCpnt = c1449ba0
SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
SCSI device sda: 625142448 512-byte hdwr sectors (320073 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
 sda: sda1 sda2 sda4 < sda5 sda6 >
sd 0:0:0:0: Attached scsi disk sda
Linux IAL (ERROR) : retry command host=1, bus=1 SCpnt = c1449ba0
SCSI device sdb: 320173056 512-byte hdwr sectors (163929 MB)
sdb: Write Protect is off
SCSI device sdb: drive cache: write back
SCSI device sdb: 320173056 512-byte hdwr sectors (163929 MB)
sdb: Write Protect is off
SCSI device sdb: drive cache: write back
 sdb:
sd 1:0:0:0: Attached scsi disk sdb
sd 0:0:0:0: Attached scsi generic sg0 type 0
sd 1:0:0:0: Attached scsi generic sg1 type 0
	:
	:
BUFFALO INC. LinkStation series 
LS-WSGL678 login: 

RAID の様子を見る

root@LS-WSGL678:~# mdadm -D /dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Thu Jun 19 16:33:50 2008
     Raid Level : raid1
     Array Size : 1003904 (980.54 MiB 1028.00 MB)
    Device Size : 1003904 (980.54 MiB 1028.00 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Thu Nov  1 00:00:20 2007
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           UUID : adbe578f:b86ab25a:09937ff0:e2de4343
         Events : 0.1335

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       0        0        1      removed
root@LS-WSGL678:~# mdadm -D /dev/md1
/dev/md1:
        Version : 00.90.03
  Creation Time : Thu Jun 19 16:33:51 2008
     Raid Level : raid1
     Array Size : 5004160 (4.77 GiB 5.12 GB)
    Device Size : 5004160 (4.77 GiB 5.12 GB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Thu Nov  1 00:02:17 2007
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           UUID : db218435:100e25e7:d2ba170f:d67ec206
         Events : 0.16963

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       0        0        1      removed
root@LS-WSGL678:~# mdadm -D /dev/md1 2
mdadm: md device /dev/md2 does not appear to be active.
root@LS-WSGL678:~# mdadm -D /dev/md10
/dev/md10:
        Version : 00.90.03
  Creation Time : Thu Jun 19 16:33:54 2008
     Raid Level : raid1
     Array Size : 1003904 (980.54 MiB 1028.00 MB)
    Device Size : 1003904 (980.54 MiB 1028.00 MB)
   Raid Devices : 2
  Total Devices : 1
Preferred Minor : 10
    Persistence : Superblock is persistent

    Update Time : Thu Nov  1 00:40:52 2007
          State : clean, degraded
 Active Devices : 1
Working Devices : 1
 Failed Devices : 0
  Spare Devices : 0

           UUID : ba25aab6:f1bb3eab:c75c26a7:a754b72a
         Events : 0.19

    Number   Major   Minor   RaidDevice State
       0       8        5        0      active sync   /dev/sda5
       1       0        0        1      removed
root@LS-WSGL678:~# 
removed.

パーティションを切る

sda と全く同じサイズに sdb にパーティションを切る
root@LS-WSGL678:~# fdisk -l /dev/sda

Disk /dev/sda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         125     1004031   83  Linux
/dev/sda2             126         748     5004247+  83  Linux
/dev/sda4             749       38913   306560362+   5  Extended
/dev/sda5             749         873     1004031   83  Linux
/dev/sda6             874       38913   305556268+  83  Linux
root@LS-WSGL678:~# fdisk /dev/sdb

The number of cylinders for this disk is set to 19929.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
   (e.g., DOS FDISK, OS/2 FDISK)

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-19929, default 1): 
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-19929, default 19929): 125

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
p
Partition number (1-4): 2
First cylinder (126-19929, default 126): 
Using default value 126
Last cylinder or +size or +sizeM or +sizeK (126-19929, default 19929): 748

Command (m for help): n
Command action
   e   extended
   p   primary partition (1-4)
e
Partition number (1-4): 4
First cylinder (749-19929, default 749): 
Using default value 749
Last cylinder or +size or +sizeM or +sizeK (749-19929, default 19929): 
Using default value 19929

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (749-19929, default 749): 
Using default value 749
Last cylinder or +size or +sizeM or +sizeK (749-19929, default 19929): 873

Command (m for help): n
Command action
   l   logical (5 or over)
   p   primary partition (1-4)
l
First cylinder (874-19929, default 874): 
Using default value 874
Last cylinder or +size or +sizeM or +sizeK (874-19929, default 19929): 
Using default value 19929

Command (m for help): p

Disk /dev/sdb: 163.9 GB, 163928604672 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1         125     1004031   83  Linux
/dev/sdb2             126         748     5004247+  83  Linux
/dev/sdb4             749       19929   154071382+   5  Extended
/dev/sdb5             749         873     1004031   83  Linux
/dev/sdb6             874       19929   153067288+  83  Linux

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
SCSI device sdb: 320173056 512-byte hdwr sectors (163929 MB)
sdb: Write Protect is off
SCSI device sdb: drive cache: write back
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
SCSI device sdb: 320173056 512-byte hdwr sectors (163929 MB)
sdb: Write Protect is off
SCSI device sdb: drive cache: write back
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
/sbin/hotplug [block]
Syncing disks.
root@LS-WSGL678:~# 

フォーマット

フォーマットしておく
root@LS-WSGL678:~# mkfs -j /dev/sdb1
sh: mkfs: command not found
root@LS-WSGL678:~# mkfs.ext3 /dev/sdb1
mke2fs 1.27 (8-Mar-2002)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
125696 inodes, 251007 blocks
12550 blocks (5.00%) reserved for the super user
First data block=0
8 block groups
32768 blocks per group, 32768 fragments per group
15712 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376

Writing inode tables: 0/81/82/83/84/85/86/87/8done                            
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first.  Use tune2fs -c or -i to override.
root@LS-WSGL678:~# mkfs.xfs /dev/sdb2 
meta-data=/dev/sdb2              isize=256    agcount=8, agsize=156383 blks
         =                       sectsz=512  
data     =                       bsize=4096   blocks=1251061, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096  
log      =internal log           bsize=4096   blocks=2560, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0
root@LS-WSGL678:~# mkfs.xfs /dev/sdb6
meta-data=/dev/sdb6              isize=256    agcount=37, agsize=1048576 blks
         =                       sectsz=512
data     =                       bsize=4096   blocks=38266822, imaxpct=25
         =                       sunit=0      swidth=0 blks, unwritten=1
naming   =version 2              bsize=4096
log      =internal log           bsize=4096   blocks=18684, version=1
         =                       sectsz=512   sunit=0 blks
realtime =none                   extsz=65536  blocks=0, rtextents=0
root@LS-WSGL678:~#

再起動

電源を切、入して再起動する。
/, /boot, swap がリビルドされるはず。
BUFFALO INC. LinkStation series 
LS-WSGL678 login: root
root@LS-WSGL678:~# df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/md1               4993920    273824   4720096   5% /
/dev/ram1                15360        80     15280   1% /mnt/ram
/dev/md0                988064    109668    878396  11% /boot
/dev/disk1_6         305425196      1216 305423980   0% /mnt/disk1
/dev/disk2_6         152992552       608 152991944   0% /mnt/disk2
root@LS-WSGL678:~# mdadm -D /dev/md0
/dev/md0:
        Version : 00.90.03
  Creation Time : Thu Jun 19 16:33:50 2008
     Raid Level : raid1
     Array Size : 1003904 (980.54 MiB 1028.00 MB)
    Device Size : 1003904 (980.54 MiB 1028.00 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 0
    Persistence : Superblock is persistent

    Update Time : Thu Nov  1 00:18:58 2007
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : adbe578f:b86ab25a:09937ff0:e2de4343
         Events : 0.1364

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
root@LS-WSGL678:~# mdadm -D /dev/md0 1
/dev/md1:
        Version : 00.90.03
  Creation Time : Thu Jun 19 16:33:51 2008
     Raid Level : raid1
     Array Size : 5004160 (4.77 GiB 5.12 GB)
    Device Size : 5004160 (4.77 GiB 5.12 GB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Thu Nov  1 00:21:08 2007
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : db218435:100e25e7:d2ba170f:d67ec206
         Events : 0.17452

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2
root@LS-WSGL678:~# mdadm -D /dev/md1 10
/dev/md10:
        Version : 00.90.03
  Creation Time : Thu Jun 19 16:33:54 2008
     Raid Level : raid1
     Array Size : 1003904 (980.54 MiB 1028.00 MB)
    Device Size : 1003904 (980.54 MiB 1028.00 MB)
   Raid Devices : 2
  Total Devices : 2
Preferred Minor : 10
    Persistence : Superblock is persistent

    Update Time : Thu Nov  1 00:13:34 2007
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           UUID : ba25aab6:f1bb3eab:c75c26a7:a754b72a
         Events : 0.20

    Number   Major   Minor   RaidDevice State
       0       8        5        0      active sync   /dev/sda5
       1       8       21        1      active sync   /dev/sdb5
root@LS-WSGL678:~# mdadm -D /dev/md10  2
mdadm: md device /dev/md2 does not appear to be active.
root@LS-WSGL678:~# 
標準ファームの initrd、good job!

LinkStation Mini
LS-WSGL
楽天市場
Amazon
Yahoo!ショッピング
Livedoor デパート
Sofmap
TSUKUMO ネットショップ
ムラウチドットコム
ヤマダ電機WEB
パソQ


3.5 インチ HDD をドライブできない電源
ハックの記録
LinkStation/玄箱 をハックしよう

ストライピング

Copyright (C) 2003-2008 Yasunari Yamashita. All Rights Reserved.
yasunari @ yamasita.jp 山下康成@京都府向日市