[root@centos u01]# fdisk -l
Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdb1 * 1 25 200781 83 Linux
/dev/hdb2 26 2256 17920507+ 83 Linux
/dev/hdb3 2257 2868 4915890 83 Linux
/dev/hdb4 2869 4865 16040902+ 5 Extended
/dev/hdb5 2869 3442 4610623+ 83 Linux
/dev/hdb6 3443 3990 4401778+ 83 Linux
/dev/hdb7 3991 4353 2915766 82 Linux swap / Solaris
/dev/hdb8 4354 4608 2048256 83 Linux
/dev/hdb9 4609 4761 1228941 83 Linux
/dev/hdb10 4762 4863 819283+ 83 Linux
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3824 30716248+ c W95 FAT32 (LBA)
/dev/sda2 3825 7648 30716280 c W95 FAT32 (LBA)
/dev/sda3 7649 16317 69633742+ f W95 Ext'd (LBA)
/dev/sda5 7649 10453 22531131 b W95 FAT32
/dev/sda6 10454 13640 25599546 b W95 FAT32
/dev/sda7 13641 16317 21502971 b W95 FAT32
[root@centos u01]# fdisk /dev/sda
The number of cylinders for this disk is set to 19457.
There is nothing wrong with that, but this is larger than 1024,
and could in certain setups cause problems with:
1) software that runs at boot time (e.g., old versions of LILO)
2) booting and partitioning software from other OSs
(e.g., DOS FDISK, OS/2 FDISK)
Command (m for help): n
Command action
l logical (5 or over)
p primary partition (1-4)
p
Selected partition 4
First cylinder (16318-19457, default 16318):
Using default value 16318
Last cylinder or +size or +sizeM or +sizeK (16318-19457, default 19457):
Using default value 19457
Command (m for help): p
Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 3824 30716248+ c W95 FAT32 (LBA)
/dev/sda2 3825 7648 30716280 c W95 FAT32 (LBA)
/dev/sda3 7649 16317 69633742+ f W95 Ext'd (LBA)
/dev/sda4 16318 19457 25222050 83 Linux
/dev/sda5 7649 10453 22531131 b W95 FAT32
/dev/sda6 10454 13640 25599546 b W95 FAT32
/dev/sda7 13641 16317 21502971 b W95 FAT32
Command (m for help): w
The partition table has been altered!
Calling ioctl() to re-read partition table.
Syncing disks.
[root@centos u01]# partprobe
Warning: Unable to open /dev/hdc read-write (Read-only file system). /dev/hdc has been opened read-only.
[root@centos u01]# mkfs -t ext3 /dev/sda4
mke2fs 1.39 (29-May-2006)
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
3155936 inodes, 6305512 blocks
315275 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
193 block groups
32768 blocks per group, 32768 fragments per group
16352 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000
Writing inode tables: done
Creating journal (32768 blocks): done
Writing superblocks and filesystem accounting information: done
This filesystem will be automatically checked every 27 mounts or
180 days, whichever comes first. Use tune2fs -c or -i to override.
[root@centos u01]# e2label /dev/sda4 /u01
[root@centos u01]# cat /etc/fstab
LABEL=/u01 /u01 ext3 defaults 1 2
[root@centos ~]# mount /dev/sda4 /u01