Linux查看与挂载新磁盘
新创建的Linux系统,明明给的是120GB的磁盘空间。
在系统通过df -h查看磁盘空间却没有这么多,原因是磁盘未挂载到系统所致,
df -h 查看磁盘占用情况,却发现插入的一块硬盘/dev/sda 消失了 是磁盘坏了还是没被系统识别。
通过命令fdisk -l
Disk /dev/sda: 128.8 GB, 128849018880 bytes
255 heads, 63 sectors/track, 15665 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00024b43
Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 5222 41430016 8e Linux LVM
Disk /dev/mapper/VolGroup-lv_root: 38.3 GB, 38260441088 bytes
255 heads, 63 sectors/track, 4651 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
Disk /dev/mapper/VolGroup-lv_swap: 4160 MB, 4160749568 bytes
255 heads, 63 sectors/track, 505 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000
可见/dev/sda 是存在的, 只需要mount就好,
2.新建一个文件夹,作为将来访问 sda的标识,
[root@localhost ~]# mkdir /data1
3. 查看磁盘sda1
的文件系统类型
4.挂载磁盘sda1到data1
5. 用df -h 可以查看到新挂载的磁盘sda1.
lsblk 查看当前磁盘情况
df -lh 查看文件系统情况 -l 查看挂载点
parted -l 会列出文件系统类型
fdisk -l 查看当前未挂载硬盘