9 [root@localhost ~]# df -h 10 Filesystem Size Used Avail Use% Mounted on 11 /dev/xvda2 36G 2.3G 32G 7% / 12 tmpfs 15G 0 15G 0% /dev/shm 13 [root@localhost ~]# fdisk -l 14 15 Disk /dev/xvda: 42.9 GB, 42949672960 bytes 16 255 heads, 63 sectors/track, 5221 cylinders 17 Units = cylinders of 16065 * 512 = 8225280 bytes 18 Sector size (logical/physical): 512 bytes / 512 bytes 19 I/O size (minimum/optimal): 512 bytes / 512 bytes 20 Disk identifier: 0x00014faa 21 22 Device Boot Start End Blocks Id System 23 /dev/xvda1 1 523 4194304 82 Linux swap / Solaris 24 Partition 1 does not end on cylinder boundary. 25 /dev/xvda2 * 523 5222 37747712 83 Linux 26 27 Disk /dev/xvde: 493.9 GB, 493921239040 bytes 28 255 heads, 63 sectors/track, 60049 cylinders 29 Units = cylinders of 16065 * 512 = 8225280 bytes 30 Sector size (logical/physical): 512 bytes / 512 bytes 31 I/O size (minimum/optimal): 512 bytes / 512 bytes 32 Disk identifier: 0x00000000 33 34 [root@localhost ~]# fdisk /dev/xvde 35 Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel 36 Building a new DOS disklabel with disk identifier 0xb28f7207. 37 Changes will remain in memory only, until you decide to write them. 38 After that, of course, the previous content won't be recoverable. 39 40 Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite) 41 42 WARNING: DOS-compatible mode is deprecated. It's strongly recommended to 43 switch off the mode (command 'c') and change display units to 44 sectors (command 'u'). 45 46 Command (m for help): p^H 47 48 Disk /dev/xvde: 493.9 GB, 493921239040 bytes 49 255 heads, 63 sectors/track, 60049 cylinders 50 Units = cylinders of 16065 * 512 = 8225280 bytes 51 Sector size (logical/physical): 512 bytes / 512 bytes 52 I/O size (minimum/optimal): 512 bytes / 512 bytes 53 Disk identifier: 0xb28f7207 54 55 Device Boot Start End Blocks Id System 56 57 Command (m for help): m 58 Command action 59 a toggle a bootable flag 60 b edit bsd disklabel 61 c toggle the dos compatibility flag 62 d delete a partition 63 l list known partition types 64 m print this menu 65 n add a new partition 66 o create a new empty DOS partition table 67 p print the partition table 68 q quit without saving changes 69 s create a new empty Sun disklabel 70 t change a partition's system id 71 u change display/entry units 72 v verify the partition table 73 w write table to disk and exit 74 x extra functionality (experts only) 75 76 Command (m for help): n 77 Command action 78 e extended 79 p primary partition (1-4) 80 p 81 Partition number (1-4): 1 82 First cylinder (1-60049, default 1): 83 Using default value 1 84 Last cylinder, +cylinders or +size{K,M,G} (1-60049, default 60049): 85 Using default value 60049 86 87 Command (m for help): w 88 The partition table has been altered! 89 90 Calling ioctl() to re-read partition table. 91 Syncing disks. 92 [root@localhost ~]# partprobe 93 Warning: WARNING: the kernel failed to re-read the partition table on /dev/xvda (Device or resource busy). As a result, it may not reflect all of your changes until after reboot. 94 Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0 has been opened read-only. 95 [root@localhost ~]# fdisk -l 96 97 Disk /dev/xvda: 42.9 GB, 42949672960 bytes 98 255 heads, 63 sectors/track, 5221 cylinders 99 Units = cylinders of 16065 * 512 = 8225280 bytes 100 Sector size (logical/physical): 512 bytes / 512 bytes 101 I/O size (minimum/optimal): 512 bytes / 512 bytes 102 Disk identifier: 0x00014faa 103 104 Device Boot Start End Blocks Id System 105 /dev/xvda1 1 523 4194304 82 Linux swap / Solaris 106 Partition 1 does not end on cylinder boundary. 107 /dev/xvda2 * 523 5222 37747712 83 Linux 108 109 Disk /dev/xvde: 493.9 GB, 493921239040 bytes 110 255 heads, 63 sectors/track, 60049 cylinders 111 Units = cylinders of 16065 * 512 = 8225280 bytes 112 Sector size (logical/physical): 512 bytes / 512 bytes 113 I/O size (minimum/optimal): 512 bytes / 512 bytes 114 Disk identifier: 0xb28f7207 115 116 Device Boot Start End Blocks Id System 117 /dev/xvde1 1 60049 482343561 83 Linux 118 [root@localhost ~]# mkfs.ext3 /dev/xvde1 119 mke2fs 1.41.12 (17-May-2010) 120 Filesystem label= 121 OS type: Linux 122 Block size=4096 (log=2) 123 Fragment size=4096 (log=2) 124 Stride=0 blocks, Stripe width=0 blocks 125 30146560 inodes, 120585890 blocks 126 6029294 blocks (5.00%) reserved for the super user 127 First data block=0 128 Maximum filesystem blocks=4294967296 129 3680 block groups 130 32768 blocks per group, 32768 fragments per group 131 8192 inodes per group 132 Superblock backups stored on blocks: 133 32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208, 134 4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968, 135 102400000 136 137 Writing inode tables: done 138 Creating journal (32768 blocks): done 139 Writing superblocks and filesystem accounting information: done 140 141 This filesystem will be automatically checked every 25 mounts or 142 180 days, whichever comes first. Use tune2fs -c or -i to override. 143 [root@localhost ~]# fdisk -l 144 145 Disk /dev/xvda: 42.9 GB, 42949672960 bytes 146 255 heads, 63 sectors/track, 5221 cylinders 147 Units = cylinders of 16065 * 512 = 8225280 bytes 148 Sector size (logical/physical): 512 bytes / 512 bytes 149 I/O size (minimum/optimal): 512 bytes / 512 bytes 150 Disk identifier: 0x00014faa 151 152 Device Boot Start End Blocks Id System 153 /dev/xvda1 1 523 4194304 82 Linux swap / Solaris 154 Partition 1 does not end on cylinder boundary. 155 /dev/xvda2 * 523 5222 37747712 83 Linux 156 157 Disk /dev/xvde: 493.9 GB, 493921239040 bytes 158 255 heads, 63 sectors/track, 60049 cylinders 159 Units = cylinders of 16065 * 512 = 8225280 bytes 160 Sector size (logical/physical): 512 bytes / 512 bytes 161 I/O size (minimum/optimal): 512 bytes / 512 bytes 162 Disk identifier: 0xb28f7207 163 164 Device Boot Start End Blocks Id System 165 /dev/xvde1 1 60049 482343561 83 Linux 166 [root@localhost ~]# vim /etc/fstab 167 [root@localhost ~]# cat /etc/fstab 168 169 # 170 # /etc/fstab 171 # Created by anaconda on Tue Mar 26 14:54:14 2013 172 # 173 # Accessible filesystems, by reference, are maintained under '/dev/disk' 174 # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info 175 # 176 UUID=5056bbc2-cf00-4f7c-95e1-35be323fc523 / ext3 defaults 1 1 177 UUID=c2a7b4a1-c806-46e5-a97d-b9a964fc9e05 swap swap defaults 0 0 178 tmpfs /dev/shm tmpfs defaults 0 0 179 devpts /dev/pts devpts gid=5,mode=620 0 0 180 sysfs /sys sysfs defaults 0 0 181 proc /proc proc defaults 0 0 182 /dev/xvde1 /opt/ ext3 defaults 0 0 183 [root@localhost ~]# mount -a 184 [root@localhost ~]# df -h 185 Filesystem Size Used Avail Use% Mounted on 186 /dev/xvda2 36G 2.3G 32G 7% / 187 tmpfs 15G 0 15G 0% /dev/shm 188 /dev/xvde1 453G 199M 430G 1% /opt