Change mount point name?

Issues related to hardware problems
Post Reply
louarnold
Posts: 111
Joined: 2009/09/16 23:22:47
Location: Ottawa, Canada

Change mount point name?

Post by louarnold » 2014/12/29 00:46:31

I'm running CentOS 7. I'd like to change the name of the mount point of a data drive. The old mount point is "/run/media/root/SG250GP1" (see below) and the new mount point should be "/run/media/root/WD500GP1" to match the actual drive size put in a few years ago. I was going to do that by unmounting the drive, creating a new directory WD500GP1 (where?) and then remounting the drive. Is that safe? Does it get me what I want? And how do I get it to auto mount as the old name is? Is there a better/easier way?

fstab, df and fdisk output are include below:
Note that the fstab file doesn't list the SG250GP1 partition at all, and yet it still auto mounts, I assume because of LVM.

[root@shoe ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/centos-root 48G 3.7G 44G 8% /
devtmpfs 1.8G 0 1.8G 0% /dev
tmpfs 1.8G 8.0K 1.8G 1% /dev/shm
tmpfs 1.8G 8.6M 1.8G 1% /run
tmpfs 1.8G 0 1.8G 0% /sys/fs/cgroup
/dev/mapper/centos-home 24G 33M 24G 1% /home
/dev/sda1 497M 99M 398M 20% /boot
/dev/sdb1 459G 41G 395G 10% /run/media/root/SG250GP1
[root@shoe ~]#

fstab:
/dev/mapper/centos-root / xfs defaults 1 1
UUID=528d8587-790a-478e-a7ac-c6d306fbc883 /boot xfs defaults 1 2
/dev/mapper/centos-home /home xfs defaults 1 2
/dev/mapper/centos-swap swap swap defaults 0 0

fdisk -l
Disk /dev/sdb: 500.1 GB, 500107862016 bytes, 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 2048 976773119 488385536 83 Linux

Disk /dev/sda: 80.0 GB, 80026361856 bytes, 156301488 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk label type: dos
Disk identifier: 0x000cd829

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1026047 512000 83 Linux
/dev/sda2 1026048 156301311 77637632 8e Linux LVM

Disk /dev/mapper/centos-swap: 4043 MB, 4043309056 bytes, 7897088 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-root: 50.7 GB, 50700746752 bytes, 99024896 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes


Disk /dev/mapper/centos-home: 24.8 GB, 24754782208 bytes, 48349184 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Change mount point name?

Post by TrevorH » 2014/12/29 00:59:46

Post the output of the blkid command.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

louarnold
Posts: 111
Joined: 2009/09/16 23:22:47
Location: Ottawa, Canada

Re: Change mount point name?

Post by louarnold » 2014/12/29 01:23:11

Here it is:
[root@shoe ~]# blkid
/dev/sdb1: LABEL="SG250GP1" UUID="731dc977-5742-4718-bb0f-37ea582fb7f9" TYPE="ext3"
/dev/sda1: UUID="528d8587-790a-478e-a7ac-c6d306fbc883" TYPE="xfs"
/dev/sda2: UUID="4F8gu3-EKEi-ffg2-jywd-hLxI-Xxic-Otv2lo" TYPE="LVM2_member"
/dev/mapper/centos-swap: UUID="8f7fcb5e-a736-48bd-bc8b-358fe9095210" TYPE="swap"
/dev/mapper/centos-root: UUID="d7b2519f-877f-4d73-b12a-1f0cc3cd2ed9" TYPE="xfs"
/dev/mapper/centos-home: UUID="4b591397-484d-4cf7-8d58-1209de0f0095" TYPE="xfs"
[root@shoe ~]#

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Change mount point name?

Post by TrevorH » 2014/12/29 01:29:33

/dev/sdb1: LABEL="SG250GP1" UUID="731dc977-5742-4718-bb0f-37ea582fb7f9" TYPE="ext3"
So it mounts currently based on the LABEL on the device. Change the label and it will change the mountpoint - man e2label
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

louarnold
Posts: 111
Joined: 2009/09/16 23:22:47
Location: Ottawa, Canada

Re: Change mount point name?

Post by louarnold » 2014/12/29 01:54:36

Yep...that worked:

e2label /dev/sdb1 WD500GP1

Unmount and mount was not required.
The system booted with the drive partition automounted.

Altogether painless!
Thank you TrevorH.
-----
Hmmm.....not so good after all. The mount point label changed, but some software doesn't see the Samba share. Under V6.5 the Samba share had a path /mnt/SG250GP1/SambaX, and now the path is be /mnt/WD500GP1/SambaX.But I get some werror messages that claim that SambaX is not mounted. IS it possible that under v6.5, it was mounted as /mnt/SG250GP1/SambaX ?

Post Reply