Tuesday, January 22, 2013

Add 50 MB partition Linux

[root@rajcentos ~]# fdisk /dev/sde
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel. Changes will remain in memory only,
until you decide to write them. After that, of course, the previous
content won't be recoverable.

Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)

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

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

Calling ioctl() to re-read partition table.
Syncing disks.
[root@rajcentos ~]# mkfs -t ext3 /dev/sde1
mke2fs 1.35 (28-Feb-2004)
Filesystem label=
OS type: Linux
Block size=1024 (log=0)
Fragment size=1024 (log=0)
13104 inodes, 52208 blocks
2610 blocks (5.00%) reserved for the super user
First data block=1
Maximum filesystem blocks=53477376
7 block groups
8192 blocks per group, 8192 fragments per group
1872 inodes per group
Superblock backups stored on blocks:
        8193, 24577, 40961

Writing inode tables: done
Creating journal (4096 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.
[root@rajcentos ~]# fdisk -l /dev/sde1

Disk /dev/sde1: 53 MB, 53460992 bytes
64 heads, 32 sectors/track, 50 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes

No comments: