RedHat Linux磁盘空间不足 和 挂载新硬盘方法(2)

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

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

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

最后一个w是把分区信息写入磁盘并退出fdisk。

然后执行fdisk -l

[root@192.168.14.117:/dev]#fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id System
/dev/sda1   *           1          33      265041   83 Linux
/dev/sda2              34         294     2096482+ 82 Linux swap / Solaris
/dev/sda3             295        2610    18603270   83 Linux

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id System
/dev/sdb3               1        3916    31455238+ 83 Linux

Disk /dev/sdc: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id System
/dev/sdc1               1        2610    20964793+   5 Extended

得意忘形了一下,然后直接执行

mount /dev/sdc1 /datalog

就被泼了冷水

[root@192.168.14.117:/dev]#mount /dev/sdc1 /datalog
mount: you must specify the filesystem type
[root@192.168.14.117:/dev]#mount -t ext3 /dev/sdc1 /datalog
mount: wrong fs type, bad option, bad superblock on /dev/sdc1,
       missing codepage or other error
       (aren't you trying to mount an extended partition,
       instead of some logical partition inside?)
       In some cases useful info is found in syslog - try
       dmesg | tail or so

才想到创建了逻辑盘还没有创建逻辑分区呢,也没有创建文件系统,然后再执行一下:fdisk /dev/sdc

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

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

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

再查看一下

[root@192.168.14.117:/root]#fdisk -l

Disk /dev/sda: 21.4 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot      Start         End      Blocks   Id System
/dev/sda1   *           1          33      265041   83 Linux
/dev/sda2              34         294     2096482+ 82 Linux swap / Solaris
/dev/sda3             295        2610    18603270   83 Linux

Disk /dev/sdb: 32.2 GB, 32212254720 bytes
255 heads, 63 sectors/track, 3916 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/25832.html