Thursday, July 10, 2008

Linux partition using fdisk

Linux partition using fdisk

1. fdisk -l => To check what type of Hard Disk i.e. Sata ( /dev/sda ) or Pata ( /dev/hda )
2. fdisk /dev/sda
3. Type n then Enter => For new Partition
4. Just press Enter => For 1st Cylinder
5. Type +size and press Enter => For Last Cylinder for Example +1000M. Size can be in terms of M or K
6. Type p => To print the partition
7. Type w => To save the new partition. It's save in the hard disk but kernel partition table not updated. (/dev/sda11 is created in my system , might be different in your system)
8. Type partprobe & Press Enter => To update the kernel.
9. mkfs.ext3 -b 2048 /dev/sda11 => Here b is the block & is \block size in bytes & /dev/sda11 is new partition has created
11. e2label /dev/sda11 data=> data is Label name
12. e2label /dev/sda11
13. mkdir /data => To mount the partition /dev/sda11 /data is a directory
14. mount /dev/sda11 /data
15. ls /data
To make this above mount point for /dev/sda11 permanent write entry in the /etc/fstab file by the following way :-

1.vi /etc/fstab
2. LABEL=data /data ext3 defaults 0 0

=> defaults means how will it be mount by which criteria rw,exec,acl etc. First 0 is for dump value i.e. Whether there will be automatic dumping or not means or off. Next 0 is fsck sequence value i.e. If there is any improperly shutdown occurs then the system again then which file it will check for consistency.0 means it doesn't check.

No comments:

SHOW ENGINE INNODB STATUS

  The SHOW ENGINE INNODB STATUS command in MySQL provides detailed information about the internal state of the InnoDB storage engine. This ...