What's new

Force drive to mount to specfic mountpoint

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

sabot105mm

Regular Contributor
my drive keeps changing mount points from ada2 to adb2 etc how do i force it to mount to a fixed mount point
 
Give it a name.
 
If you want to label the disk, use this command

tune2fs -L "desired_label" /dev/sda1

To delete the label

tune2fs -L "" /dev/sda1

In both cases you have to reboot or replug the disk to see changes
 
Give it a name.

Another way is to work with the ID of the disk/partition.

In order to know what the IDs are, simply do the command blkid at the terminal prompt.

After that you can mount your disk/partition using the UUID.

A good explanation here: http://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/
or http://centoscert.com/content/how-mount-drive-uuid

Code:
host # mount -U a1331d73-d640-4bac-97b4-cf33a375ae5b /directory/you/mount/this/disk/on

and you could instruct your system to mount this partition by UUID from within the fstab, as well. It works basically the same way that the LABEL keyword does:


host # cat /etc/fstab
...
UUID=a1331d73-d640-4bac-97b4-cf33a375ae5b /directory/you/mount/this/disk/on ext3fs defaults 1 1
 

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top