LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise
User Name
Password
Linux - Enterprise This forum is for all items relating to using Linux in the Enterprise.

Notices


Reply
  Search this Thread
Old 05-22-2009, 06:37 AM   #1
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Rep: Reputation: 0
mount ntfs by LABEL


Hi all

i want to mount by label an ntfs volume.
I have installed in a RHEL4 this packges:
[root@la_machina~]# rpm -qa | grep -i NTFS
ntfsprogs-1.9.4-1.2.el4.rf
ntfsprogs-devel-1.9.4-1.2.el4.rf
kernel-module-ntfs-2.6.9-67.0.7.ELsmp-2.1.20-0.rr.10.0

then i labeled a ntfs volume:
[root@la_machina~]# ntfslabel /dev/sdd1 backup_exchange
[root@la_machina~]# ntfslabel /dev/sdd1
backup_exchange

BUT, how can i mount by label??

[root@la_machina~]# mount LABEL=backup_exchange /backup/exchange/
mount: no se ha encontrado esta partición

ntfs commands:
[root@la_machina~]# ntfs
ntfscat ntfsclone ntfscluster ntfsfix ntfsinfo ntfslabel ntfsls ntfsresize ntfsundelete

mount commands:
[root@la_machina~]# mount
mount mount.cifs mount.smb mount.smbfs


Thx in advance
 
Old 05-22-2009, 07:43 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You could look at "mount --help". Use the "-L label" argument to mount by label.
 
Old 05-22-2009, 07:49 AM   #3
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Thx, but same thing:

[root@la_machina~]# mount -l LABEL=backup_exchange /backup/exchange/
mount: no se ha encontrado esta partición
[root@la_machina~]# mount -L backup_exchange /backup/exchange/
mount: no se ha encontrado esta partición
[root@la_machina~]# mount -L LABEL=backup_exchange /backup/exchange/
mount: no se ha encontrado esta partición

regards
 
Old 05-22-2009, 07:52 AM   #4
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I don't understand the language of your error message. Could you translate it. Does RHEL support mounting by label or UUID? Or do you not have NTFS support. Look in the manpages for mount and mount.ntfs for the answer. On my system, you can use -L label or -U UUID. But mounting by label may be a more recent innovation.
 
Old 05-22-2009, 07:59 AM   #5
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Hi

the error messagges says: "mount: partition not found"

Im able to mount this ntfs partition by device: "mount /dev/sdd1 /backup/exchange" -OK
And im able to mount by LABEL all my ext3 partitions, but maybe the system dont recognize properly the ntfslabels...

regards
 
Old 05-22-2009, 01:40 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
First, does the ntfsprogs provide you with the ntfs-3g driver? You really need to use it and not the old kernel module, especially if you need write ability.

Next, does the drive show up in the "/dev/disk/by-label" directory? udev should create a link to your device there, named by label. If it exists you can use that link to mount the device instead of the using LABEL flag.
 
Old 05-25-2009, 04:01 AM   #7
oso_togari
Member
 
Registered: Jan 2008
Distribution: SOLARIS 9, RHEL4
Posts: 39

Original Poster
Rep: Reputation: 0
Hi...


I dont have download/installed ntfs-3g,(i dont need write access)

i only installed the ntfsprogs(to get the command i need=ntfslabel) and the kernel-module-ntfs, because i think it's enough
to manage ntfs partitions

So, you confirm me that i need ntfs-3g to mount by LABEL?

Another thing...in /dev/disk/ i only have by-path...and i dont know why?¿?¿?

[root@la_machina~disk]# pwd
/dev/disk
[root@la_machina~disk]# ls
by-path
[root@la_machina~disk]# cd by-path/
[root@la_machina~by-path]# ls -la
total 0
drwxr-xr-x 2 root root 140 may 18 11:50 .
drwxr-xr-x 3 root root 60 may 18 11:50 ..
lrwxrwxrwx 1 root root 9 may 18 11:50 pci-0000:07:00.0-scsi-0:0:0:0 -> ../../sda
lrwxrwxrwx 1 root root 10 may 18 11:50 pci-0000:07:00.0-scsi-0:0:0:0-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 may 18 11:50 pci-0000:07:00.0-scsi-0:0:0:0-part2 -> ../../sda2
lrwxrwxrwx 1 root root 9 may 18 11:50 pci-0000:07:00.0-scsi-0:0:1:0 -> ../../sdb
lrwxrwxrwx 1 root root 9 may 18 11:50 pci-0000:07:00.0-scsi-0:0:2:0 -> ../../sdc

regards
 
Old 05-25-2009, 09:08 AM   #8
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Does RHEL4 use udev? If so, it looks like your distro doesn't have the rules to create the /dev/disk/by-label symbolic links.
You could mount by ID instead or create the rules needed in /etc/udev/rules.d/ to create them.

Look at your mount manpage. I don't know if your version of mount (or mount.ntfs) will mount using LABEL= instead of the device node.

---

P.S. Looking through the 70-kpartx.rules file, I see were disk/by-id is created but not disk/by-label. I looked further and found that the /dev/disk/by-label links on my system (openSUSE) is created by a udev rule in the /lib/udev/rules.d/60-persistent-storage.rules file of my initrd file.
Code:
# probe filesystem metadata of disks
KERNEL!="sr*", IMPORT{program}="vol_id --export $tempnode"

# by-label/by-uuid links (filesystem metadata)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID_ENC}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID_ENC}"
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_ENC}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_ENC}"

LABEL="persistent_storage_end"
You could try adding the disk/by-label line in the appropriate location. Probably by inserting the line in the udev.d rule that creates your disk/by-id rule. But you may need to add a line to your initrd's init script to create the /dev/disk/by-label/ directory if it doesn't exist.

I use RCS to save my old config files before making changes (i.e. sudo ci -l /etc/X11/xorg.conf to backup xorg.conf). That way I can check out the old version if there is a problem. It also provides a way to store notes with each version where you can include reminders what changes you made. RCS is old but light weight & very handy for simple config file versioning.

Last edited by jschiwal; 05-25-2009 at 09:12 AM.
 
  


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
Tool to change the label of a NTFS disk/partition lothario Linux - Software 3 11-04-2012 09:30 AM
[SOLVED] Under /media, label does not appear as mount point. (only first one) kaz2100 Debian 3 12-04-2008 01:43 AM
ivman and label (mount point) How to?? kaz2100 Linux - Software 1 02-12-2008 11:01 PM
mount cd label paul_mat Linux - Software 1 04-20-2006 06:04 AM
mount: LABEL =/boot duplicate - not mounted Agileuk Linux - Newbie 4 09-30-2003 06:58 AM

LinuxQuestions.org > Forums > Enterprise Linux Forums > Linux - Enterprise

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