Установка в centos нового hdd

Стучатся тут типо проверяй место на серваке. Винты поставили в рейде. ну в рот чах пых

# fdisk -l

Disk /dev/sda: 145.9 GB, 145999527936 bytes
255 heads, 63 sectors/track, 17750 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       17227   138375846   83  Linux
/dev/sda2           17228       17749     4192965   82  Linux swap / Solaris

Disk /dev/sdb: 298.9 GB, 298999349248 bytes
255 heads, 63 sectors/track, 36351 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

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

Буэ дела ну попрели, накидываем на винт партицию

fdisk /dev/sdb
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

The number of cylinders for this disk is set to 36351.
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)
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-36351, default 1):
Using default value 1
Last cylinder or +size or +sizeM or +sizeK (1-36351, default 36351):
Using default value 36351

накинули и пишем на винт

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

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

готово

fdisk -l

Disk /dev/sda: 145.9 GB, 145999527936 bytes
255 heads, 63 sectors/track, 17750 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       17227   138375846   83  Linux
/dev/sda2           17228       17749     4192965   82  Linux swap / Solaris

Disk /dev/sdb: 298.9 GB, 298999349248 bytes
255 heads, 63 sectors/track, 36351 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       36351   291989376   83  Linux

форматаем

 mkfs.ext3 /dev/sdb1
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
36503552 inodes, 72997344 blocks
3649867 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
2228 block groups
32768 blocks per group, 32768 fragments per group
16384 inodes per group
Superblock backups stored on blocks:
        32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
        4096000, 7962624, 11239424, 20480000, 23887872, 71663616

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

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

Идем далее монтируем:

# cd media
# ls -la
total 16
drwxr-xr-x  2 root root 4096 Jan 27  2010 .
drwxr-xr-x 24 root root 4096 Sep 14 19:03 ..
# mkdir hdd300raid
# ls
hdd300raid
# mount /dev/sdb1 /media/hdd300raid
# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda1             128G  1.8G  120G   2% /
tmpfs                 2.0G     0  2.0G   0% /dev/shm
/dev/sdb1             275G  192M  260G   1% /media/hdd300raid

В ожуре. Проверяем.

# fsck /dev/sdb1
fsck 1.39 (29-May-2006)
e2fsck 1.39 (29-May-2006)
/dev/sdb1 is mounted.

WARNING!!!  Running e2fsck on a mounted filesystem may cause
SEVERE filesystem damage.

Do you really want to continue (y/n)? yes

/dev/sdb1: recovering journal

/dev/sdb1: clean, 11/36503552 files, 1194400/72997344 blocks

Закидываем в систему

# nano /etc/fstab
/dev/sdb1               /media/hdd300raid       ext3    defaults        0 0

Вот и все хамно начальника. еще бы денег заплотили за это)

Вам также может понравиться

About the Author: Тупой прогер

Добавить комментарий

Ваш e-mail не будет опубликован. Обязательные поля помечены *

Этот сайт использует Akismet для борьбы со спамом. Узнайте как обрабатываются ваши данные комментариев.