Home > Centos, Linux > Centos mount -t cifs mount: block device is write-protected, mounting read-only mount: cannot mount block device

Centos mount -t cifs mount: block device is write-protected, mounting read-only mount: cannot mount block device

Se in Centos provando a montare una risorsa di tipo Windows share con il comando mount -t cifs ( mounting samba share )

esempio

# mount -t cifs -o username=xxxxxx //10.0.1.111/myshare /mnt/winshare

si ottiene l’errore

mount: block device //10.0.1.111/myshare is write-protected, mounting read-only
mount: cannot mount block device //10.0.1.111/myshare read-only

con tutta probabilità manca il pacchetto di utilità cifs.

In Centos 5.xx 6.xx  per risolvere il problema installare il tool cifs.utils

yum search cifs
yum install cifs-utils

Terminal output completo

# mount -t cifs -o username=xxxxxx //10.0.1.111/myshare /mnt/winshare
mount: block device //10.0.1.111/myshare is write-protected, mounting read-only
mount: cannot mount block device //10.0.1.111/myshare read-only

# yum search cifs
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile
 * base: centos.fastbull.org
 * extras: centos.fastbull.org
 * updates: centos.fastbull.org
================================ N/S Matched: cifs =================================
cifs-utils.x86_64 : Utilities for mounting and managing CIFS mounts

  Name and summary matches only, use "search all" for everything.


[root@host35-166e sysconfig]# yum install cifs-utils
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.fastbull.org
 * extras: centos.fastbull.org
 * updates: centos.fastbull.org
Resolving Dependencies
--> Running transaction check
---> Package cifs-utils.x86_64 0:4.8.1-20.el6 will be installed
--> Processing Dependency: keyutils for package: cifs-utils-4.8.1-20.el6.x86_64
--> Running transaction check
---> Package keyutils.x86_64 0:1.4-5.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================
 Package              Arch             Version                 Repository      Size
====================================================================================
Installing:
 cifs-utils           x86_64           4.8.1-20.el6            base            65 k
Installing for dependencies:
 keyutils             x86_64           1.4-5.el6               base            39 k

Transaction Summary
====================================================================================
Install       2 Package(s)

Total download size: 104 k
Installed size: 204 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): cifs-utils-4.8.1-20.el6.x86_64.rpm                    |  65 kB     00:00     
(2/2): keyutils-1.4-5.el6.x86_64.rpm                         |  39 kB     00:00     
------------------------------------------------------------------------------------
Total                                               418 kB/s | 104 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : keyutils-1.4-5.el6.x86_64                                        1/2 
  Installing : cifs-utils-4.8.1-20.el6.x86_64                                   2/2 
  Verifying  : keyutils-1.4-5.el6.x86_64                                        1/2 
  Verifying  : cifs-utils-4.8.1-20.el6.x86_64                                   2/2 

Installed:
  cifs-utils.x86_64 0:4.8.1-20.el6                                                  

Dependency Installed:
  keyutils.x86_64 0:1.4-5.el6                                                       

Complete!

Installare samba client

Loaded plugins: fastestmirror
Determining fastest mirrors
 * base: centos.fastbull.org
 * extras: centos.fastbull.org
 * updates: centos.fastbull.org
base                                                         | 3.7 kB     00:00     
extras                                                       | 3.4 kB     00:00     
updates                                                      | 3.4 kB     00:00     
updates/primary_db                                           | 2.0 MB     00:03     
================================ N/S Matched: samba ================================
samba-client.x86_64 : Samba client programs
samba-common.i686 : Files used by both Samba servers and clients
samba-common.x86_64 : Files used by both Samba servers and clients
samba-doc.x86_64 : Documentation for the Samba suite
samba-glusterfs.x86_64 : Samba VFS module for GlusterFS
samba-swat.x86_64 : The Samba SMB server Web configuration program
samba-winbind.x86_64 : Samba winbind
samba-winbind-clients.i686 : Samba winbind clients
samba-winbind-clients.x86_64 : Samba winbind clients
samba-winbind-krb5-locator.x86_64 : Samba winbind krb5 locator
samba4-client.x86_64 : Samba client programs
samba4-common.x86_64 : Files used by both Samba servers and clients
samba4-devel.x86_64 : Developer tools for Samba libraries
samba4-libs.x86_64 : Samba libraries
samba4-python.x86_64 : Samba Python libraries
samba4-swat.x86_64 : The Samba SMB server Web configuration program
samba4-test.x86_64 : Testing tools for Samba servers and clients
samba4-winbind.x86_64 : Samba winbind
samba4-winbind-clients.x86_64 : Samba winbind clients
samba4-winbind-krb5-locator.x86_64 : Samba winbind krb5 locator
sblim-cmpi-samba.i686 : SBLIM WBEM-SMT Samba
sblim-cmpi-samba.x86_64 : SBLIM WBEM-SMT Samba
sblim-cmpi-samba-devel.i686 : SBLIM WBEM-SMT Samba - Header Development Files
sblim-cmpi-samba-devel.x86_64 : SBLIM WBEM-SMT Samba - Header Development Files
sblim-cmpi-samba-test.x86_64 : SBLIM WBEM-SMT Samba - Testcase Files
ctdb.x86_64 : A Clustered Database based on Samba's Trivial Database (TDB)
samba.x86_64 : Server and Client software to interoperate with Windows machines
samba-domainjoin-gui.x86_64 : Domainjoin GUI
samba-winbind-devel.i686 : Developer tools for the winbind library
samba-winbind-devel.x86_64 : Developer tools for the winbind library
samba4.x86_64 : Server and Client software to interoperate with Windows machines
samba4-dc.x86_64 : AD Domain Controller placeholder package.
samba4-dc-libs.x86_64 : AD Domain Controller libraries placeholder package.
samba4-pidl.x86_64 : Perl IDL compiler

  Name and summary matches only, use "search all" for everything.
[root@host35-166e ~]# yum install samba-client
Loaded plugins: fastestmirror
Setting up Install Process
Loading mirror speeds from cached hostfile
 * base: centos.fastbull.org
 * extras: centos.fastbull.org
 * updates: centos.fastbull.org
Resolving Dependencies
--> Running transaction check
---> Package samba-client.x86_64 0:3.6.23-20.el6 will be installed
--> Processing Dependency: samba-winbind-clients = 3.6.23-20.el6 for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: samba-common = 3.6.23-20.el6 for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtevent.so.0(TEVENT_0.9.9)(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtdb.so.1(TDB_1.2.5)(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtdb.so.1(TDB_1.2.2)(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtdb.so.1(TDB_1.2.1)(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtalloc.so.2(TALLOC_2.0.2)(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libwbclient.so.0()(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtevent.so.0()(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtdb.so.1()(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Processing Dependency: libtalloc.so.2()(64bit) for package: samba-client-3.6.23-20.el6.x86_64
--> Running transaction check
---> Package libtalloc.x86_64 0:2.0.7-2.el6 will be installed
---> Package libtdb.x86_64 0:1.2.10-1.el6 will be installed
---> Package libtevent.x86_64 0:0.9.18-3.el6 will be installed
---> Package samba-common.x86_64 0:3.6.23-20.el6 will be installed
---> Package samba-winbind-clients.x86_64 0:3.6.23-20.el6 will be installed
--> Processing Dependency: samba-winbind = 3.6.23-20.el6 for package: samba-winbind-clients-3.6.23-20.el6.x86_64
--> Running transaction check
---> Package samba-winbind.x86_64 0:3.6.23-20.el6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================
 Package                      Arch          Version               Repository   Size
====================================================================================
Installing:
 samba-client                 x86_64        3.6.23-20.el6         base         11 M
Installing for dependencies:
 libtalloc                    x86_64        2.0.7-2.el6           base         20 k
 libtdb                       x86_64        1.2.10-1.el6          base         33 k
 libtevent                    x86_64        0.9.18-3.el6          base         26 k
 samba-common                 x86_64        3.6.23-20.el6         base         10 M
 samba-winbind                x86_64        3.6.23-20.el6         base        2.2 M
 samba-winbind-clients        x86_64        3.6.23-20.el6         base        2.0 M

Transaction Summary
====================================================================================
Install       7 Package(s)

Total download size: 25 M
Installed size: 89 M
Is this ok [y/N]: Y
Downloading Packages:
(1/7): libtalloc-2.0.7-2.el6.x86_64.rpm                      |  20 kB     00:00     
(2/7): libtdb-1.2.10-1.el6.x86_64.rpm                        |  33 kB     00:00     
(3/7): libtevent-0.9.18-3.el6.x86_64.rpm                     |  26 kB     00:00     
(4/7): samba-client-3.6.23-20.el6.x86_64.rpm                 |  11 MB     00:16     
(5/7): samba-common-3.6.23-20.el6.x86_64.rpm                 |  10 MB     00:19     
(6/7): samba-winbind-3.6.23-20.el6.x86_64.rpm                | 2.2 MB     00:03     
(7/7): samba-winbind-clients-3.6.23-20.el6.x86_64.rpm        | 2.0 MB     00:02     
------------------------------------------------------------------------------------
Total                                               610 kB/s |  25 MB     00:41     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing : libtalloc-2.0.7-2.el6.x86_64                                     1/7 
  Installing : libtevent-0.9.18-3.el6.x86_64                                    2/7 
  Installing : libtdb-1.2.10-1.el6.x86_64                                       3/7 
  Installing : samba-common-3.6.23-20.el6.x86_64                                4/7 
  Installing : samba-winbind-clients-3.6.23-20.el6.x86_64                       5/7 
  Installing : samba-winbind-3.6.23-20.el6.x86_64                               6/7 
  Installing : samba-client-3.6.23-20.el6.x86_64                                7/7 
  Verifying  : libtdb-1.2.10-1.el6.x86_64                                       1/7 
  Verifying  : samba-winbind-clients-3.6.23-20.el6.x86_64                       2/7 
  Verifying  : samba-common-3.6.23-20.el6.x86_64                                3/7 
  Verifying  : libtevent-0.9.18-3.el6.x86_64                                    4/7 
  Verifying  : libtalloc-2.0.7-2.el6.x86_64                                     5/7 
  Verifying  : samba-winbind-3.6.23-20.el6.x86_64                               6/7 
  Verifying  : samba-client-3.6.23-20.el6.x86_64                                7/7 

Installed:
  samba-client.x86_64 0:3.6.23-20.el6                                               

Dependency Installed:
  libtalloc.x86_64 0:2.0.7-2.el6       libtdb.x86_64 0:1.2.10-1.el6                
  libtevent.x86_64 0:0.9.18-3.el6      samba-common.x86_64 0:3.6.23-20.el6         
  samba-winbind.x86_64 0:3.6.23-20.el6 samba-winbind-clients.x86_64 0:3.6.23-20.el6

Complete!

Risorse:

  1. Non c'è ancora nessun commento.
  1. No trackbacks yet.

Rispondi

Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:

Logo WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione / Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione / Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione / Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione / Modifica )

Connessione a %s...

%d blogger hanno fatto clic su Mi Piace per questo: