Author Topic: (SOLVED) "-1" being added to directory name  (Read 402 times)

Online veronicathecow

  • Full Member
  • ***
  • Posts: 195
(SOLVED) "-1" being added to directory name
« on: May 13, 2011, 08:53:50 AM »
Strange one this. I have a hard drive sda2 with a label sata1000
When I try to view it with dolphin. the label shows sata1000 but it has mounted itself as /media/storage1000-1/
If i try and access what it should be /media/storage1000/ then it shows up as empty. (This is sdb1)
If I use /media/storage1000-1/ then everything is there.
I think it might have come about when I tried to open Digikam and it could not find the folder (I had not yet mounted the drive)
I have checked fstab and there is no entry there.

My mtab file shows
/dev/sda1 / ext4 rw 0 0
none /proc proc rw 0 0
none /dev/pts devpts rw 0 0
none /proc/sys/fs/binfmt_misc binfmt_misc rw 0 0
/dev/sdb1 /media/storage1000-1 ext4 rw,nosuid,nodev,uhelper=hal 0 0

If I remove the "-1" from the last line in mtab, then save it and try to reboot it hangs before the reboot.(Happens every time)
Any ideas appreciated
« Last Edit: May 13, 2011, 12:38:14 PM by veronicathecow »

Offline AS

  • Hero Member
  • *****
  • Posts: 4098
  • Have a nice ... night!
Re: "-1" being added to directory name
« Reply #1 on: May 13, 2011, 09:20:37 AM »
Hello,

you are confusing mtab and fstab. You shouldn't edit mtab, it contains the list of mounted filesystems, and the system try to unmount all filesystems listed in mtab before shutdown or reboot. (when you change the name in mtab, the system fail to unmount because of the wrong mounting point name).

If any filesystems table edit should be done, this must be on /etc/fstab, that contain the list of partitions and the mounting options.

However, if your storage1000 partition is on a removable device, it's normally mounted by hal subsystem, and you do not need to add it on fstab.
The fact that at mounting, the partition will use the name storage1000-1, is because a storage1000 is probably already in use and already mounted.

May be you have 2 partition labeled storage1000 ? (sda2 and sdb1) ?

try the following command, from a root console, should show all partitions and their labels:
blkid

Also note that: /dev/sda2 = second partition of first hard disk, /dev/sdb1 = first partition of second disk.

AS
« Last Edit: May 13, 2011, 09:24:34 AM by as »

Offline menotu

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 15506
  • ┌∩┐(◕_◕)┌∩┐
Re: "-1" being added to directory name
« Reply #2 on: May 13, 2011, 09:25:30 AM »
In addition to - and after trying as advice, you could try starting digiKam again with the camera plugged in.

Then close digiKam and the camera in the proper manner and see if its been resolved
PCLinuxOS 32bit KDE 4.10.4; kernel-3.4.11-pclos1.bfs & 64bit 3.4.38bfs; NVidia GeForce 8400GS 1GB 310.19 driver

Sony Vaio SVE1513A4ESI Laptop, Intel Core i5, 2.6GHz, 6GB RAM, 750GB, 15.6" Intel HD Graphics 4000

Online veronicathecow

  • Full Member
  • ***
  • Posts: 195
Re: "-1" being added to directory name
« Reply #3 on: May 13, 2011, 11:57:10 AM »
Hi as and menotu, thanks for getting back to me. (Ta for info re mtab)

I have the following setup. all filesystems are ext4 and fixed into machine.
60gb sata split into /dev/sda1, sda2 and sda3  (labels sata1, sata2 and sata3) for several different O/S's)
1000 gb sata /dev/sdb1 (label storage1000) for main storage
500 gb sata /dev/sdc1 (Label storage500) for backup storage and sdc2 (swap)

I think with digicam I may have marked the collection of photos on storage1000 as removable in the hope that if I booted up and started digikam before I had opened up with dolphion that it would not give me annoying error messages.

blkid
/dev/sda1: LABEL="sata1" UUID="f7f758e2-b805-483f-a597-f0085547f016" TYPE="ext4"
/dev/sdc2: UUID="af552604-86db-4f0b-b7d2-152b9d73a522" TYPE="swap"
/dev/sda2: LABEL="sata2" UUID="4c7f0e38-9ec1-4902-bf00-0d5943713716" TYPE="ext4"
/dev/sda3: LABEL="sata3" UUID="bde6553f-1e8c-4f4b-9062-a960566c1658" TYPE="ext4"
/dev/sdb1: LABEL="storage1000" UUID="bc12490b-891f-4103-9044-a61936a11af4" TYPE="ext4"
/dev/sdc1: LABEL="storage500" UUID="f04a47e2-4aef-4dec-ba16-f8379a4a8d5c" TYPE="ext4"

No luck with.
"In addition to - and after trying as advice, you could try starting digiKam again with the camera plugged in.
Then close digiKam and the camera in the proper manner and see if its been resolved"

Is there some configuration file in hal that I can alter to unmark as removable if this is the problem. I did a search for storage1000-1 but could not find any references for it except in logs and mtab.
Cheers



Offline AS

  • Hero Member
  • *****
  • Posts: 4098
  • Have a nice ... night!
Re: "-1" being added to directory name
« Reply #4 on: May 13, 2011, 12:17:25 PM »
May be you have manually created a directory named storage1000 under /media ?
if yes, remove that directory, later when you will mount /dev/sdb1 it should mount under /media/storage1000,
that directory is automatically created by hal, if it already exist it will create /media/storage1000-1.

AS

Online veronicathecow

  • Full Member
  • ***
  • Posts: 195
(SOLVED) Re: "-1" being added to directory name
« Reply #5 on: May 13, 2011, 12:37:37 PM »
Hi as, ah yes that is interesting,
.hal-matb shows
/dev/sdb1   0   0   ext4   nosuid,nodev,uhelper=hal   /media/storage1000-1

and there are two folders under media
storage1000 (Has folders created by kdenlive in it and nothing else)
storage1000-1 (has all my files in it)

I have deleted the storage1000 folder and rebooted and is now sorted.
Many thanks to you both. I will not investigate some more automount stuff to prevent this from happening again
cheers. Tony