My SCSI Data Drive

Hal Martin hal.martin at gmail.com
Thu Oct 9 00:43:38 UTC 2008


Rashkae wrote:
> James Gray wrote:
>   
>> On 06/10/2008, at 1:27 PM, Edgar Sarino wrote:
>>
>>     
>>> This is a follow-up request to an earlier inquiry.
>>>
>>> I have successfully mounted my 137 GB SCSI drive to Ubuntu 8.04 Desktop.
>>>       
>> Well done :)
>>
>>     
>>> How do I mount it permanently?  It seems to disappear after a logout
>>> and login.
>>>
>>> How do I save data to it?  (I assume that the temporary mounting is
>>> part of the problem.)
>>>       
>> You're probably correct about the saving data thing - not much use if it
>> doesn't mount at boot eh?  Here's how to fix it:
>>
>> 1. Open a terminal
>> 2. Type "gksudo gedit /etc/fstab" (without the "")
>> 3. You're now looking at the file system mounting configuration
>> (basically).  Add a line that looks like this:
>> /dev/sd??     /path/to/mount/point     ext3     defaults      0   2
>>     
You may want to use the drive UUID instead of a device name. I have 
found that on my computer with multiple hard drives running 8.04, the 
hard drive letters, sd[a-f], change with almost every restart. If you 
put the drive UUID in fstab, as opposed to the device name as it 
presently is, you'll never get burned on a restart.

You can find out the drive's UUID by restarting udev (if the machine has 
not been restarted since you mucked around with the partition table, or 
added the drive) and then doing an 'ls -l /dev/disk/by-uuid/' and 
matching the partition UUID with it's current letter & number.

8.04 uses UUIDs by default in grub.conf and fstab for this very reason. 
Unless you plan on writing a udev rule to keep the hard drive that 
letter, I find it's just easier to use UUIDs instead.
>> 4. Once you're done, save the file and exit.
>> 5. From the command line type "sudo mount -a" and you're done!
>>
>> Read below BEFORE doing the above steps.
>>
>> The columns (in order from left to right) in step #3 are:
>> <file system> - ie, the device (or network share) you want to mount
>> <mount point> - where you want the device to appear in the file tree
>> <type>        - the file system used on the device
>> <options>     - any option specific to the <type> being mounted
>> <dump>        - binary value to tell "dump" is a file sytem should be
>> dumped 1=yes, 0=no
>> <pass>        - tell "fsck" the order in which to check file systems,
>> the root (/) should ALWAYS be 1, and all other file systems should
>> ALWAYS begin at 2.
>>
>> So in your case, you might need to change the "ext3" to the correct file
>> system you formatted the drive with.  Similarly, you *WILL* need to
>> change the first two fields to match their correct values.  Other than
>> that, you can cut-and-paste that line as-is.
>>     
>
> Here's a common pitfall.  You need to make sure that your mount point
> already exists (as a directory)
>
> For example, you can sudo mkdir /data then mount the hard drive with
> /data as the mount point... (I use /home/data myself, but whatever works
> for you in this regard.)
>
> Second of all, assuming the hard drive is formatted with a Linux file
> system, once you mount the drive, you will probably find that it is
> owned by root and your regular user account does not have permission to
> write to it.  Assuming you want the whole drive to be accessible to you
> as a user, you will have to use the chown command on the drive after it
> is mounted... example
>
> chown -R username /data
>
>   
Just my 2 cents.
-Hal





More information about the ubuntu-users mailing list