Monday, March 2, 2009

Fedora 10: Mount Logical Drives editing fstab

There are two ways to mount Logical Drives in linux, editing /etc/fstab
Using Device's file system path

Using Device's UUID


For example we will mount a unmounted LVM device which has no label yet. Let's assume that our device's system path is /dev/sda5


Structure of /etc/fstab file:
# [file system] [mount point] [type] [options] [dump] [pass]

Using Device's file system path

This is the most commonly used way to permanently mount a device.

Step 1: Open the fstab file, I have used vim. you can use yours.
vim /etc/fstab
Step 2: Put the following line there.
/dev/sda5/ /billah ext3 default 0 1
Where,
file system = /dev/sda5/
mount point = /billah
type = ext3
options = default
dump = 0
pass = 1

Now save and restart your PC

Using Device's UUID:
When you are using more than one hard drive in your PC, then most often device's file system path in fstab wont work. Then UUID, that means Universal Uniqe Identifier.

Step 1: Determinig UUID
ls -l /dev/disk/by-uuid/
which will result like following
lrwxrwxrwx 1 root root 10 2009-03-02 20:25 0499e06a-05cb-4272-ac37-7308eb7d7326 -> ../../sda5
Here the UUID of sda5 is
0499e06a-05cb-4272-ac37-7308eb7d7326
Step 2: Edit the /etc/fstab
0499e06a-05cb-4272-ac37-7308eb7d7326 /billah ext3 default 0 1
Now, restart your PC, thats all.



No comments:

Post a Comment