snbhsmt_log

ネットワークとコンピュータ、その他いろいろ

スポンサーサイト

上記の広告は1ヶ月以上更新のないブログに表示されています。
新しい記事を書く事で広告が消せます。

Linux で MO (光磁気ディスク) を使う

環境: Endeavor MT-4000 / Adaptec AHA-2940U / Fujitsu M2513E / CentOS 5.3

MO ドライブを取り付けて、状況はこんな感じ。
# cat /var/log/messages
   :
Jun 20 00:03:08 oxley kernel: scsi0 : Adaptec AIC7XXX EISA/VLB/PCI SCSI HBA DRIVER, Rev 7.0
Jun 20 00:03:08 oxley kernel:         
Jun 20 00:03:08 oxley kernel:         aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs
Jun 20 00:03:08 oxley kernel:
Jun 20 00:03:08 oxley kernel:   Vendor: FUJITSU   Model: M2513E            Rev:0040
Jun 20 00:03:08 oxley kernel:   Type:   Optical Device                     ANSI SCSI revision: 02
Jun 20 00:03:08 oxley kernel:  target0:0:4: Beginning Domain Validation
Jun 20 00:03:08 oxley kernel:  target0:0:4: FAST-10 SCSI 10.0 MB/s ST (100 ns, offset 15)
Jun 20 00:03:08 oxley kernel:  target0:0:4: Domain Validation skipping write tests
Jun 20 00:03:08 oxley kernel:  target0:0:4: Ending Domain Validation
Jun 20 00:03:08 oxley kernel: sd 0:0:4:0: Attached scsi removable disk sda
Jun 20 00:03:08 oxley kernel: sd 0:0:4:0: Attached scsi generic sg0 type 7
# cat /proc/scsi/scsi
Attached devices:
Host: scsi0 Channel: 00 Id: 04 Lun: 00
  Vendor: FUJITSU  Model: M2513E           Rev: 0040
  Type:   Optical Device                   ANSI SCSI revision: 02
# cat /proc/scsi/aic7xxx/0
Adaptec AIC7xxx driver version: 7.0
Adaptec 2940 Ultra SCSI adapter
aic7880: Ultra Single Channel A, SCSI Id=7, 16/253 SCBs
Allocated SCBs: 4, SG List Length: 128

Serial EEPROM:
0x0218 0x0218 0x0218 0x0218 0x0218 0x0218 0x0218 0x0218
0x0238 0x0238 0x0238 0x0238 0x0238 0x0238 0x0238 0x0238
0x19b6 0x005f 0x0007 0x0008 0xff00 0xffff 0xffff 0xffff
0xffff 0xffff 0xffff 0xffff 0xffff 0xffff 0x00ff 0x3c9a

Target 0 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)
Target 1 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)
Target 2 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)
Target 3 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)
Target 4 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)
        Goal: 10.000MB/s transfers (10.000MHz, offset 15)
        Curr: 10.000MB/s transfers (10.000MHz, offset 15)
        Channel A Target 4 Lun 0 Settings
                Commands Queued 43
                Commands Active 0
                Command Openings 1
                Max Tagged Openings 0
                Device Queue Frozen Count 0
Target 5 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)
Target 6 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)
Target 7 Negotiation Settings
        User: 20.000MB/s transfers (20.000MHz, offset 127)

自分は MO を /mnt/mo にマウントすることにしたので、そのマウントポイントを予め作成しておく。
# mkdir /mnt/mo

MO ドライブが /dev/sda として正常に認識されてる様なので、 MO を入れてパーティションを作成してみる。 以降の操作をすると当然その MO の中身が消えるので注意。

これは必要無いかもしれないけど、予め /sbin/fdisk で総てのパーティションをクリアしておく。
p で確認、d で削除、w で書き込み。

そしたら mkfs コマンドでパーティションを作成する。 メディアの種類とパーティションの種類から以下のどれかを実行。 Windows でも利用したいなら vfat を指定するとよい。
# mkfs -t ext2 /dev/sda               # 230M ディスク ext2
# mkfs -t ext2 -b 2048 /dev/sda       # 640M ディスク ext2
# mkfs -t vfat -I /dev/sda            # 230M ディスク VFAT
# mkfs -t vfat -I -S 2048 /dev/sda    # 640M ディスク VFAT

マウントしてみる。パーティションの種類により以下のどちらかを実行。
# mount -t vfat /dev/sda /mnt/mo     # vfat
# mount -t ext2 /dev/sda /mnt/mo     # ext2 の MO

アンマウント。
# umount /mnt/mo

MO の取り出し。
# eject /dev/sda

マウントポイント直下に誰でも書き込めるようにするには、 マウントした状態でマウントポイントのパーミッションを書き込み可能にする。 (VFAT パーティションの MO は出来ない)
# chmod a+w /mnt/mo

マウントポイントを指定してマウント出来るようにするには /etc/fstab に以下の様に書く。
# vi /etc/fstab
   :
/dev/sda    /mnt/mo    auto    noauto    0 0
一般ユーザでもマウント出来るようにしたい場合は以下の様に書く。
/dev/sda    /mnt/mo    auto    noauto,user    0 0

以下、パーティションを作成した MO の状態を残しておく。

230MO に vfat を作成した結果
# /sbin/fdisk -l /dev/sda

Disk /dev/sda: 228 MB, 228518400 bytes
64 heads, 32 sectors/track, 217 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

   Device Boot      Start         End      Blocks   Id  System

# /sbin/sfdisk -l /dev/sda

Disk /dev/sda: 217 cylinders, 64 heads, 32 sectors/track
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0       -       0          0    0  Empty
/dev/sda2          0       -       0          0    0  Empty
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty

# df -h
Filesystem            Size  Used Avail Use% Mounted on
   :
/dev/sda              218M     0  218M   0% /mnt/mo
230MO に ext2 パーティションを作成した結果
# /sbin/fdisk -l /dev/sda

Disk /dev/sda: 228 MB, 228518400 bytes
64 heads, 32 sectors/track, 217 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

Disk /dev/sda doesn't contain a valid partition table

# /sbin/sfdisk -l /dev/sda

Disk /dev/sda: 217 cylinders, 64 heads, 32 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sda: unrecognized partition table type
No partitions found

# df -h
Filesystem            Size  Used Avail Use% Mounted on
   :
/dev/sda              212M  2.1M  199M   2% /mnt/mo
640MO に vfat パーティションを作成した結果
# /sbin/fdisk -l /dev/sda
Note: sector size is 2048 (not 512)

Disk /dev/sda: 635 MB, 635600896 bytes
64 heads, 32 sectors/track, 151 cylinders
Units = cylinders of 2048 * 2048 = 4194304 bytes

   Device Boot      Start         End      Blocks   Id  System

# /sbin/sfdisk -l /dev/sda

Disk /dev/sda: 606 cylinders, 64 heads, 32 sectors/track
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1          0       -       0          0    0  Empty
/dev/sda2          0       -       0          0    0  Empty
/dev/sda3          0       -       0          0    0  Empty
/dev/sda4          0       -       0          0    0  Empty

# df -h
Filesystem            Size  Used Avail Use% Mounted on
   :
/dev/sda              606M   16K  606M   1% /mnt/mo
640MO に ext2 パーティションを作成した結果
# /sbin/fdisk -l /dev/sda
Note: sector size is 2048 (not 512)

Disk /dev/sda: 635 MB, 635600896 bytes
64 heads, 32 sectors/track, 151 cylinders
Units = cylinders of 2048 * 2048 = 4194304 bytes

Disk /dev/sda doesn't contain a valid partition table

# /sbin/sfdisk -l /dev/sda

Disk /dev/sda: 606 cylinders, 64 heads, 32 sectors/track

sfdisk: ERROR: sector 0 does not have an msdos signature
 /dev/sda: unrecognized partition
No partitions found

# df -h
Filesystem            Size  Used Avail Use% Mounted on
   :
/dev/sda              597M  468K  566M   1% /mnt/mo
Windows XP SP3 でフォーマットした 230MB MO (FAT32)
# /sbin/fdisk -l /dev/sda

Disk /dev/sda: 228 MB, 228518400 bytes
64 heads, 32 sectors/track, 217 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   ?      379950      937327   570754815+  72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(357, 116, 40) logical=(379949, 11, 5)
Partition 1 has different physical/logical endings:
     phys=(357, 32, 45) logical=(937326, 59, 3)
Partition 1 does not end on cylinder boundary.
/dev/sda2   ?       82368     1027695   968014120   65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(288, 115, 43) logical=(82367, 59, 19)
Partition 2 has different physical/logical endings:
     phys=(367, 114, 50) logical=(1027694, 14, 2)
Partition 2 does not end on cylinder boundary.
/dev/sda3   ?      913029     1858355   968014096   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(366, 32, 33) logical=(913028, 3, 26)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 43) logical=(1858354, 20, 25)
Partition 3 does not end on cylinder boundary.
/dev/sda4   ?     1409025     1409052       27749+   d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 50) logical=(1409024, 0, 1)
Partition 4 has different physical/logical endings:
     phys=(0, 10, 0) logical=(1409051, 6, 11)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

# /sbin/sfdisk -l /dev/sda

Disk /dev/sda: 217 cylinders, 64 heads, 32 sectors/track
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   ? 379949+ 937326- 557378- 570754815+  72  Unknown
                start: (c,h,s) expected (1023,63,32) found (357,116,40)
                end: (c,h,s) expected (1023,63,32) found (357,32,45)
partition ends on cylinder 357, beyond the end of the disk
/dev/sda2   ?  82367+ 1027694- 945327- 968014120   65  Novell Netware 386
                start: (c,h,s) expected (1023,63,32) found (288,115,43)
                end: (c,h,s) expected (1023,63,32) found (367,114,50)
partition ends on cylinder 367, beyond the end of the disk
/dev/sda3   ? 913028+ 1858354- 945327- 968014096   79  Unknown
                start: (c,h,s) expected (1023,63,32) found (366,32,33)
                end: (c,h,s) expected (1023,63,32) found (357,32,43)
partition ends on cylinder 357, beyond the end of the disk
/dev/sda4   ? 1409024  1409051-     28-     27749+   d  Unknown
                start: (c,h,s) expected (1023,63,32) found (372,97,50)
                end: (c,h,s) expected (1023,63,32) found (0,10,0)

# df -h
Filesystem            Size  Used Avail Use% Mounted on
   :
/dev/sda              218M  2.0K  218M   1% /mnt/mo
Windows XP SP3 でフォーマットした 640MB MO (FAT32)
# /sbin/fdisk -l /dev/sda
Note: sector size is 2048 (not 512)

Disk /dev/sda: 635 MB, 635600896 bytes
64 heads, 32 sectors/track, 151 cylinders
Units = cylinders of 2048 * 2048 = 4194304 bytes

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   ?      379950      937327  2283019262   72  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
     phys=(357, 116, 40) logical=(379949, 11, 5)
Partition 1 has different physical/logical endings:
     phys=(357, 32, 45) logical=(937326, 59, 3)
Partition 1 does not end on cylinder boundary.
/dev/sda2   ?       82368     1027695  3872056480   65  Novell Netware 386
Partition 2 has different physical/logical beginnings (non-Linux?):
     phys=(288, 115, 43) logical=(82367, 59, 19)
Partition 2 has different physical/logical endings:
     phys=(367, 114, 50) logical=(1027694, 14, 2)
Partition 2 does not end on cylinder boundary.
/dev/sda3   ?      913029     1858355  3872056384   79  Unknown
Partition 3 has different physical/logical beginnings (non-Linux?):
     phys=(366, 32, 33) logical=(913028, 3, 26)
Partition 3 has different physical/logical endings:
     phys=(357, 32, 43) logical=(1858354, 20, 25)
Partition 3 does not end on cylinder boundary.
/dev/sda4   ?     1409025     1409052      110998    d  Unknown
Partition 4 has different physical/logical beginnings (non-Linux?):
     phys=(372, 97, 50) logical=(1409024, 0, 1)
Partition 4 has different physical/logical endings:
     phys=(0, 10, 0) logical=(1409051, 6, 11)
Partition 4 does not end on cylinder boundary.

Partition table entries are not in disk order

# /sbin/sfdisk -l /dev/sda

Disk /dev/sda: 606 cylinders, 64 heads, 32 sectors/track
Units = cylinders of 1048576 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/sda1   ? 379949+ 937326- 557378- 570754815+  72  Unknown
                start: (c,h,s) expected (1023,63,32) found (357,116,40)
                end: (c,h,s) expected (1023,63,32) found (357,32,45)
/dev/sda2   ?  82367+ 1027694- 945327- 968014120   65  Novell Netware 386
                start: (c,h,s) expected (1023,63,32) found (288,115,43)
                end: (c,h,s) expected (1023,63,32) found (367,114,50)
/dev/sda3   ? 913028+ 1858354- 945327- 968014096   79  Unknown
                start: (c,h,s) expected (1023,63,32) found (366,32,33)
                end: (c,h,s) expected (1023,63,32) found (357,32,43)
/dev/sda4   ? 1409024  1409051-     28-     27749+   d  Unknown
                start: (c,h,s) expected (1023,63,32) found (372,97,50)
                end: (c,h,s) expected (1023,63,32) found (0,10,0)

# df -h
Filesystem            Size  Used Avail Use% Mounted on
   :
/dev/sda              606M  8.0K  606M   1% /mnt/mo
スポンサーサイト

« CentOS の yum から EPEL リポジトリを使える様にする|Top|RubyGems をインストール »

コメント

コメントの投稿

管理者にだけ表示を許可する

トラックバック

http://snbhsmt.blog110.fc2.com/tb.php/109-ac7ce243

Top

HOME

snbhsmt

Author:snbhsmt
Google Profiles

http://www.ksky.ne.jp/~snbhsmt/

全ての記事を表示する

この人とブロともになる

上記広告は1ヶ月以上更新のないブログに表示されています。新しい記事を書くことで広告を消せます。