Creating and Mounting File systems

Create new file system by using following command:
  • use fdisk -l to locate information about the partition sizes on /dev/hda use this information to calculate the amount of unpartitioned space on the hard drive.
  • Now use fdisk to add a new logical partition that is 1024MB in size. (Make sure to write the changes to disk using the 'w' command). 
  • To make new partition active reboot the system.
  • using mkfs.ext3 make a new ext3 file system on the new logical partition you just created. 
  • Create the directory /temporary which will be mount point for the new file system.
  • Use the mount command to munt the new file system on /temporary. Copy /etc/passwd into /temporary and verify that the copy was successful.
  • Umount /data.
  • Add a label to the new partition using e2label;
   e2label  /dev/hdaX   /temporary (where X is the number of the    newly created partition)
   You can check the labels of this and any other partitions with 

   e2label as well, by specifying the partition as the only
   argument.
  • Add a line to /etc/fstab to mount the new file system on /temporary. Add the following line to use the label you just created;
     LABEL=/temporary     /temporary  ext3 defaults 1 2
   
    You could use the following line instead;
     /dev/hdaX    /temporary   ext 3   defaults 1 2
   Both lines produce the same results in this instance. However,
   if you were to move the IDE drive to another channel or make it
   the slave instead of the master, using th elabel in /etc/fstab
   would enable the system to locate the partition and mount it
   regardless of its device designation.
  • Mount the new file system;
      Mount     /temporary
  • Copy some files into this new file system 
  • Now check the files in new partiton..
 

0 comments:

Post a Comment