Home > linux基础 > mkfs磁盘格式化

mkfs磁盘格式化

[[email protected] /]# mkfs -t ext3 /dev/xvdc
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
262144 inodes, 1048576 blocks
52428 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1073741824
32 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

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

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

在linode管理后台将磁盘留出一定的空间,然后添加一个分区2,然后在系统profiles里将分区2和/dev/xvdc对应,然后reboot,再通过fdisk -l看磁盘分区情况,现在有3个分区了:/dev/xvda,/dev/xvdb,/dev/xvdc。此时如果我想通过手动格式化下/dev/xvdc,只需mkfs -t ext3 /dev/xvdc即可。如果想将/dev/xvdc格式化成vfat格式,只需mkfs -t vfat /dev/xvdc即可,以下是我格式化/dev/xvdc后并将其挂载在/backup目录下,mount /dev/xvdc /bakcup。

[[email protected] /]# df -aT
Filesystem    Type   1K-blocks      Used Available Use% Mounted on
/dev/xvda     ext3    15997408    584224  14599352   4% /
/proc         proc           0         0         0   –  /proc
sysfs        sysfs           0         0         0   –  /sys
devpts      devpts           0         0         0   –  /dev/pts
tmpfs        tmpfs      254252       112    254140   1% /dev/shm
none   binfmt_misc           0         0         0   –  /proc/sys/fs/binfmt_misc
/dev/xvdc     vfat     4186104         4   4186100   1% /backup


若非注明,本博客内容均为原创或翻译自Linode Library,教程默认Centos为linux发行版,转载请注明转自linode中文教程www.linode.im。linode中文教程QQ群:185393826,一起讨论linode及linux,linode中文教程、linode代购、linode合租、linode推介、linode返佣、linode优惠。日本VPS、美国VPS、海外独立服务器代购均在linode.im。

Categories: linux基础 Tags: , ,
  1. No comments yet.
  1. No trackbacks yet.