• linux分期挂载永久生效


    http://www.2cto.com/os/201404/294628.html

    mount /dev/sdb5 /mnt  将逻辑分区sdb5挂载到/mnt目录下

    挂载要确定目标目录没有其他的挂载文件,挂载时新建一个文件夹

    永久挂载:

    永久性挂载分区的办法是修改分区文件/etc/fstab

    blkid /dev/sda5

    得到:/dev/sdb5: UUID="2ade539e-ec2c-4135-a174-961608b3d6ca" TYPE="ext4" 


    再/etc/fstab文件中加上

    UUID=2ade539e-ec2c-4135-a174-961608b3d6ca /mnt/mountsdb5/ ext4 defaults 0 0

    其中第一列为UUID, 第二列为挂载目录(该目录必须为空目录),第三列为文件系统类型,第四列为参数,第五列0表示不备份,最后一列必须为2或0(除非引导分区为1)

    重启:reboot  init 6

    df -h  看到sdb5挂载到了/mnt/mountsdb5下

    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/VolGroup-lv_root
    45G 3.7G 39G 9% /
    tmpfs 936M 76K 936M 1% /dev/shm
    /dev/sda1 485M 38M 423M 9% /boot
    /dev/sdb5 873M 17M 812M 3% /mnt/mountsdb5
    /dev/sr0 4.1G 4.1G 0 100% /media/CentOS_6.4_Final

    #
    # /etc/fstab
    # Created by anaconda on Tue Apr 19 05:49:25 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
    #
    /dev/mapper/VolGroup-lv_root / ext4 defaults 1 1
    UUID=af3a5064-0f2d-4d34-a0e3-89eead2050a7 /boot ext4 defaults 1 2
    /dev/mapper/VolGroup-lv_swap swap swap defaults 0 0
    tmpfs /dev/shm tmpfs defaults 0 0
    devpts /dev/pts devpts gid=5,mode=620 0 0
    sysfs /sys sysfs defaults 0 0
    proc /proc proc defaults 0 0

    UUID=2ade539e-ec2c-4135-a174-961608b3d6ca /mnt/mountsdb5/ ext4 defaults 0 0






  • 相关阅读:
    Linux踩坑填坑记录
    Scala安装后,在IDEA中配置
    Centos 搭建Hadoop
    conductor FAQ
    conductor Workflow Metrics
    conductor APIs
    Extending Conductor
    conductor任务域
    Conductor Task Workers
    Conductor Server
  • 原文地址:https://www.cnblogs.com/my-ShowTime/p/5425300.html
Copyright © 2020-2023  润新知