Hi! I am
Rohit.
This time I am going to teach you how to create a partition and mount with a file system Xfs. I am doing it in a virtual machine. The block name might be different in your systems. You can use 'lsblk' command to list block devices. I have vda and vdb, but vda is partitioned and mounted. So I am using vdb. Okay now let's start!
1 Open the terminal. Type fdisk /dev/vdb. Now a prompt will appear and type n for a new partition. Enter p or press
the enter button in the keyboard. Type 1
or press enter. Then type the first sector you want to start from or press
enter (if you don’t know what is first sector just press enter). Next type the size you want your partition to
be, like this +5G. The format to
write this is +number G, M or K.
This time I am going to teach you how to create a partition and mount with a file system Xfs. I am doing it in a virtual machine. The block name might be different in your systems. You can use 'lsblk' command to list block devices. I have vda and vdb, but vda is partitioned and mounted. So I am using vdb. Okay now let's start!
1 2 Type w so that the partition table will be altered! Then type partprobe
/dev/vdb.
3 Type mkfs –t xfs /dev/vdb1 to make a file system.
4 Now
make a directory in mnt to mount it
with the partition.
5 Copy the UUID of the partition and type vim /etc/fstab to edit the file.
6 Move
the cursor to the first UUID shown
here and press o to insert and paste
the UUID of the partition you
created. Keep a space and enter the directory you are going to mount, that is /mnt/Rohit for me. Keep a space and now
type xfs which is our partition
type. Keep a space and type defaults. Put a space and type a 0 then put a space and type again a 0. So that it wouldn’t take much time
to boot. Press Esc button. Type :wq! to save(it will appear down).
7 Type mount /dev/vdb1 /mnt/Rohit to mount the
partition to /mnt/Rohit. Now type df –Th to check if it is successfully mounted.
Hope
you understood. If there are any doubts please comment and if you liked this
please share. Bye for now.




Comments
Post a Comment