You are not logged in.

#1 2010-09-17 19:53:18

Arien
Member
Registered: 2009-04-23
Posts: 20

[solved] how to prevent my sdb1 from being double mounted

Hiya friends :)

i recently migrated my /home directory from /dev/sda2 which is mounted as '/' to /dev/sdb1 which is now mounted at '/home' (previously /media/sdb1)

the weird thing is that it seems to be double mounted now (the usbhd entry)

anyone know why this happened and what to do against it?

Thanks
Arien

[dmoer@antec ~]$ df -h
Filesystem            Size  Used Avail Use% Mounted on
udev                   10M  172K  9.9M   2% /dev
/dev/disk/by-uuid/657749bf-7955-4caa-b023-8aa7c17e9c58
                       25G  7.6G   16G  33% /
/dev/sdb1             1.4T  657G  650G  51% /media/usbhd-sdb1
/dev/sda1             440G  147G  294G  34% /media/usbhd-sda1
none                  3.0G 1004K  3.0G   1% /dev/shm
none                  3.0G     0  3.0G   0% /media/tmpfs
/dev/sdb1             1.4T  657G  650G  51% /home
# /etc/fstab: static file system information.                                                           
#                                                                                                       
# <file system> <mount point>   <type>  <options>       <dump>  <pass>                                  

#Entry for /dev/sda2 :                                                                                  
UUID=657749bf-7955-4caa-b023-8aa7c17e9c58       /       ext4    defaults,noatime        0       1

#Entry for /dev/sda1 :                                                                                  
#UUID=A024406524404090  /media/sda1     ntfs-3g defaults,locale=en_US.UTF8      0       0               


none    /dev/pts        devpts  defaults        0       0
none    /dev/shm        tmpfs   defaults        0       0

#Entry for /dev/sda3 :                                                                                  
UUID=0a25c38f-ce6d-4840-b4b7-82fa434056e6       swap    swap    defaults        0       0

none    /media/tmpfs    tmpfs   defaults        0       0

#/dev/cdrom     /media/cd       auto    ro,user,noauto,unhide   0       0                               
#/dev/dvd       /media/dvd      auto    ro,user,noauto,unhide   0       0                               
#/dev/fd0       /media/fl       auto    user,noauto     0       0                                       

#Entry for /dev/sdb1 :                                                                                  
UUID=baeefbdd-d86e-4f11-9f70-f4bbe0227388       /home   ext4    defaults,noatime        0       0

Last edited by Arien (2010-09-17 21:24:14)

Offline

#2 2010-09-17 20:00:27

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [solved] how to prevent my sdb1 from being double mounted

[ignore me i think i misread something...]

Last edited by brisbin33 (2010-09-17 20:01:04)

Offline

#3 2010-09-17 20:04:21

Arien
Member
Registered: 2009-04-23
Posts: 20

Re: [solved] how to prevent my sdb1 from being double mounted

Here is the mount message :)

[dmoer@antec ~]$ mount
proc on /proc type proc (rw,relatime)
sys on /sys type sysfs (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=10240k,nr_inodes=756029,mode=755)
/dev/disk/by-uuid/657749bf-7955-4caa-b023-8aa7c17e9c58 on / type ext4 (rw,noatime,commit=0)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sdb1 on /media/usbhd-sdb1 type ext4 (rw,relatime,barrier=1,data=ordered,commit=0,commit=0,commit=0,commit=0)
/dev/sda1 on /media/usbhd-sda1 type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096)
none on /dev/pts type devpts (rw)
none on /dev/shm type tmpfs (rw)
none on /media/tmpfs type tmpfs (rw)
/dev/sdb1 on /home type ext4 (rw,noatime,commit=0)

Last edited by Arien (2010-09-17 20:04:56)

Offline

#4 2010-09-17 20:08:01

skanky
Member
From: WAIS
Registered: 2009-10-23
Posts: 1,847

Re: [solved] how to prevent my sdb1 from being double mounted

Do you have a udev rule (from the wiki, say) that mounts sd* drives to /media/usbhd-sd*?


"...one cannot be angry when one looks at a penguin."  - John Ruskin
"Life in general is a bit shit, and so too is the internet. And that's all there is." - scepticisle

Offline

#5 2010-09-17 20:15:27

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: [solved] how to prevent my sdb1 from being double mounted

You running KDE? I know it has a manual setting to mount removable devices whenever they are detected...


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#6 2010-09-17 20:16:58

Arien
Member
Registered: 2009-04-23
Posts: 20

Re: [solved] how to prevent my sdb1 from being double mounted

yeah you were right, I got a mount rule there. I think I added it in order so that usb sticks are properly mounted. Hmm any way other than just deletring the rule?

KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask\
=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%\
k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media\
/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

Offline

#7 2010-09-17 20:24:02

brisbin33
Member
From: boston, ma
Registered: 2008-07-24
Posts: 1,796
Website

Re: [solved] how to prevent my sdb1 from being double mounted

Arien wrote:

yeah you were right, I got a mount rule there. I think I added it in order so that usb sticks are properly mounted. Hmm any way other than just deletring the rule?

KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="usbhd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="relatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask\
=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%\
k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media\
/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

don't delete it!

just change the rule so it doesn't match sda or sdb:

# make this
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"

# into this
KERNEL!="sd[c-z][0-9]", GOTO="media_by_label_auto_mount_end"

Offline

#8 2010-09-17 21:23:57

Arien
Member
Registered: 2009-04-23
Posts: 20

Re: [solved] how to prevent my sdb1 from being double mounted

Thanks Everyone :)

It seems this solved it, and I love that the rule could be changed :) yay gnu/linux

Byeee :D

Offline

Board footer

Powered by FluxBB