Wednesday, July 31, 2013

Interview Questions for Linux Administrator                                             Linux Commands & Tools 

There are many devices or mount points mounted on system. But sometimes, we need to mount these mount points by unique ID. This case generally happens in network because in same network, might have same name mount points on different disks. To avoid this conflict, we will mount the mount points by their block ID which is always unique.

Before doing entry in /etc/fstab file, we need to find block ID of that file. We will do it by following commands as follows:

root@hello:~/myhome/test# blkid /dev/sda1
/dev/sda1: UUID="s91ed12-d675-46bf-a42f-07fgc2313505" TYPE="ext3"
root@hello:~/myhome/test#
root@hello:~/myhome/test# blkid /dev/sda3
/dev/sda3: UUID="k4161839-0b4d-45aa-b4d5-49c76g989628" TYPE="ext3"
root@hello:~/myhome/test#


As per above example, block id will show for only created partitions and we need to provide one parameter for this command and that is partition name.

After this, we can mount file system or partition on operating system with this block ID. It is permanent block id for this partition and it will never change. For each physical partition, there is unique block id for it.
Example of /etc/fstab file configuration by UUID.

# swap was on /dev/sda5 during installation
UUID=72c7301e-239b-44a0-9ccd-41693680d91c none            swap    sw              0       0


If you see in above example, we have used UUID for that device not device or partition name while mounting it in /etc/fstab file.

This method i.e. mounting by block ID is not useful for single home desktop because we will not enterprise grade storage or requirements. 

Chkconfig command in Linux                                                                                   Basic Uses of tar command
Posted by Machindra Dharmadhikari On 7/31/2013 11:48:00 PM No comments

0 comments:

Post a Comment

  • RSS
  • Delicious
  • Digg
  • Facebook
  • Twitter
  • Linkedin
  • Youtube

    Chitika Ads 2

    Histat

    About

    Enter your email address:

    Delivered by FeedBurner