bjghzly 发表于 2018-6-20 10:29:41

挂载WINDOWS共享目录

  1、建立需要挂载的目录 mkdir /mnt/backup
  2、手动:mount -t cifs //172.16.15.51/bakcup /mnt/backup -o username=administrator,password=hbjh@2015
  3、自动连接windows共享目录
  修改/etc/fstab配置文件
  # vim /etc/fstab
  #
  # /etc/fstab
  # Created by anaconda on Mon Feb 22 16:31:18 2016
  #
  # Accessible filesystems, by reference, are maintained under '/dev/disk'
  # See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
  #
  UUID=a3f0bca3-562f-49cf-999b-24330141317e /                     ext4    defaults      1 1
  UUID=964f9756-95a4-409f-9c1f-2147efd7b948 /boot                   ext4    defaults      1 2
  UUID=d24a3d1c-3a10-4ddd-b96a-1d34d00963e3 swap                  swap    defaults      0 0
  tmpfs                   /dev/shm                tmpfs   defaults      0 0
  devpts                  /dev/pts                devptsgid=5,mode=6200 0
  sysfs                   /sys                  sysfs   defaults      0 0
  proc                  /proc                   proc    defaults      0 0
  //172.16.15.51/bakcup   /mnt/backup             cifs            auto,username=administrator,password=hbjh@2015 0         0#增加windows共享目录
  挂载的磁盘            挂载点                  文件系统类型    挂载的选项                                     备份    磁盘检查
  4、 验证挂载是否正确:df -h
  # df -h

  Filesystem            >  /dev/sda3            6.7G1.5G4.9G24% /
  tmpfs                  494M   0494M   0% /dev/shm
  /dev/sda1            194M   29M155M16% /boot
  //172.16.15.51/bakcup411G339G   72G83% /mnt/backup    #Windows挂载正常启动
  5、进入目录检查文件
  # cd /mnt/backup
  # ll
  total 12772148
  drwxr-xr-x. 0 root root          0 Sep 16 17:06 Adobe Acrobat 10 Pro
  -rwxr-xr-x. 0 root root 4467982336 May82015 CentOS-6.5-x86_64-bin-DVD1.iso
  -rwxr-xr-x. 0 root root 3368962048 Sep 10 13:29 cn_windows_server_2008_r2_standard_enterprise_datacenter_and_web_with_sp1_vl_build_x64_dvd_617396.iso
  -rwxr-xr-x. 0 root root134182051 Aug62014 DC3.1_build37.tgz
  -rwxr-xr-x. 0 root root       4575 Jun 302015 dewly.pfx
  -rwxr-xr-x. 0 root root   19065016 Oct 10 10:15 duba150921_V2015.3.3_setup.1442888834.exe
  -rwxr-xr-x. 0 root root    5406720 Oct 10 10:33 flashplayer_19_ax_debug_V19.0.0.185.1443174221.exe.dx5y7dw.partial
  drwxr-xr-x. 0 root root          0 Sep 16 17:06 HEU_KMS_Activator_v7.8.6
  drwxr-xr-x. 0 root root          0 Jan 14 15:55 HP_LJM1130_M1210_Full_Solution
  -rwxr-xr-x. 0 root root 4817616896 Jun 242015 mu_exchange_server_2013_with_sp1_x64_dvd_4059293(1).iso
  -rwxr-xr-x. 0 root root261802911 Feb22015 nsdc_pre_install.tgz
  drwxr-xr-x. 0 root root          0 Jan 21 17:53 OPEN***2310
  drwxr-xr-x. 0 root root          0 Nov7 00:14 OPEN***-2.3.8
  drwxr-xr-x. 0 root root          0 Dec1 10:48 OPEN***-USER
  drwxr-xr-x. 0 root root          0 Sep 17 17:40 putty-v0.63
  drwxr-xr-x. 0 root root          0 Sep 16 17:06 SyncToySetupPackage_v21_x64
  -rwxr-xr-x. 0 root root    3632112 Dec 242014 SyncToySetupPackage_v21_x64.rar
  -rwxr-xr-x. 0 root root       4687 Jul72015 totakeawife.pfx
  drwxr-xr-x. 0 root root          0 Sep 16 17:06 Zabbix_2.4_x86_64_13.1.x86_64-2.4.1.vhd
  #
页: [1]
查看完整版本: 挂载WINDOWS共享目录