hdd増設メモ

トップUnixhdd増設

hdd増設

hdd増設メモ

1.dmesgの確認(sciiの2台目ならば、/dev/sdbのはずなので(ideならば/dev/hdb)
dmesg|grep sdb
[ 4.204204] sd 0:0:1:0: [sdb] 8388608 512-byte hardware sectors (4295 MB)
[ 4.204258] sd 0:0:1:0: [sdb] Write Protect is off
[ 4.204271] sd 0:0:1:0: [sdb] Mode Sense: 5d 00 00 00
[ 4.204325] sd 0:0:1:0: [sdb] Cache data unavailable
[ 4.204335] sd 0:0:1:0: [sdb] Assuming drive cache: write through
[ 4.204389] sd 0:0:1:0: [sdb] 8388608 512-byte hardware sectors (4295 MB)
[ 4.204443] sd 0:0:1:0: [sdb] Write Protect is off
[ 4.204455] sd 0:0:1:0: [sdb] Mode Sense: 5d 00 00 00
[ 4.204509] sd 0:0:1:0: [sdb] Cache data unavailable
[ 4.204518] sd 0:0:1:0: [sdb] Assuming drive cache: write through
[ 4.204572] sdb: unknown partition table
[ 4.205520] sd 0:0:1:0: [sdb] Attached SCSI disk

2.パーティション
fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0x7dfba1fa.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

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

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

Calling ioctl() to re-read partition table.
Syncing disks.



3.フォーマット
mkfs.ext3 /dev/sdb1
mke2fs 1.41.3 (12-Oct-2008)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
262144 inodes, 1048233 blocks
52411 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736

Writing inode tables: done
Creating journal (16384 blocks): done
Writing superblocks and filesystem accounting information: done

This filesystem will be automatically checked every 21 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.


4.マウント
適当にフォルダを作成し、mkdir /data

/etc/fstabに以下のようなエントリを追加
/dev/sdb1 /data ext3 defaults 0 1

とりあえずマウントコマンド発行
mount /data
# df
Filesystem 1K-ブロック 使用 使用可 使用% マウント位置
/dev/sda1 3889892 1522732 2169564 42% /
tmpfs 95688 0 95688 0% /lib/init/rw
udev 10240 88 10152 1% /dev
tmpfs 95688 0 95688 0% /dev/shm
/dev/sdb1 4127076 73788 3843644 2% /data

/dataがマウントされていたら成功です。




カテゴリ内の記事