This is a discussion on udev, hal, and a USB harddrive with multiple partitions within the Debian Linux support forums, part of the Debian Linux category; --> System: Xubuntu 7.04 (Debian unstable/testing), freshly installed FSC C5910 small office PC 2.5" USB harddrive with three partitions, NTFS ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| System: Xubuntu 7.04 (Debian unstable/testing), freshly installed FSC C5910 small office PC 2.5" USB harddrive with three partitions, NTFS and 2 times ext3 Problem: When connecting the external drive, all three partitions are mounted automatically with mount points /media/label-1, /media/label-2, and /media/label-3, where label-x are the partition labels. Thats nice and how it should be. However, when disconnecting the drive (without umount because that's what the users the PC in set up for will do no matter what I will tell them) not all entries in /media will be removed. At first sight it looks like the boy or the girl who set up the thing had just USB drives with one partition like SD cards for cameras and such in mind. As a consequence, next time the disk is connected new entries in /media are created, e.g. label-2_ the second, and label-2__ the third time, you get the point. Over time the directory clutters up with additional entries which will confuse the users. To make things a bit more complicated, one partition is supposed to take automatic backups of user data. With varying mount points this gets more tricky than with a constant one. An obvious workaround would be an entry in fstab. But at the moment I do not want to go that route [1]. Instead, I wrote a crude and simple cron job that searches for directories in /media not matching an mtab entry and removing them. My question: is this a known issue and is there a simple fix for it? As one might guess from this posting I did not get too deep into the mysteries of event handling via udev and hal and the automatic mounting system yet. Before investing much time in analyzing the procedure in detail I dare to ask here for advice. [1] It would not be sufficient anyway without additional configuration that makes sure that the disk connected is indeed the one that takes the backups. Just with the entry in fstab every disk which is listed as e.g. /dev/sdb1 and with a matching file system will be filled with user data. OK, also relying on the partition label is not safe. But I consider this to be sufficient for this project. Günther |