You need to run these steps as root.
1. Run 'fdisk
Example:
# fdisk /dev/sdbIf you're creating a new partition in the first SATA/SCSI disk, the device name will be /dev/sda, if it's a second SATA/SCSI disk, it'll be /dev/sdb and so on. If the device is the first master IDE disk, it'll be /dev/hda and so on.
2. Choose n to add a new partition.
3. Choose e for extended or p for primary.
4. Accept the default values for first and last cylinder if you wish to partition the whole disk.
5. Choose w to write the table to disk.
If suppose you've created the first partition in the second SATA/SCSI disk, you should be able to see that /dev/sdb1 has been created in your file system.
6. The next step is to create a file system on that partition. The command is 'mkfs -t
Example:
# mkfs -t ext4 /dev/sdb1The
7. The last step is to mount this partition. To do that, execute 'mount -t
Example:
# mkdir -p /mnt/newdisk # mount -t ext4 /mnt/newdiskTo see if your partition has been mounted successfully. Run 'mount' or 'cat /etc/mtab'.
To mount it permanently, you need to create a new entry in the /etc/fstab as shown below.
/dev/sdb1 /mnt/newdisk ext4 acl,user_xattr 1 2The value last second option 1 specifies whether or not the file system should be dumped. 1 means dump. 0 means don't dump.
The value last option 2 specifies the order in which fsck should check the file system at reboot. For root partition, it should be 1, other partitions should be 2.
No comments:
Post a Comment