If you see the following error on linux following a change on samba shares;
cifs vfs error on 0xxxxfff or on cifs_get_inode_Info in lookup
then check the fstab to make sure entries are correct, then umount and mount again
may have to do a umount -f in some instances
Showing posts with label changing / remapping a samba share (windows share on linux host). Show all posts
Showing posts with label changing / remapping a samba share (windows share on linux host). Show all posts
Monday, 18 May 2009
Nfs - Stale File Handle issues with samba share
if you get the following sorts of errors when trying to access a samba share;
either
NFS- STALE FILE HANDLE, or you get a permission denied, then just umount and remount and that could do the trick;
eufratt0015 # ls -lrt
ls: ATT-ATT: Permission denied
ls: QUID-2-RAT: Permission denied
total 28
drwxr-xr-x 2 wesdfesvc1 websss 4096 Jan 3 2006 sasdas
drwxrwxr-x 10 wdasdc1 websss 8192 Feb 20 2006 ATadasdsave
drwxrwxr-x 2 weasdasbssvc1 websss 4096 Feb 21 2006 ATdasdgr
eufratt0015 # umount QUID-2-RAT
eufratt0015 # mount QUID-2-RAT
eudt0055 # df -k
...........................
//10.1.218.122/QUID-2-RAT$
9446188 6251188 3195000 67% /app/att/QUID-2-RAT
# cd QUID-2-RAT
# pwd
/app/att/QUID-2-RAT
# ls
ATT-EnApplication2.zip ATT-EnApplication.zip
either
NFS- STALE FILE HANDLE, or you get a permission denied, then just umount and remount and that could do the trick;
eufratt0015 # ls -lrt
ls: ATT-ATT: Permission denied
ls: QUID-2-RAT: Permission denied
total 28
drwxr-xr-x 2 wesdfesvc1 websss 4096 Jan 3 2006 sasdas
drwxrwxr-x 10 wdasdc1 websss 8192 Feb 20 2006 ATadasdsave
drwxrwxr-x 2 weasdasbssvc1 websss 4096 Feb 21 2006 ATdasdgr
eufratt0015 # umount QUID-2-RAT
eufratt0015 # mount QUID-2-RAT
eudt0055 # df -k
...........................
//10.1.218.122/QUID-2-RAT$
9446188 6251188 3195000 67% /app/att/QUID-2-RAT
# cd QUID-2-RAT
# pwd
/app/att/QUID-2-RAT
# ls
ATT-EnApplication2.zip ATT-EnApplication.zip
Friday, 15 May 2009
samba and linux - changing the ip address of a mount point aka changing / remapping a samba share (windows share on linux host)
lots of pitfalls in this one, but essentially check the following;
1) the /etc/fstab, as this will give you lots of clues;
more /etc/fstab
................................
//10.3.128.132/ATT-2-QED$ /app/att/ATT-2-QUID cifs credentials=/e
tc/samba/cred_att_win,uid=wbsssssss1,gid=wbssssssphere,directio 0 0
//10.3.128.132/QED-2-ATT$ /app/att/QED-2-RAT cifs credentials=/e
tc/samba/cred_att_win,uid=wbsssssss1,gid=wbssssssphere,directio 0 0
Okay, some useful things there - it already tells you the IP of the remote windows share to mount. It also tells you there is a credentials file, so that when you come to mount the amended share, you can read this file in or use it to get the username and pw to make the command execute (more later)
2) check the smb.conf to clarify the mount
# Remote mount for ATT WebSphere read only
[websphere]
comment = ATT WebSphere Read Only Share
path = /app/WebSphere
valid users = gbwhoa
public = no
writable = no
printable = no
3) Please remember to umount the existing mount (ie in this case /app/att/ATT-2-QUID) or else you will get all sorts of pain, like trying to run the mount or smbmount command will return with
Could not resolve mount point /app/WebSphere/att/ATT-2-QED
or trying find the dir in the /app/att area will return a
ls: /app/att/ATT-2-QUID: Host is down
ls: /app/att/QED-2-RAT: Host is down
and trying to mkdir QED-2-RAT under /app/att will get
eudt0055 # mkdir ATT-2-QED
mkdir: cannot create directory `ATT-2-QUID': File exists
so remember - umount the dir!
eudt0055 # umount /app/att/ATT-2-QUID
eudt0055 # smbmount //10.3.218.132/ATT-2-QUID$ /app/att/ATT-2-QUID -o username=ATT-ATT,password=xxxxxxxx
eudt0055 # umount QED-2-RAT
eudt0055 # smbmount //10.3.218.132/QED-2-RAT$ /app/att/QED-2-RAT -o username=ATT-ATT,password=xxxxxxxx
make the change in fstab as well and then if you get the following;
eudt0055 # df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 10321032 5040564 4756192 52% /
/dev/cciss/c0d0p2 6192608 160148 5717892 3% /home
none 2015508 0 2015508 0% /dev/shm
/dev/cciss/c0d0p3 6192608 348416 5529624 6% /var
/dev/cciss/c0d0p6 43175112 39522916 1458996 97% /app
df: `/app/WebSphere/att/ATT-2-QED': Permission denied
df: `/app/WebSphere/att/QED-2-ATT': Permission denied
eudt0055 #
umount the mount point and then mount it again
You can also have a 'accreditation' file, under /etc/samba, that contains password and username of user who share belongs to - the file can be called whatever you want it to be called, just vi the file and put username and password like this;
username=user
password=pass
and then in the fstab make explicit;
//10.3.128.132/ATT-2-QED$ /app/att/ATT-2-QUID cifs credentials=/e
tc/samba/cred_att_win,uid=wbsssssss1,gid=wbssssssphere,directio 0 0
1) the /etc/fstab, as this will give you lots of clues;
more /etc/fstab
................................
//10.3.128.132/ATT-2-QED$ /app/att/ATT-2-QUID cifs credentials=/e
tc/samba/cred_att_win,uid=wbsssssss1,gid=wbssssssphere,directio 0 0
//10.3.128.132/QED-2-ATT$ /app/att/QED-2-RAT cifs credentials=/e
tc/samba/cred_att_win,uid=wbsssssss1,gid=wbssssssphere,directio 0 0
Okay, some useful things there - it already tells you the IP of the remote windows share to mount. It also tells you there is a credentials file, so that when you come to mount the amended share, you can read this file in or use it to get the username and pw to make the command execute (more later)
2) check the smb.conf to clarify the mount
# Remote mount for ATT WebSphere read only
[websphere]
comment = ATT WebSphere Read Only Share
path = /app/WebSphere
valid users = gbwhoa
public = no
writable = no
printable = no
3) Please remember to umount the existing mount (ie in this case /app/att/ATT-2-QUID) or else you will get all sorts of pain, like trying to run the mount or smbmount command will return with
Could not resolve mount point /app/WebSphere/att/ATT-2-QED
or trying find the dir in the /app/att area will return a
ls: /app/att/ATT-2-QUID: Host is down
ls: /app/att/QED-2-RAT: Host is down
and trying to mkdir QED-2-RAT under /app/att will get
eudt0055 # mkdir ATT-2-QED
mkdir: cannot create directory `ATT-2-QUID': File exists
so remember - umount the dir!
eudt0055 # umount /app/att/ATT-2-QUID
eudt0055 # smbmount //10.3.218.132/ATT-2-QUID$ /app/att/ATT-2-QUID -o username=ATT-ATT,password=xxxxxxxx
eudt0055 # umount QED-2-RAT
eudt0055 # smbmount //10.3.218.132/QED-2-RAT$ /app/att/QED-2-RAT -o username=ATT-ATT,password=xxxxxxxx
make the change in fstab as well and then if you get the following;
eudt0055 # df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/cciss/c0d0p1 10321032 5040564 4756192 52% /
/dev/cciss/c0d0p2 6192608 160148 5717892 3% /home
none 2015508 0 2015508 0% /dev/shm
/dev/cciss/c0d0p3 6192608 348416 5529624 6% /var
/dev/cciss/c0d0p6 43175112 39522916 1458996 97% /app
df: `/app/WebSphere/att/ATT-2-QED': Permission denied
df: `/app/WebSphere/att/QED-2-ATT': Permission denied
eudt0055 #
umount the mount point and then mount it again
You can also have a 'accreditation' file, under /etc/samba, that contains password and username of user who share belongs to - the file can be called whatever you want it to be called, just vi the file and put username and password like this;
username=user
password=pass
and then in the fstab make explicit;
//10.3.128.132/ATT-2-QED$ /app/att/ATT-2-QUID cifs credentials=/e
tc/samba/cred_att_win,uid=wbsssssss1,gid=wbssssssphere,directio 0 0
Subscribe to:
Posts (Atom)
