root@AY14042516351017741bZ:~# fdisk -S 56 /dev/xvdb
WARNING: DOS-compatible mode is deprecated. It's strongly recommended to
switch off the mode (command 'c') and change display units to
sectors (command 'u').
Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
Partition 1 is already defined. Delete it before re-adding it.
Command (m for help): wq
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
root@AY14042516351017741bZ:~# mkfs.ext3 /dev/xvdb1
mke2fs 1.41.12 (17-May-2010)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
Stride=0 blocks, Stripe width=0 blocks
19680 inodes, 78512 blocks
3925 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=67371008
10 block groups
8192 blocks per group, 8192 fragments per group
1968 inodes per group
Superblock backups stored on blocks:
8193, 24577, 40961, 57345, 73729
Writing inode tables: done
Creating journal (4096 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 31 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
root@AY14042516351017741bZ:~# echo '/dev/xvdb1 /mnt ext3 defaults 0 0' >> /etc/fstab
root@AY14042516351017741bZ:~# cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# / was on /dev/xvda1 during installation
UUID=34e4b8c4-016a-4003-8b4d-92aeb3cdc3c5 / ext3 errors=remount-ro 0 1
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto 0 0
xenfs /proc/xen xenfs defaults 0 0
/dev/xvdb1 /mnt ext3 defaults 0 0
root@AY14042516351017741bZ:~# mount -a
root@AY14042516351017741bZ:~# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/xvda1 20G 1011M 19G 6% /
tmpfs 248M 0 248M 0% /lib/init/rw
udev 244M 116K 243M 1% /dev
tmpfs 248M 0 248M 0% /dev/shm
/dev/xvdb1 75M 5.6M 65M 8% /mnt
版权声明:本文内容由阿里云实名注册用户自发贡献,版权归原作者所有,阿里云开发者社区不拥有其著作权,亦不承担相应法律责任。具体规则请查看《阿里云开发者社区用户服务协议》和《阿里云开发者社区知识产权保护指引》。如果您发现本社区中有涉嫌抄袭的内容,填写侵权投诉表单进行举报,一经查实,本社区将立刻删除涉嫌侵权内容。