ubuntu挂载新硬盘
root@luo-All-Series:~# fdisk -l
Disk /dev/loop0: 320.2 MiB, 335728640 bytes, 655720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop1: 124 MiB, 129978368 bytes, 253864 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop2: 54.4 MiB, 57069568 bytes, 111464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop3: 53.7 MiB, 56315904 bytes, 109992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop4: 1008 KiB, 1032192 bytes, 2016 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop5: 89.3 MiB, 93581312 bytes, 182776 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop6: 35.3 MiB, 37027840 bytes, 72320 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop7: 3.7 MiB, 3821568 bytes, 7464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/sda: 111.8 GiB, 120034123776 bytes, 234441648 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: E3D9E371-559B-497A-920B-9D4AA3111DEE
Device Start End Sectors Size Type
/dev/sda1 2048 1050623 1048576 512M EFI System
/dev/sda2 1050624 201013247 199962624 95.4G Linux filesystem
/dev/sda3 201013248 234440703 33427456 16G Linux swap
Disk /dev/sdb: 931.5 GiB, 1000204886016 bytes, 1953525168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x7b50fce7
Device Boot Start End Sectors Size Id Type
/dev/sdb1 2048 1953488895 1953486848 931.5G 7 HPFS/NTFS/exFAT
Disk /dev/sdc: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x20f0f0e5
Device Boot Start End Sectors Size Id Type
/dev/sdc1 2048 3907029167 3907027120 1.8T 83 Linux
Disk /dev/loop8: 88.7 MiB, 92983296 bytes, 181608 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop9: 34.8 MiB, 36503552 bytes, 71296 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop10: 124.3 MiB, 130367488 bytes, 254624 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop11: 2.3 MiB, 2355200 bytes, 4600 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop12: 140.7 MiB, 147501056 bytes, 288088 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop13: 1008 KiB, 1032192 bytes, 2016 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop14: 295.9 MiB, 310247424 bytes, 605952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop15: 297.1 MiB, 311484416 bytes, 608368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop16: 151 MiB, 158347264 bytes, 309272 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop17: 89.4 MiB, 93720576 bytes, 183048 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop18: 3.7 MiB, 3825664 bytes, 7472 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop19: 3.7 MiB, 3821568 bytes, 7464 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop20: 151 MiB, 158343168 bytes, 309264 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop21: 14.8 MiB, 15462400 bytes, 30200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop22: 14.5 MiB, 15208448 bytes, 29704 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop23: 140.7 MiB, 147496960 bytes, 288080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop24: 14.8 MiB, 15458304 bytes, 30192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop25: 140.7 MiB, 147496960 bytes, 288080 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop26: 14.8 MiB, 15462400 bytes, 30200 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop27: 4 MiB, 4218880 bytes, 8240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop28: 4 MiB, 4214784 bytes, 8232 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop29: 149.9 MiB, 157192192 bytes, 307016 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop30: 42.8 MiB, 44879872 bytes, 87656 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/loop31: 53.7 MiB, 56315904 bytes, 109992 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~# sudo mkfs -t ext4 /dev/sdc
mke2fs 1.44.1 (24-Mar-2018)
Found a dos partition table in /dev/sdc
Proceed anyway? (y,N) y
Discarding device blocks: done
Creating filesystem with 488378646 4k blocks and 122101760 inodes
Filesystem UUID: 6642c53f-6b90-4598-8717-7dba039a0fd2
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872, 71663616, 78675968,
102400000, 214990848
Allocating group tables: done
Writing inode tables: done
Creating journal (262144 blocks): done
Writing superblocks and filesystem accounting information: done
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
udev 12287984 0 12287984 0% /dev
tmpfs 2462000 2016 2459984 1% /run
/dev/sda2 98281092 88674436 4591208 96% /
tmpfs 12309992 66376 12243616 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 12309992 0 12309992 0% /sys/fs/cgroup
/dev/loop0 327936 327936 0 100% /snap/pycharm-community/147
/dev/loop1 126976 126976 0 100% /snap/vscode/89
/dev/loop2 55808 55808 0 100% /snap/core18/1074
/dev/loop3 55040 55040 0 100% /snap/core18/782
/dev/loop6 36224 36224 0 100% /snap/gtk-common-themes/1198
/dev/loop9 35712 35712 0 100% /snap/gtk-common-themes/1122
/dev/loop4 1024 1024 0 100% /snap/gnome-logs/61
/dev/loop7 3840 3840 0 100% /snap/gnome-system-monitor/77
/dev/loop5 91392 91392 0 100% /snap/core/6673
/dev/loop10 127360 127360 0 100% /snap/vscode/93
/dev/loop8 90880 90880 0 100% /snap/core/7396
/dev/loop11 2304 2304 0 100% /snap/gnome-calculator/260
/dev/loop13 1024 1024 0 100% /snap/gnome-logs/57
/dev/loop15 304256 304256 0 100% /snap/pycharm-community/128
/dev/loop16 154752 154752 0 100% /snap/gnome-3-28-1804/40
/dev/loop17 91648 91648 0 100% /snap/core/6818
/dev/loop12 144128 144128 0 100% /snap/gnome-3-26-1604/90
/dev/loop14 302976 302976 0 100% /snap/pycharm-community/123
/dev/loop19 3840 3840 0 100% /snap/gnome-system-monitor/81
/dev/loop20 154752 154752 0 100% /snap/gnome-3-28-1804/36
/dev/loop18 3840 3840 0 100% /snap/gnome-system-monitor/100
/dev/loop21 15104 15104 0 100% /snap/gnome-characters/254
/dev/loop22 14976 14976 0 100% /snap/gnome-logs/45
/dev/loop23 144128 144128 0 100% /snap/gnome-3-26-1604/82
/dev/loop24 15104 15104 0 100% /snap/gnome-characters/258
/dev/loop25 144128 144128 0 100% /snap/gnome-3-26-1604/78
/dev/loop26 15104 15104 0 100% /snap/gnome-characters/317
/dev/loop28 4224 4224 0 100% /snap/gnome-calculator/352
/dev/loop27 4224 4224 0 100% /snap/gnome-calculator/406
/dev/loop29 153600 153600 0 100% /snap/gnome-3-28-1804/71
/dev/loop30 43904 43904 0 100% /snap/gtk-common-themes/1313
/dev/loop31 55040 55040 0 100% /snap/core18/941
/dev/sda1 523248 2284 520964 1% /boot/efi
tmpfs 2461996 16 2461980 1% /run/user/122
tmpfs 2461996 48 2461948 1% /run/user/1000
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~# sudo mount -t ext4 /dev/sdc /dev/disk_2019
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~# df -l
Filesystem 1K-blocks Used Available Use% Mounted on
udev 12287984 0 12287984 0% /dev
tmpfs 2462000 2016 2459984 1% /run
/dev/sda2 98281092 88674532 4591112 96% /
tmpfs 12309992 57160 12252832 1% /dev/shm
tmpfs 5120 4 5116 1% /run/lock
tmpfs 12309992 0 12309992 0% /sys/fs/cgroup
/dev/loop0 327936 327936 0 100% /snap/pycharm-community/147
/dev/loop1 126976 126976 0 100% /snap/vscode/89
/dev/loop2 55808 55808 0 100% /snap/core18/1074
/dev/loop3 55040 55040 0 100% /snap/core18/782
/dev/loop6 36224 36224 0 100% /snap/gtk-common-themes/1198
/dev/loop9 35712 35712 0 100% /snap/gtk-common-themes/1122
/dev/loop4 1024 1024 0 100% /snap/gnome-logs/61
/dev/loop7 3840 3840 0 100% /snap/gnome-system-monitor/77
/dev/loop5 91392 91392 0 100% /snap/core/6673
/dev/loop10 127360 127360 0 100% /snap/vscode/93
/dev/loop8 90880 90880 0 100% /snap/core/7396
/dev/loop11 2304 2304 0 100% /snap/gnome-calculator/260
/dev/loop13 1024 1024 0 100% /snap/gnome-logs/57
/dev/loop15 304256 304256 0 100% /snap/pycharm-community/128
/dev/loop16 154752 154752 0 100% /snap/gnome-3-28-1804/40
/dev/loop17 91648 91648 0 100% /snap/core/6818
/dev/loop12 144128 144128 0 100% /snap/gnome-3-26-1604/90
/dev/loop14 302976 302976 0 100% /snap/pycharm-community/123
/dev/loop19 3840 3840 0 100% /snap/gnome-system-monitor/81
/dev/loop20 154752 154752 0 100% /snap/gnome-3-28-1804/36
/dev/loop18 3840 3840 0 100% /snap/gnome-system-monitor/100
/dev/loop21 15104 15104 0 100% /snap/gnome-characters/254
/dev/loop22 14976 14976 0 100% /snap/gnome-logs/45
/dev/loop23 144128 144128 0 100% /snap/gnome-3-26-1604/82
/dev/loop24 15104 15104 0 100% /snap/gnome-characters/258
/dev/loop25 144128 144128 0 100% /snap/gnome-3-26-1604/78
/dev/loop26 15104 15104 0 100% /snap/gnome-characters/317
/dev/loop28 4224 4224 0 100% /snap/gnome-calculator/352
/dev/loop27 4224 4224 0 100% /snap/gnome-calculator/406
/dev/loop29 153600 153600 0 100% /snap/gnome-3-28-1804/71
/dev/loop30 43904 43904 0 100% /snap/gtk-common-themes/1313
/dev/loop31 55040 55040 0 100% /snap/core18/941
/dev/sda1 523248 2284 520964 1% /boot/efi
tmpfs 2461996 16 2461980 1% /run/user/122
tmpfs 2461996 56 2461940 1% /run/user/1000
/dev/sdc 1921803544 77852 1824033580 1% /dev/disk_2019
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~# sudo vim /etc/fstab
root@luo-All-Series:~#
root@luo-All-Series:~#
root@luo-All-Series:~#
参考:https://blog.51cto.com/12348890/2092339