Latest LQ Deal: Latest LQ Deals
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 12-31-2015, 11:48 PM   #1
LQ Newbie
Registered: Dec 2010
Distribution: CentOS, Mint
Posts: 2

Rep: Reputation: 0
Mount point suddenly change

I work on a government department with radar system
in the back end, we use linux with 3 different machines.

each linux system connect each other with NFS mount point,
we use Centos 5,ubuntu 10.04 and ubuntu 12.04

we create script to automatically copy data in each machines

but, the hardest part is because the mount point on each machines sometimes change , let say from sda to sdb and on other day to sdc, we can make the script run perfectly.

so , why the mount point suddenly change?
even when we try to copy data from one machines to another machines manually, suddenly the copy process stop since mount point changed.

please help me.
Old 01-01-2016, 03:02 AM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,912

Rep: Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513Reputation: 1513
The device names change due to the random nature of disk spin up.

To improve boot time the kernel scans each controller in parallel. Usually the /dev/sda is fairly consistent because it is the disk spun up by the BIOS, so it is the first one recognized. After that the disks are assigned names as it spins up.

Unfortunately, that means that what is identified as /dev/sdb, may be on the second controller, instead of the first... or on the first controller IF that disk spins up first. For two disks from the same manufacturer... they can alternate (though usually once you identify the order, they would tend to also come up in the same order the next time... until you add another disk).

There are three ways to specifically identify a disk; by UUID, by volume label, by vendor model and serial number.

1. Give the filesystem a UUID that will uniquely identify the disk. If a UUID isn't specified, one is generated for it by default. Mount the storage unit by "mount UUID=<and the long UUID string> /mountpoint", or "mount /dev/disk/by-uuid/<and the long UUID string>"

2. Give the filesystem a label. This is frequently easier to deal with as you can use mnemonic names that identify the function of the particular filesystem being mounted. Mount the filesystem by "mount LABEL=name /mountpoint" or "mount /dev/disk/by-label/<label>

3. By model and serial number (also known as "by id"). This is a bit tricky as different vendors identify their disk in different ways. You can see the vendor labels in the directory /dev/disk/by-id. The easy part is identifying the partition, this is always at the end of the identification and is "...-partn", where n is the partition number. In my case, I have a number of Samsung SATA disks - which are identified by "ata-SAMSUNG_<model>_<serial>" and have the partition number appended. The problem is that not all manufacturers use the same style... Seagate has a slightly simpler naming scheme and uses "ata-ST<model>-<revision>_<serial>" and may have the partition number added. These may be mounted by "mount /dev/disk/by-id/<and the identification string>"

USB devices that get added/removed very DEFINITELY get various names depending on whether one or more are installed at a time.

In most/all cases it should be possible to use UDEV rules to force known names... but you end up adding rules for UUID identification, volume labels, or the /dev/disk/by-id; and you still don't know what device names show up for new storage devices. You can find out what the current association is because the command "ls -l /dev/by-xxx/" will show a symbolic link for each of the names pointing to the current /dev/sdx<partition> name.

For your purposes, I suspect that using a volume label would be the easiest. It avoids the long UUID strings, allows you to set the name easily, and avoids having to remember which partition it is on, but that assumes the filesystem you are using allows volume labels. Ext filesystems use tune2fs.

You can use the "blkid" utility to list out current values for UUID and volume labels.

If you need more help, you might try to get permission to post the script you are using. NFS itself doesn't use device names on client systems - just mountpoints. I assume that the problem is on the server where the device names change.

Last edited by jpollard; 01-01-2016 at 03:09 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] change the mount point of flash drives shahin_belly Linux - Newbie 4 08-27-2011 09:03 PM
Can't change mount point. RoaCh Of DisCor SUSE / openSUSE 9 05-09-2005 01:51 PM
how to change filesystem mount point? buehler Linux - Newbie 5 04-16-2005 11:19 AM
What is the correct method to change mount point? davidas Linux - Newbie 4 04-19-2004 03:54 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 02:05 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration