linux下線上擴大擴充套件分割槽的方法

xintop發表於2009-03-10

下面是我在linux下擴大檔案系統的的詳細步驟,說明懶得寫了,以後有時間再填一下吧,呵呵

Command (m for help): p

Disk c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux
c0d0p2 26 25725 104856000 f W95 Ext'd (LBA)
Partition 2 does not end on cylinder boundary.
c0d0p5 26 25725 104855984 8e Linux LVM


me

[root@kmdb02 cciss]# fdisk c0d0

The number of cylinders for this disk is set to 105398.
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 c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux
c0d0p2 26 25725 104856000 f W95 Ext'd (LBA)
Partition 2 does not end on cylinder boundary.
c0d0p5 26 25725 104855984 8e Linux LVM

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

Command (m for help): p

Disk c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux

Command (m for help): m
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

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

Command (m for help): p

Disk c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux
c0d0p2 26 105398 429921840 5 Extended

Command (m for help): t
Partition number (1-5): 2
Hex code (type L to list codes): f
Changed system type of partition 2 to f (W95 Ext'd (LBA))

Command (m for help): p

Disk c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux
c0d0p2 26 105398 429921840 f W95 Ext'd (LBA)

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

Command (m for help): p

Disk c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux
c0d0p2 26 105398 429921840 f W95 Ext'd (LBA)
c0d0p5 26 25725 104855984 83 Linux

Command (m for help): t
Partition number (1-5): 5
Hex code (type L to list codes): 8e
Changed system type of partition 5 to 8e (Linux LVM)

Command (m for help): p

Disk c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux
c0d0p2 26 105398 429921840 f W95 Ext'd (LBA)
c0d0p5 26 25725 104855984 8e Linux LVM

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: 裝置或資源忙.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks.
[root@kmdb02 cciss]# fdisk c0d0

The number of cylinders for this disk is set to 105398.
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 c0d0: 440.3 GB, 440346238976 bytes
255 heads, 32 sectors/track, 105398 cylinders
Units = cylinders of 8160 * 512 = 4177920 bytes

Device Boot Start End Blocks Id System
c0d0p1 * 1 25 101984 83 Linux
c0d0p2 26 105398 429921840 f W95 Ext'd (LBA)
c0d0p5 26 25725 104855984 8e Linux LVM

Command (m for help): reboot
r: unknown command
Command action
a toggle a bootable flag
b edit bsd disklabel
c toggle the dos compatibility flag
d delete a partition
l list known partition types
m print this menu
n add a new partition
o create a new empty DOS partition table
p print the partition table
q quit without saving changes
s create a new empty Sun disklabel
t change a partition's system id
u change display/entry units
v verify the partition table
w write table to disk and exit
x extra functionality (experts only)

Command (m for help): q

[root@kmdb02 cciss]# reboot

Broadcast message from root (pts/1) (Tue Mar 10 11:13:34 2009):

The system is going down for reboot NOW!
[root@kmdb02 cciss]#

[@more@]

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/185751/viewspace-1018393/,如需轉載,請註明出處,否則將追究法律責任。

相關文章