Re: Which device assigned to removable media

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 05/04/2010 11:37 AM, roland wrote:
> On Tue, 04 May 2010 16:26:42 +0200, Jerry Feldman <gaf@xxxxxxx> wrote:
>
>   
>> On 05/03/2010 06:28 PM, g wrote:
>>     
>>> Geoffrey Leach wrote:
>>> <snip>
>>>
>>>
>>>       
>>>> My original post was somewhat unclear. The question was which device is
>>>> assigned to the disk when it's plugged in so I can know which device to
>>>> mount.
>>>>
>>>> It appears that if I look at /dev/disk/by-label, the device name --
>>>> Sansa\x20e250 for example, is a symbolic link to the device -- ../../
>>>> sdb1 for example. I can then mount /dev/sdb1.
>>>>
>>>>         
>>> so what happens when you use commands 'df' or 'mount'?
>>>
>>> i do not have an eSATA drive to check with, but i do know that when plug
>>> in a usb memory stick, i get following.
>>>
>>> +++
>>> $ mount|grep /dev|sort
>>> /dev/hda1 on / type ext3 (rw)
>>> /dev/hda3 on /home type ext3 (rw)
>>> /dev/hdb6 on /hd/b/06 type ext3 (rw)
>>> devpts on /dev/pts type devpts (rw,gid=5,mode=620)
>>> /dev/sde on /media/disk type vfat
>>> (rw,noexec,nosuid,nodev,noatime,uid=500,utf8,shortname=lower)
>>> tmpfs on /dev/shm type tmpfs (rw)
>>>
>>> $ df|sort
>>> /dev/hda1              8076508   3842888   3816736  51% /
>>> /dev/hda3             10721904   6261968   3906500  62% /home
>>> /dev/hdb6              4814936    140776   4429572   4% /hd/b/06
>>> /dev/sde                254218      3208    251010   2% /media/disk
>>> Filesystem           1K-blocks      Used Available Use% Mounted on
>>> tmpfs                   192676         0    192676   0% /dev/shm
>>> +++
>>>
>>>
>>> therefore, i tend to presume that if you set up your eSATA drive in
>>> '/etc/fstab' for auto mount and connected it, then 'mount' and 'df'
>>> should show you your eSATA drive.
>>>
>>> as i said, i do not have a eSATA to try and i may be wrong.
>>>
>>> [and yes, i am not currently under f12. having too many problems with
>>> kde at this time.]
>>>
>>>
>>>       
>> As Geoff said previously, if you use /dev/disk/by-label in fstab, then
>> it does not matter where the disk is inserted in relation to the other
>> drives. Since eSata drives may be hot pluggable, this is the best option
>> as the physical device (/dev/sdx) may change. Additionally, the newer
>> Linux releases now use the SCSI designation, even for IDE drives so you
>> should not see and /dev/hdx designations any longer.
>>
>>     
> I you plug in a new device why don't you do:
> dmesg |tail
>
>
>   
This does not address the OP's issue. You need to have a persistent
method if you want to place that device into fstab. Take the
hypothetical case of a drive used for backups. Assume that you have a
/backups directory and you want that drive always to be mounted on
/backup. Or lets say you are rotating drives. By using the drive's label
you will always get things done correctly. Certainly dmesg will tell you
the scsi id, and where rdev decided to mount it. But another example.
Let's say I shutdown my system, remove all my drives because I want to
vacuum out the dust or for some other reason, but insert the drives in a
different order, when I reboot, my system will boot from the correct
drive because that is the drive specified in grub.conf, and will mount
the other drives properly. As an example:
UUID=5ad225ca-c0a3-4654-bd8b-3354c99b0bd8 /.snapshots            
ext4    defaults        1 2
UUID=e4f00e44-5803-4602-b3cf-8f4f3dcbcd17 /boot                  
ext4    defaults        1 2

In this case my backup volume will always be mounted on /.snapshots and
my boot drive on /boot. Everything else on my system is LVM.

-- 
Jerry Feldman <gaf@xxxxxxx>
Boston Linux and Unix
PGP key id: 537C5846
PGP Key fingerprint: 3D1B 8377 A3C0 A5F2 ECBB  CA3B 4607 4319 537C 5846


Attachment: signature.asc
Description: OpenPGP digital signature

-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux