Disk /dev/hdb: 21.4 GB, 21474836480 bytes 16 heads, 63 sectors/track, 41610 cylinders Units = cylinders of 1008 * 512 = 516096 bytes
Disk /dev/hdb doesn't contain a valid partition table
[[email protected] ~]# fdisk /dev/hdb 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. The number of cylinders for this disk is set to 41610. 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) 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-41610, default 1): Using default value 1 Last cylinder or +size or +sizeM or +sizeK (1-41610, default 41610): Using default value 41610 Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks.now that we have made a partition on hard drive (hdb), we need to format it with a filesystem, we are going to use ext4
/sbin/mkfs /sbin/mkfs.ext2 /sbin/mkfs.msdos /sbin/mkfs.cramfs /sbin/mkfs.ext3 /sbin/mkfs.vfatso lets use ext3 then
[[email protected] sbin]# mkfs -t ext3 /dev/hdb mke2fs 1.39 (29-May-2006) /dev/hdb is entire device, not just one partition! Proceed anyway? (y,n) y Filesystem label= OS type: Linux Block size=4096 (log=2) Fragment size=4096 (log=2) 2621440 inodes, 5242880 blocks 262144 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=0 160 block groups 32768 blocks per group, 32768 fragments per group 16384 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 32 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.
to mount the new hard drive automatically at boot time, you can just put this in the fstab file so i use this commandslets make a backup of fstab first:
/dev/VolGroup00/LogVol00 / ext3 defaults,usrquota,grpquota 1 1 LABEL=/boot /boot ext3 defaults 1 2 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/VolGroup00/LogVol01 swap swap defaults 0 0now all you need to do is add this line at the end:
/dev/hdb /mnt/20g ext3 defaults 0 0save the changes and reboot. DONE now you can create a symbolic like if you want: