|
||||||
| Forums FAQ | Members List | Search | Today's Posts | Mark Forums Read |
| Network/Internet Questions about internet applications, network configuration, usage (SAMBA, network printing, NFS) |
![]() |
|
|
|
LinkBack | Thread Tools | Display Modes |
|
||||
|
No opinions? I'll try clarify my request.
I have a XP box on which there are 4 drives formatted as NTFS that I need to mount on my openSUSE laptop. The XP box is on the same LAN and subnet as my openSUSE laptop. At the moment I have a script which I manually run to mount these remote filesystems. I'm looking for a way to automate this so they mount at boot. I know I can just run the script at boot or login but I have a few concerns with how thngs are handles in the event of no network available.
__________________
IBM Thinkpad X60s | Intel L2400 1.66Ghz | Mesa DRI Intel 945GM video | 3GB Ram openSuSE 11.1 | Linux 2.6.27.29-0.1 pae i686 | KDE 4.3.3 |
|
|||
|
The correct way is to use the smbfs service (/etc/init.d/smbfs). This reads /etc/samba/smbfstab which contains a list of filesystems to mount. It also is sequenced after the network is up so that it won't before that happens. It's probably configured from YaST. I'm guessing, but yast2-samba-client looks like the required package for the YaST menus.
However I don't use it myself, this is what I deduce from reading the comments and knowing how init scripts work. Maybe swerdna can explain it in more detail. |
|
|||
|
suse tpx60s wrote:
> No opinions? I'll try clarify my request. > > I have a XP box on which there are 4 drives formatted as NTFS that I > need to mount on my openSUSE laptop. The XP box is on the same LAN and > subnet as my openSUSE laptop. At the moment I have a script which I > manually run to mount these remote filesystems. I'm looking for a way to > automate this so they mount at boot. > I know I can just run the script at boot or login but I have a few > concerns with how thngs are handles in the event of no network > available. Well, that's a matter of taste. I don't mount samba shares, just access the resources via konqueror and smb:// protocol. But sometines it is usefull to create a static mount point by: - Editing /etc/fstab and add an entry for your ntfs static mount point - Going to yast / system / runlevel editor and enable "smbfs" which says is for "import remote smb/cifs filesystems". And just try :-) > - What happens if the path to the filesystem is not avaialble, e.g. > I'm not connected to the network at the time of booting or login? I'm > assuming the mount just fails without any further problems. smbfs script should handle a failure like this at boot time. If cannot connect with the remote resource, whatever reason, it will just say "smsfs service.... failed or timeout" and the mount point will not be present once you login. You can manually mount it later. > - What happens if I've mounted the remote filesystem and the network > then fails? Will I get data corruption? What happens to the mounted > filesystem? Do I need to unmount it? Is there an elegant way to > automatically have the system handle such events? The behavior should be same you get when working with a device or resource that is not available over the network. You just can't access to that device or if currently working or managing the files, they just become unaccessible. > I'm basically looking for the best practice for mounting remote NTFS > filesystems reliably and safely. "Test and error" is sometimes a good start point :-) BTW, I am a bit reluctant with the status of the "ntfs-3g" driver to handle writing operations. People say is quite safe but I am not so sure about that :-/ Greetings, -- Camaleón |
|
|||
|
Camaleón wrote:
> BTW, I am a bit reluctant with the status of the "ntfs-3g" driver to > handle writing operations. People say is quite safe but I am not so sure > about that :-/ Oops, my fault O:-) I was thinking on locally connected devices (i.e., usb hard disks) that use "ntfs-3g" driver to handle ntfs filesystem, but this does not apply when accessing or mounting a remote filesystem over the network. Sorry for the mess. Greetings, -- Camaleón |
|
||||
|
Quote:
p, li { white-space: pre-wrap; } /etc/init.d/smbfs start returned 6 (program is not configured): How do I get the service started? I have the samba-client installed but not samba. From everything I've read only the samba-client is required for accessing windows shares as I don't intend to share anything on my Linux system. Do I still need to install samba for this to work? I can manually mount and rwx everything on the XP box as things are at the moment. My smbfstab like like this: Code:
//IP_address_of_XP_box/shared_drive /path_to/mount_point cifs sername="user name",password=password
__________________
IBM Thinkpad X60s | Intel L2400 1.66Ghz | Mesa DRI Intel 945GM video | 3GB Ram openSuSE 11.1 | Linux 2.6.27.29-0.1 pae i686 | KDE 4.3.3 |
|
|||
|
I don't know what's with the YaST interface, but try this from the CLI, as root of course:
chkconfig --set smbfs on rcsmbfs start and report back. |
|
||||
|
Ok, I ran those commands. The second one returned
Code:
Mount CIFS File Systems unused To be clear I ran those commands from a terminal as su.
__________________
IBM Thinkpad X60s | Intel L2400 1.66Ghz | Mesa DRI Intel 945GM video | 3GB Ram openSuSE 11.1 | Linux 2.6.27.29-0.1 pae i686 | KDE 4.3.3 |
|
|||
|
Do this, which will give you a trace as it runs smbfs start:
sh -x /etc/init.d/smbfs start I bet it isn't finding a valid line from smbfstab. |
|
||||
|
This is the output. Unfortunately it doesn't mean much to me. I did see a rc_status=6 which i assume is that the service isn't running.
Code:
sh -x /etc/init.d/smbfs start
+ . /etc/rc.status
++ LC_ALL=POSIX
++ export LC_ALL
++ trap rc_lc SIGWINCH
++ rc_lc
++ test -n ''
+++ stty size
++ set -- 32 79
++ LINES=32
++ COLUMNS=79
++ test 32 -eq 0
++ test 79 -eq 0
++ export LINES COLUMNS
++ case ":$PATH:" in
++ test -t 1 -a xterm '!=' raw -a xterm '!=' dumb
++ stty size
+++ echo -en '\033'
++ esc=$'\E'
++ extd=''
++ warn=''
++ done=''
++ attn=''
+++ echo -en '\017'
++ norm=''
+++ echo -en '\015 '
++ stat=' '
++ rc_done=' done'
++ rc_running=' running'
++ rc_failed=' failed'
++ rc_missed=' missing'
++ rc_skipped=' skipped'
++ rc_dead=' dead'
++ rc_unused=' unused'
++ rc_unknown=' failed''
++ rc_reset=''p='
++ rc_save=''
++ rc_restor'='
++ _rc_service=/etc/init.d/smbfs
++ _rc_status=0
++ _rc_status_all=0
++ _rc_todo=start
++ test start = status
++ test -n start
++ cmdline=
+ rc_reset
+ _rc_status=0
+ _rc_status_all=0
+ rc_check
+ _rc_status_ret=0
+ test 0 -eq 0
+ test 0 -eq 0
+ return 0
+ return 0
+ LC_ALL=en_US
+ SMBFSTAB=/etc/samba/smbfstab
+ SMB_CONF=/etc/samba/smb.conf
+ SMBFS_STATE_FILE=/var/lock/subsys/smbfs
+ SLEEP=1
+ TIMEOUT=10
+ grep -q ' cifs ' /proc/mounts
+ test 1 -eq 0
+ smbfs_used=no
+ case "$1" in
+ grep -q '^[[:space:]]*[^#].*[[:space:]]cifs[[:space:]]' /etc/fstab
+ rc=1
+ '[' '!' -f /etc/samba/smbfstab -a 1 -ne 0 ']'
+ echo -n 'Mount CIFS File Systems '
Mount CIFS File Systems + service_used=no
+ '[' 1 -eq 0 ']'
+ timer=-1
+ test -e /etc/samba/smbfstab
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ case "${service}" in
+ continue
+ read service mountpoint vfstype options
+ test no = no
+ rc_status -u
+ rc_check
+ _rc_status_ret=0
+ test 0 -eq 0
+ test 0 -eq 0
+ return 0
+ test 0 -gt 7
+ _rc_status_ret=0
+ case "$_rc_todo" in
+ local i
+ for i in '"$@"'
+ case "$i" in
+ echo -e ' unused'
unused
+ rc_failed 6
+ rc_reset
+ _rc_status=0
+ _rc_status_all=0
+ rc_check
+ _rc_status_ret=0
+ test 0 -eq 0
+ test 0 -eq 0
+ return 0
+ return 0
+ case "$1" in
+ _rc_status=6
+ rc_check
+ _rc_status_ret=0
+ test 0 -eq 0
+ test 6 -eq 0
+ _rc_status_all=6
+ return 0
+ return 6
+ return 0
+ touch /var/lock/subsys/smbfs
+ rc_exit
+ exit 6
__________________
IBM Thinkpad X60s | Intel L2400 1.66Ghz | Mesa DRI Intel 945GM video | 3GB Ram openSuSE 11.1 | Linux 2.6.27.29-0.1 pae i686 | KDE 4.3.3 |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|