LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-23-2006, 10:11 AM   #1
hondapowered
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Rep: Reputation: 0
Volume label problem


How does "mount" associate the volume label with a device? Is it stored in a file some where?
Is there a way to reset or clear the association?

Searching returned a lot of info on how to create volume labels and there intended use. Nothing
I have read deals with how it works, or the files/info used to preform mounts from labels.

Running Slack 10.2.

I had a hard drive, hdg, 4 partitions formatted ext2, hdg1 = no label, hdg2 = "extradisk1",
hdg3 = "extradisk2", & hdg4 = "extradisk3". I mounted them using the label instead of the
device name and everything was good. I repartioned hdg with 1 partition and no volume label.
I added a firewire drive, sda, 3 partitions formatted ext2, sda1 = "extradisk1", sda2 =
"extradisk2", & sda3 = "extradisk3". Mounting them using the label doesn't work.

Code:
# mount -L extradisk1 /mnt/hd
mount: wrong fs type, bad option, bad superblock on /dev/hdg2,
       missing codepage or other error
       (could this be the IDE device where you in fact use
       ide-scsi so that sr0 or sda or so is needed?)
       In some cases useful info is found in syslog - try
       dmesg | tail  or so
Code:
# dmesg | tail
hdg2: bad access: block=2, count=2
end_request: I/O error, dev 22:02 (hdg), sector 2
EXT2-fs: unable to read superblock
Mount is still trying to use the old hdg partitions when looking for volume labels.
I would like it to mount the firewire disk instead.

Thanks in advance.
 
Old 02-23-2006, 10:49 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
You can use tune2fs to change the labels. However I would
change the fstab entry to use device IDs instead of labels.
i.e.
/dev/sda2 /mnt/hd ....
instead of
label=extradisk1 /mnt/hd .....
 
Old 02-23-2006, 11:44 AM   #3
hondapowered
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
The labels are already set. I am not using fstab to mount these partitions because I don't want them auto mounted.

I want to know why, after removing the volume labels & partitions from hdg and re-using the label names on the sda partitions, "mount -L <label>" would still try to mount the old hdg partitions even though they no longer exist. And is there a way to correct this?
 
Old 02-23-2006, 11:53 AM   #4
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Just a shot in the dark, you sure there is no fstab entries for those drives? And just because its in fstab does not mean that it is auto mounted. You can add the option noauto and it will not mount at boot. You really should add all to fstab with device ids not labels.
Hope that helps some.
 
Old 02-23-2006, 12:22 PM   #5
hondapowered
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
No fstab entries for these devices.

these partitions are to be mounted with an automated script.

I had the understanding that with the lables, my script would not be conserned what the device name or id was.

I have used the labels on partitions that no longer exist and then reused the labels on a different disk, but mounting with the label still trys to mount the nonexistent hdg partitions instead of the new sda partitions.

Last edited by hondapowered; 02-23-2006 at 12:32 PM.
 
Old 02-23-2006, 12:27 PM   #6
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
Did you check you /etc/fstab entries?

Using volume labels is not a good idea, like everybody else has stated, for EXACTLY the reasons that you are having a problem with. Volume labels can change, but devices do not (unless you physically remove/replace them).

Check your fstab entries. Tell us the result.

Or don't check them, and keep asking the same question.

Your system. Your choice.
 
Old 02-23-2006, 12:35 PM   #7
hondapowered
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
[CODE]# cat /etc/fstab
/dev/hda4 swap swap defaults 0 0
/dev/hda1 / ext2 defaults 1 1
/dev/hda2 /usr ext2 defaults 1 2
/dev/hda3 /home ext2 defaults 1 2
/dev/hde1 /mnt/shared ext3 defaults 1 2
/dev/cdrom /mnt/cdrom auto noauto,owner,ro 0 0
/dev/fd0 /mnt/floppy auto noauto,owner 0 0
devpts /dev/pts devpts gid=5,mode=620 0 0
proc /proc proc defaults 0 0[CODE]
 
Old 02-23-2006, 12:42 PM   #8
hondapowered
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
cwwilson721: i understand that volume labels change. I changed the volume labels for the drives in question, because I want to mount the new partiitions not the old ones. My understanding of mounting by label, is that it is possible to mount the filesystem by its label regardless of what device it is on. Am I wrong in that thinking?
 
Old 02-23-2006, 12:47 PM   #9
lord-fu
Member
 
Registered: Apr 2005
Location: Ohio
Distribution: Slackware && freeBSD
Posts: 676

Rep: Reputation: 30
Hello,

I can only tell you that maybe you should add the entry to fstab for the correct device names and mount points with the option of no auto like you wanted. That will at least give you access to the drives.

I do not know why when you try to mount that there is still a reference to your other drive labels, other than there may be a reference to the drive in /dev . If this is the case maybe you can delete the entry for hdg in /dev and see if that helps. I do not know if you should delete this or if it will fix your issue.

Sorry I cant be of more help and good luck!, I am sure/hope someone will come along and offer greater guidance.

Good day.
 
Old 02-23-2006, 01:46 PM   #10
hondapowered
LQ Newbie
 
Registered: Aug 2005
Posts: 13

Original Poster
Rep: Reputation: 0
I have fixed my problem. The file /etc/blkid.tab is what mount uses for association of device ids and volume labels to the device.

Code:
# cat blkid.tab
<device DEVNO="0x0200" TIME="1152735226" UUID="B4D9-1CC6" SEC_TYPE="msdos" TYPE="vfat">/dev/fd0</device>
<device DEVNO="0x1600" TIME="1153144667" TYPE="iso9660">/dev/cdrom</device>
<device DEVNO="0x2201" TIME="1154544886" UUID="3a041223-c421-4a09-84c2-196365c05470" TYPE="ext2">/dev/hdg1</device>
<device DEVNO="0x0301" TIME="1140646418" UUID="5e083e63-c4f7-49f6-8e71-e53036cd640e" TYPE="ext2">/dev/hda1</device>
<device DEVNO="0x0302" TIME="1140646418" UUID="02a99be6-a3c8-4787-a25a-efc00ee81d88" TYPE="ext2">/dev/hda2</device>
<device DEVNO="0x0303" TIME="1140646418" UUID="096f9975-3db9-4cc4-9d82-fb5f11dafd19" TYPE="ext2">/dev/hda3</device>
<device DEVNO="0x0304" TIME="1140646418" TYPE="swap">/dev/hda4</device>
<device DEVNO="0x2101" TIME="1140646418" UUID="7645043b-70eb-4cb2-bfac-021180b2e7f3" SEC_TYPE="ext2" TYPE="ext3">/dev/hde1</device>
<device DEVNO="0x2202" TIME="1153076086" LABEL="firedisk1" UUID="ed6642f8-9cbc-473a-a1d3-c1eadcec80bc" TYPE="ext2">/dev/hdg2</device>
<device DEVNO="0x2203" TIME="1153680886" LABEL="firedisk2" UUID="12a91773-5a8d-46bd-85db-a8fa01290a37" TYPE="ext2">/dev/hdg3</device>
<device DEVNO="0x2204" TIME="1154285686" LABEL="firedisk3" UUID="0f1c2535-8fa0-4c10-b416-a7efaa70c54e" TYPE="ext2">/dev/hdg4</device>

I deleted the last 3 lines and no more problems. Thank you all who replied.

Last edited by hondapowered; 02-23-2006 at 01:49 PM.
 
Old 02-23-2006, 03:34 PM   #11
cwwilson721
Senior Member
 
Registered: Dec 2004
Location: In my house.
Distribution: Ubuntu 10.10 64bit, Slackware 13.1 64-bit
Posts: 2,649
Blog Entries: 1

Rep: Reputation: 67
I was just stating that mounting by volume labels is not a good practice, because of the problems you were having. It is a classic example of why you should not do so.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Transcend Jetflash 1GB USB Memory Stick on Fedora Core 3: Give it a volume label. Jim_Farmer Linux - Hardware 1 04-29-2005 12:32 PM
viewing the volume label of a cd? minm Linux - Newbie 2 12-25-2004 02:27 AM
Invalid Unicode on DVD Disc/Volume Label DraconianTimes Linux - Software 2 11-30-2003 02:28 PM
Adjusting how much volume jumps with volume keys vrillusions Linux - Laptop and Netbook 2 10-17-2003 09:11 PM
Disk label problem Juniper34 *BSD 2 08-21-2003 06:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:37 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration