这里先使用parted,它是一个调整分区的工具,不过现在使用它的显示功能,并不对硬盘做修改。p 代表print ,查看当前分区情况:


GNU Parted 2.1
Using /dev/sda
Welcome to GNU Parted! Type ‘help’ to view a list of commands.

(parted) p

Model: ATA ST31000528AS (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 211MB 210MB primary ext3 boot
2 211MB 2358MB 2147MB primary linux-swap(v1)
3 2358MB 1000GB 998GB primary

(parted) quit

可以发现sda3没有显示file system,说明未格式化,现使用mkfs.ext3来把sda3格式化

mkfs.ext3 /dev/sda3

mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
60907520 inodes, 243614264 blocks
12180713 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=4294967296
7435 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, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848

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

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


3 2358MB 1000GB 998GB primary ext3


mkdir /data
mount -v /dev/sda3 /data/


/dev/sda3               /data                   ext3    defaults        1 1


电子邮件地址不会被公开。 必填项已用*标注

This site uses Akismet to reduce spam. Learn how your comment data is processed.