How to set up NFS server and client on CentOS 7

Question: I would like to share a directory via NFS between CentOS 7 hosts. What is the procedure for configuring NFS server and client, and enabling NFS mounts between them in CentOS 7 environment? NFS is a distributed file system protocol built on top of Sun’s RPC (remote procedure call). NFS is popularly used to […]
Continue reading…

 

How to mount qcow2 disk image on Linux

Question: I have a qcow2-type disk image which is used by one my guest VMs on QEMU/KVM. I want to modify the content of the disk image without powering on the VM, and for this I need to mount the disk image somewhere. Is there a way to mount a qcow2 disk image on Linux? […]
Continue reading…

 

How to mount an LVM partition on Linux

Question: I have an external USB drive which contains several LVM partitions on it. I want to access some of those LVM partitions on my Linux. How can I mount an LVM partition on Linux? LVM is a logical volume management tool which allows you to manage disk space using the notion of logical volumes […]
Continue reading…

 

How to create and mount an XFS file system on Linux

Question: I heard good things about XFS, and would like to create an XFS file system on my disk partition. What are the Linux commands to format and mount an XFS file system? XFS is a high-performance file system which was designed by SGI for their IRIX platform. Since XFS was ported to the Linux […]
Continue reading…

 

How to find the device name of a USB drive on Linux

Question: I need to know the device name (e.g., /dev/sdb) assigned to my USB flash drive after I plug the drive into my Linux system. Is there an easy way to identify the device name of a USB drive on Linux? To find out the device name assigned to a USB drive or USB stick, […]
Continue reading…

 

How to regenerate /etc/mtab file on Linux

Question: I accidentally messed up (or removed) /etc/mtab file. How can I recreate the original /etc/mtab file which reflects the current mount information? In case /etc/mtab file is lost or corrupted by accident, and you want to recover the original /etc/mtab file, you can use /proc/mounts, which shows an up-to-date list of all mounts currently […]
Continue reading…

 

How to remount filesystem as read-write in Ubuntu recovery mode

Question: I booted Ubuntu into recovery mode to fix a configuration file, but I noticed that the root filesystem is mounted as read-only. How can I remount a filesystem as “read-write” in Ubuntu recovery mode? When you enter a recovery mode in Ubuntu, the root filesystem gets mounted as “ready-only” by default, not allowing you […]
Continue reading…