# Hard disk problem

## rpil

I have an external USB HD that I use for storage.  It is at NTFS format, because I was using it when I had Windows, 5 years ago! It is connected to my other PC (with Ultimate Edition) without any problem. A few days ago, I had to connect it to my Gentoo and, suddenly, the wallpaper is gone from my desktop, and I lost user rights!

I fixed the problem by changing a line in /etc/fstab. 

My systems contains both KDE and Gnome.

When I'm at KDE, it sees the disk and the files (except some folders that considers empty - but they are not!), and I cannot copy files from my PC to the hard disk (The opposite is OK).

When I'm at Gnome, it sees ALL files as empty and says that the device is mounted but busy!

This is my etc/fstab now:

```
gentoo drphibes # cat /etc/fstab

#tmpfs /newroot tmpfs rw,relatime 0 0

#/dev/sr0 /newroot/mnt/cdrom iso9660 ro,relatime 0 0

#/dev/loop0 /newroot/mnt/livecd squashfs ro,relatime 0 0

#none /overlay tmpfs rw,relatime 0 0

#aufs / aufs rw,relatime,si=e14be625,xino=/overlay/.aufs.xino,dirs=/overlay=rw:/newroot/mnt/livecd=ro 0 0

#/dev/loop0 /mnt/livecd squashfs ro,relatime 0 0

#/dev/sr0 /mnt/cdrom iso9660 ro,relatime 0 0

#proc /proc proc rw,nosuid,nodev,noexec,relatime 0 0

#rc-svcdir /lib/rc/init.d tmpfs rw,nosuid,nodev,noexec,relatime,size=1024k,mode=755 0 0

#sysfs /sys sysfs rw,nosuid,nodev,noexec,relatime 0 0

#securityfs /sys/kernel/security securityfs rw,nosuid,nodev,noexec,relatime 0 0

#udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0

#devpts /dev/pts devpts rw,nosuid,noexec,relatime,gid=5,mode=620 0 0

#tmpfs /dev/shm tmpfs rw,relatime 0 0

#none /usr/lib/opengl/ati tmpfs rw,relatime 0 0

#none /usr/lib/opengl/nvidia tmpfs rw,relatime 0 0

#usbfs /proc/bus/usb usbfs rw,nosuid,noexec,relatime,devgid=85,devmode=664 0 0

#nfsd /proc/fs/nfsd nfsd rw,nosuid,nodev,noexec,relatime 0 0

#binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,nosuid,nodev,noexec,relatime 0 0

#/dev/sda3 / ext3 rw,relatime,errors=continue,data=writeback 0 0

#/dev/sda1 /boot ext2 rw,relatime,errors=continue 0 0

#none /proc proc rw,relatime 0 0

#udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0

/dev/sda1      /boot      ext2      defaults,noatime   1 2

/dev/sda3      /      ext3      noatime      0 1

/dev/sda2      none      swap      sw      0 0

#/dev/cdrom      /mnt/cdrom   auto      noauto,ro,user   0 0

/dev/usb      /mnt/usb   auto      noauto,user      0 0

/dev/sr0       /home/drphibes/cdrom   auto   noauto,users,ro   0 0

shm         /dev/shm   tmpfs      nodev,nosuid,noexec   0 0
```

My /etc/mtab:

```
gentoo drphibes # cat /etc/mtab

/dev/sda3 / ext3 rw,noatime,commit=0 0 0

proc /proc proc rw,noexec,nosuid,nodev,relatime 0 0

sysfs /sys sysfs rw,noexec,nosuid,nodev,relatime 0 0

udev /dev tmpfs rw,nosuid,relatime,size=10240k,mode=755 0 0

devpts /dev/pts devpts rw,noexec,nosuid,relatime,gid=5,mode=620 0 0

/dev/sda1 /boot ext2 rw,noatime 0 0

shm /dev/shm tmpfs rw,noexec,nosuid,nodev 0 0

usbfs /proc/bus/usb usbfs rw,noexec,nosuid,devmode=0664,devgid=85 0 0

binfmt_misc /proc/sys/fs/binfmt_misc binfmt_misc rw,noexec,nosuid,nodev 0 0

securityfs /sys/kernel/security securityfs rw,noexec,nosuid,nodev 0 0

gvfs-fuse-daemon /home/drphibes/.gvfs fuse.gvfs-fuse-daemon rw,nosuid,nodev,user=drphibes 0 0
```

My groups:

```
drphibes@gentoo ~ $ groups

disk lp wheel floppy audio cdrom video games usb users drphibes plugdev
```

I would like to be able to copy/paste files from my pc to the hd and vice versa.  Any help?

I must say that this problem is related to this post: https://forums.gentoo.org/viewtopic-t-842670-highlight-.html

----------

## DONAHUE

gnome likes to automount at /media/<volume name> if already mounted it is busy.

run 

```
mount
```

 in a terminal to see what you have

remove or comment any cdrom lines and usb line from /etc/fstab and see what happens

to write to ntfs partition emerge ntfs3g, see man ntfs=3g and http://en.gentoo-wiki.com/wiki/NTFS-3G

if cycling the drive back to windows after writing be prepared to spend time in chkdskLast edited by DONAHUE on Mon Sep 20, 2010 8:18 pm; edited 1 time in total

----------

## rpil

I have no Windows installed! I'll try to follow your instructions and I'll tell you. Thanks, pal!  :Wink: 

----------

## rpil

This is "mount":

```
gentoo drphibes # mount

/dev/sda3 on / type ext3 (rw,noatime,commit=0)

proc on /proc type proc (rw,noexec,nosuid,nodev,relatime)

sysfs on /sys type sysfs (rw,noexec,nosuid,nodev,relatime)

udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)

devpts on /dev/pts type devpts (rw,noexec,nosuid,relatime,gid=5,mode=620)

/dev/sda1 on /boot type ext2 (rw,noatime)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

securityfs on /sys/kernel/security type securityfs (rw,noexec,nosuid,nodev)

gvfs-fuse-daemon on /home/drphibes/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=drphibes)

/dev/sdb1 on /media/Exorcist type ntfs (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1002,dmask=0077)

```

I had already installed ntfs3g:

```
gentoo drphibes # eix ntfs3g

[I] sys-fs/ntfs3g

     Available versions:  2010.1.16 2010.3.6 ~2010.5.16 ~2010.5.22 ~2010.8.8 {acl debug +external-fuse hal suid udev}

     Installed versions:  2010.3.6(11:25:46 07/21/10)(acl external-fuse hal -debug -suid -udev)

     Homepage:            http://www.tuxera.com/community/ntfs-3g-download/

     Description:         Open source read-write NTFS driver that runs under FUSE
```

And the etc/fstab (I commented all lines related with cdrom or usb):

```
/dev/sda1               /boot           ext2            defaults,noatime        1 2

/dev/sda3               /               ext3            noatime         0 1

/dev/sda2               none            swap            sw              0 0

#/dev/cdrom             /mnt/cdrom      auto            noauto,ro,user  0 0

#/dev/usb                /mnt/usb        auto            noauto,user             0 0

#/dev/sr0                /home/drphibes/cdrom    auto    noauto,users,ro 0 0

#/dev/sdb1              /home/drphibes  auto            noauto,users,ro 0 0

shm                     /dev/shm        tmpfs           nodev,nosuid,noexec     0 0
```

----------

## rpil

Well, I rebooted and I'm able now to copy from my HD to external disk and from the external to my HD, in the Gnome session. But some folders with a lot of stuff seems to be empty! And there is nothing into!  :Shocked: 

And when I'm in KDE session, I can see only some, but not all of them. And I cannot copy from my HD to the external disk!

How can I correct those problems?  :Confused: Last edited by rpil on Sat Sep 25, 2010 8:01 pm; edited 1 time in total

----------

## DONAHUE

```
emerge -s udisks upower gnome-volume-manager udev policykit consolekit
```

 Question being what's installed?

any oddness to the permissions/ownership of the full/empty directories?

my usb/ntfs in mount:

/dev/sdb6 on /media/ntfs-usb type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)

Yours?:

/dev/sdb1 on /media/Exorcist type ntfs (rw,nosuid,nodev,uhelper=udisks,uid=1000,gid=1002,dmask=0077)

----------

## rpil

Here it is:

```
gentoo drphibes # emerge -s udisks upower gnome-volume-manager udev policykit consolekit

Searching...    

[ Results for search key : udisks ]

[ Applications found : 1 ]

*  sys-fs/udisks

      Latest version available: 1.0.1-r1

      Latest version installed: 1.0.1-r1

      Size of files: 697 kB

      Homepage:      http://www.freedesktop.org/wiki/Software/udisks

      Description:   Daemon providing interfaces to work with storage devices

      License:       GPL-2

Searching...    

[ Results for search key : upower ]

[ Applications found : 1 ]

*  sys-power/upower

      Latest version available: 0.9.4

      Latest version installed: [ Not Installed ]

      Size of files: 457 kB

      Homepage:      http://upower.freedesktop.org/

      Description:   D-Bus abstraction for enumerating power devices and querying history and statistics

      License:       GPL-2

Searching...    

[ Results for search key : gnome-volume-manager ]

[ Applications found : 1 ]

*  gnome-base/gnome-volume-manager

      Latest version available: 2.24.1

      Latest version installed: 2.24.1

      Size of files: 365 kB

      Homepage:      http://www.gnome.org/

      Description:   Daemon that enforces volume-related policies

      License:       GPL-2

Searching...    

[ Results for search key : udev ]

[ Applications found : 4 ]

*  app-text/uudeview

      Latest version available: 0.5.20-r1

      Latest version installed: [ Not Installed ]

      Size of files: 255 kB

      Homepage:      http://www.fpx.de/fp/Software/UUDeview/

      Description:   uu, xx, base64, binhex decoder

      License:       GPL-2

*  app-vim/udev-syntax [ Masked ]

      Latest version available: 20051016-r1

      Latest version installed: [ Not Installed ]

      Size of files: 1 kB

      Homepage:      http://www.vim.org/scripts/script.php?script_id=1381

      Description:   vim plugin: syntax highlighting for udev rules files

      License:       vim

*  dev-python/pyudev [ Masked ]

      Latest version available: 0.2

      Latest version installed: [ Not Installed ]

      Size of files: 25 kB

      Homepage:      http://packages.python.org/pyudev/

      Description:   pyudev is a Python and PyQt4 binding for libudev

      License:       LGPL-2.1

*  sys-fs/udev

      Latest version available: 151-r4

      Latest version installed: 151-r4

      Size of files: 632 kB

      Homepage:      http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html

      Description:   Linux dynamic and persistent device naming support (aka userspace devfs)

      License:       GPL-2

Searching...    

[ Results for search key : policykit ]

[ Applications found : 4 ]

*  gnome-extra/policykit-gnome

      Latest version available: 0.9.2-r1

      Latest version installed: [ Not Installed ]

      Size of files: 1,195 kB

      Homepage:      http://hal.freedesktop.org/docs/PolicyKit

      Description:   PolicyKit policies and configurations for the GNOME desktop

      License:       LGPL-2 GPL-2

*  kde-base/policykit-kde [ Masked ]

      Latest version available: 4.4.5

      Latest version installed: [ Not Installed ]

      Size of files: 75,231 kB

      Homepage:      http://www.kde.org/

      Description:   PolicyKit integration module for KDE.

      License:       GPL-2

*  sys-auth/policykit

      Latest version available: 0.9-r1

      Latest version installed: 0.9-r1

      Size of files: 1,224 kB

      Homepage:      http://hal.freedesktop.org/docs/PolicyKit

      Description:   Policy framework for controlling privileges for system-wide services

      License:       MIT

*  sys-auth/policykit-qt

      Latest version available: 0.9.2

      Latest version installed: 0.9.2

      Size of files: 61 kB

      Homepage:      http://kde.org/

      Description:   PolicyKit Qt4 API wrapper library.

      License:       LGPL-2

Searching...    

[ Results for search key : consolekit ]

[ Applications found : 1 ]

*  sys-auth/consolekit

      Latest version available: 0.4.1

      Latest version installed: 0.4.1

      Size of files: 388 kB

      Homepage:      http://www.freedesktop.org/wiki/Software/ConsoleKit

      Description:   Framework for defining and tracking users, login sessions and seats.

      License:       GPL-2
```

----------

## rpil

 *DONAHUE wrote:*   

> 
> 
> my usb/ntfs in mount:
> 
> /dev/sdb6 on /media/ntfs-usb type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
> ...

 

What changes do I need to make?

----------

## DONAHUE

Here I have:

 *Quote:*   

> # emerge -s udisks upower gnome-volume-manager udev policykit consolekit
> 
> Searching...    
> 
> [ Results for search key : udisks ]
> ...

  No longer remember exactly why I banished gnome-volume-manager. If I 

```
emerge -pv gnome-volume-manager
```

 I see  *Quote:*   

> gnome-base/gnome-volume-manager-2.24.1  USE="consolekit -automount -debug"

 . I have consolekit in default run level.

----------

## rpil

I'm in Gnome session now. I gave "mount" and my usb/ntfs is similar to yours:

```
drphibes@gentoo ~ $ mount

/dev/sda3 on / type ext3 (rw,noatime,commit=0)

proc on /proc type proc (rw,noexec,nosuid,nodev,relatime)

sysfs on /sys type sysfs (rw,noexec,nosuid,nodev,relatime)

udev on /dev type tmpfs (rw,nosuid,relatime,size=10240k,mode=755)

devpts on /dev/pts type devpts (rw,noexec,nosuid,relatime,gid=5,mode=620)

/dev/sda1 on /boot type ext2 (rw,noatime)

shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)

usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)

binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)

securityfs on /sys/kernel/security type securityfs (rw,noexec,nosuid,nodev)

gvfs-fuse-daemon on /home/drphibes/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=drphibes)

/dev/sdb1 on /media/Exorcist type fuseblk (rw,nosuid,nodev,allow_other,blksize=4096)
```

And my rc-update show:

```
gentoo drphibes # rc-update show

           alsasound | boot                          

            bootmisc | boot                          

             checkfs | boot                          

           checkroot | boot                          

               clock | boot                          

         consolefont | boot                          

          consolekit | boot                          

               cupsd |      default                  

                dbus | boot                          

                hald |      default                  

            hostname | boot                          

             keymaps | boot                          

               local |      default nonetwork        

          localmount | boot                          

             modules | boot                          

            net.eth0 |      default                  

              net.lo | boot                          

            netmount |      default                  

           rmnologin | boot                          

           syslog-ng |      default                  

      udev-postmount |      default                  

             urandom | boot                          

          vixie-cron |      default                  

                wicd |      default                  

                 xdm |      default
```

----------

