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 - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 07-26-2009, 01:29 AM   #1
ratcateme
Member
 
Registered: Feb 2008
Distribution: CentOS 5.4
Posts: 59

Rep: Reputation: 15
mounting using LABEL=


i have just swapped all the HDDs around in my linux box originally i had a IDE drive for / and a 160GB SATA for data storage
i got a new 1TB SATA drive for data storage and i moved all my data to it.
then i reformatted my 160GB and copied / to it updated the MBR and grub and it now boots fine from from my 160GB the problem is i can't get it to mount the 1TB drive using Labels /etc/fstab looks like
cat /etc/fstab
Code:
LABEL=160Main           /                       ext3    defaults        1 1
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=160Swap           swap                    swap    defaults        0 0
#/dev/sdb1              /mnt/sdb                ntfs-3g defaults        0 0
LABEL=1TB               /mnt/sdb                ntfs-3g defaults        0 0
and ls -l /dev/disk/by-label:
Code:
lrwxrwxrwx 1 root root 10 Jul 26 18:02 160Main -> ../../sda1
lrwxrwxrwx 1 root root 10 Jul 26 18:02 160Swap -> ../../sda2
lrwxrwxrwx 1 root root 10 Jul 26 18:02 1TB -> ../../sdb1
now if i swap the comments on the last to lines of fstab it will mount but with the LABEL when i type mount /mnt/sdb i get:
Code:
ntfs-3g: Failed to access volume 'LABEL=1TB': No such file or directory

ntfs-3g 2009.4.4 integrated FUSE 27 - Third Generation NTFS Driver

Copyright (C) 2005-2007 Yura Pakhuchiy
Copyright (C) 2006-2009 Szabolcs Szakacsits
Copyright (C) 2007-2009 Jean-Pierre Andre
Copyright (C) 2009 Erik Larsson

Usage:    ntfs-3g [-o option[,...]] <device|image_file> <mount_point>

Options:  ro (read-only mount), remove_hiberfile, uid=, gid=,
          umask=, fmask=, dmask=, streams_interface=.
          Please see the details in the manual (type: man ntfs-3g).

Example: ntfs-3g /dev/sda1 /mnt/windows

Ntfs-3g news, support and information:  http://ntfs-3g.org
i have rebooted many times but nothing has changed.
is there an error in the way i configured the Labels.
something else i questioned was if ntfs-3g didn't support the LABEL=<label> syntax?

my system is Centos 5.3
Kernel 2.6.18-128.1.10.el5

Thanks Scott.

Last edited by ratcateme; 07-28-2009 at 02:41 AM.
 
Old 07-26-2009, 02:29 AM   #2
EmrldDrgn
Member
 
Registered: Oct 2008
Posts: 40

Rep: Reputation: 16
*why isn't there a delete post option?*
 
Old 07-28-2009, 12:53 AM   #3
ratcateme
Member
 
Registered: Feb 2008
Distribution: CentOS 5.4
Posts: 59

Original Poster
Rep: Reputation: 15
any one else have any ideas?
i can live with this but i would like to make it work so if i ever want to use Labels later on i can no worries

Scott.
 
Old 07-28-2009, 01:21 AM   #4
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
I can tell you that should work because I mount my Windows partition with this method. If I'm not mistaken, mount resolves the label and passes the device file to ntfs-3g - looks like your problem is that mount isn't doing that and is just passing the raw thing, which poor ntfs-3g obviously can't do shit with. So I'm not sure what's wrong here. Try `ntfslabel /dev/sdb1` and make sure it returns what we think it should. By the way, try the [ CODE ] tags - makes this kind of thing infinitely easier to read.

On another note, jesus christ, do you have 160 GB of swap?
 
Old 07-28-2009, 02:40 AM   #5
ratcateme
Member
 
Registered: Feb 2008
Distribution: CentOS 5.4
Posts: 59

Original Poster
Rep: Reputation: 15
well i had tried to check that with the ls -l /dev/disk/by-label
but as predicted: ntfslabel -f /dev/sdb1
Code:
The device /dev/sdb1, is mounted.
Forced to continue.
1TB
so the label is "1TB" like i had set it
i can see what you are saying about it not changing LABEL=1TB to /dev/sdb1 for ntfs-3g
i will do some more Googling to see if i can get any more info on this

also i don't have 160GB of swap i have a 160GB drive with 2 partitions the / and a swap it is really only about 1.5GB

Scott.
 
Old 07-28-2009, 03:13 AM   #6
karamarisan
Member
 
Registered: Jul 2009
Location: Illinois, US
Distribution: Fedora 11
Posts: 374

Rep: Reputation: 55
Unfortunately, I can't see anything wrong with your configs - thought there might be an extra space or something, but nope, all looks clean. One other thing I can suggest you try that may help you figure this out and is (IMHO) a superior alternative to LABEL= mounting is UUID= mounting. You can find your drive's UUID (which for NTFS isn't a real UUID, but whatever) under /dev/disk/by-uuid. Perhaps if you try that, whether it works or fails will tell you something about the problem. Best of luck, and please come back to this thread and let us know when you figure it out. You never know who might have the exact same problem some day.
 
Old 07-28-2009, 03:29 AM   #7
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
I suggest use EXT3 unless you desperately need NTFS. Since there is already an IFS driver for Windows that supports EXT2, there is no need to use NTFS. IMHO using ntfs-3g in Linux is still experimental because some Linux programs has some problems with NTFS.

If you insist on using NTFS for the file system for your terabyte hard drive, you can try to change the mount script for ntfs-3g. It might be called mount.ntfs-3g. I suggest double check if the label 1TB is proper label.
 
Old 07-28-2009, 05:58 AM   #8
ratcateme
Member
 
Registered: Feb 2008
Distribution: CentOS 5.4
Posts: 59

Original Poster
Rep: Reputation: 15
thanks Electro really the only reason i am using NTFS is that depending on how things work out i might put it back in one of my XP boxes
now that you have pointed out the Windows can support EXT3 i will reformat tonight YAYA more wasted time!

just a question regarding mount should it turn LABEL=1TB into /dev/sdb1 or should that be done by the ntfs-3g command that is called
also i checked /sbin/mount.ntfs-3g and it is linked to /usr/bin/ntfs-3g and that looks all good


Scott.
 
Old 07-28-2009, 05:01 PM   #9
Electro
LQ Guru
 
Registered: Jan 2002
Posts: 6,042

Rep: Reputation: Disabled
The ntfs-3g should be able to mount using labels if it is written properly. If it is not remove the symbolic link for mount.ntfs-3g and write a bash script named mount.ntfs-3g that translates the label into the device node and then mounts using ntfs-3g utilities.

I think you specify an illegal label for your NTFS partition. When I specify labels, I do not use a number as the first character in the label. I suggest change the label, so it does not have a number for the first character. If it works after you change the label to not have a number for the first character, then you should send a bug report to ntfs-3g about the label limitation. At this point, you should upgrade ntfs-3g to the latest stable version.

Actually the EXT2 IFS is a Windows drivers that provides support for EXT2 that gives the ability to access EXT2 partitions. Since EXT3 is EXT2 plus journal, formatting partition as EXT3 is OK when using in Windows which has EXT2 IFS installed. When you boot into Linux, run the file system utility to update the journal.
 
Old 07-29-2009, 02:20 AM   #10
ratcateme
Member
 
Registered: Feb 2008
Distribution: CentOS 5.4
Posts: 59

Original Poster
Rep: Reputation: 15
i relabeled the drive to TB reboot and updated fstab but still same problem
i wont bother making a mount.ntfs-3g i think i will just change it to EXT3

Thanks for the help
Scott.
 
  


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
Mounting partition(s) by label - Reboot required?? amn Linux - Newbie 17 05-16-2010 08:13 AM
mounting partitions by label OldAl Ubuntu 6 05-14-2010 07:49 PM
Label the tape mahabooba Solaris / OpenSolaris 1 05-29-2007 02:14 PM
label printer imorrison Linux - Newbie 1 07-17-2004 10:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:31 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