主要采用以上链接的方法,后来发现id老是变,总是挂载不成功
后来发现需要这样加才能挂载成功
/dev/sdb /code ext4 defaults 0 2
cat /etc/fstab
# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/sda1 during installation
UUID=3825fe43-010d-48e7-b9d4-402e045e1a7b / ext4 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
UUID=4f7a25e5-a3bf-401a-ab26-f18e54694b66 none swap sw 0 0
#UUID=b0c7da36-d120-4bac-9bc6-21219c46bf51 /code ext4 defaults 0 3
/dev/sdb /code ext4 defaults 0 2