歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Linux 空閒空間的格式化與加載

Linux 空閒空間的格式化與加載

日期:2017/2/28 16:15:14   编辑:Linux教程

本人有塊SCSI硬盤,安裝Linux AS4 時沒有分區,安裝好了系統後想把這塊空閒分區使用上,以下是詳細的操作步驟

一、使用linux as4的硬件查看工具查看未使用的硬盤空間。

二、使用fdisk對空閒分區分區。

[[email protected] root]# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.

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/sda: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 2356 18820147+ 83 Linux

/dev/sda3 2357 2610 2040255 82 Linux swap

Command (m for help): n

Command action

e extended

p primary partition (1-4)

e

Selected partition 4

First cylinder (2611-5221, default 2611):

[[email protected] root]# fdisk /dev/sda

The number of cylinders for this disk is set to 5221.

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

Selected partition 4

First cylinder (2611-5221, default 2611): 2611

Last cylinder or +size or +sizeM or +sizeK (2611-5221, default 5221): 5221

Command (m for help): p

Disk /dev/sda: 42.9 GB, 42949672960 bytes

255 heads, 63 sectors/track, 5221 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System

/dev/sda1 * 1 13 104391 83 Linux

/dev/sda2 14 2356 18820147+ 83 Linux

/dev/sda3 2357 2610 2040255 82 Linux swap

/dev/sda4 2611 5221 20972857+ 83 Linux

Command (m for help): w

The partition table has been altered!

Calling ioctl() to re-read partition table.

WARNING: Re-reading the partition table failed with error 16: Device or resource busy.

The kernel still uses the old table.

The new table will be used at the next reboot.

Syncing disks.

Copyright © Linux教程網 All Rights Reserved