根分区的硬盘空间不够了,查了下ext4格式,IRC上说不能合并分区,软链接也不行,后来我决定采用开机自动挂载,把另一块硬盘空间挂到/mnt下。

方法很简单,就是在/etc/fstab里再添一行UUID=13d28f10-fe93-4719-9ab0-4985c0015b73    /mnt         ext4  defaults    0       2

按顺序来分别是:

1硬盘的UUID.

2挂载点.

3文件格式.   ext4 

4挂载选项,这里我选的默认.

5选择是否用dump程序

 is  used  for  these  filesystems  by  the dump(8)  command  to determine which filesystems need to be dumped.  

If the fifth field is not present, a value of zero is  returned  and  dump will assume that the filesystem does not need to be dumped.

6选择是否用fsck程序检测。。。

         sixth is used by the fsck(8) program to determine the order in which filesystem checks

         are done at reboot time.  The

       root  filesystem  should  be specified with a fs_passno of 1, and other
       filesystems should have a fs_passno of 2.  Filesystems within  a  drive
       will  be checked sequentially, but filesystems on different drives will
       be checked at the same time to utilize  parallelism  available  in  the
       hardware.   If  the sixth field is not present or zero, a value of zero
       is returned and fsck will assume that the filesystem does not  need  to
       be checked.

期间犯了很多错误导致没有挂载成功,一开始挂载点设置的 /home,结果是把默认用户设在了挂载分区里,

结果可想而知,把默认用户改在了新分区。

 总之,不懂命令就多man,没有错~~ 

相关文章: