磁盘挂载:
1.查看当前有哪些硬盘挂载着
fdisk -l
Disk /dev/xvdb: 404.8 GB, 404800667648 bytes
255 heads, 63 sectors/track, 49214 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/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x000f2f6a
2.尝试挂载 /dev/xvdb 到 /data 目录
mkdir /data
mount /dev/xvdb /data
3.如果报错:
mount:you must specify the filesystem type
3.1.格式化当前的设备
mkfs.ext4 /dev/xvdb
注意:首先 df -T -h 查看当前被挂载的设备的文件系统类型
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
ext4 16G 795M 14G 6% /
tmpfs tmpfs 5.8G 0 5.8G 0% /dev/shm
/dev/xvda1 ext4 485M 32M 429M 7% /boot
如果其他的硬盘是 ext3 就使用 mkfs.ext3 /dev/xvdb
如果是ext4 就使用 mkfs.ext3 /dev/xvdb
3.2.然后再次尝试挂载设备
mount /dev/xvdb /data
1.查看当前有哪些硬盘挂载着
fdisk -l
Disk /dev/xvdb: 404.8 GB, 404800667648 bytes
255 heads, 63 sectors/track, 49214 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/xvda: 21.5 GB, 21474836480 bytes
255 heads, 63 sectors/track, 2610 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: 0x000f2f6a
2.尝试挂载 /dev/xvdb 到 /data 目录
mkdir /data
mount /dev/xvdb /data
3.如果报错:
mount:you must specify the filesystem type
3.1.格式化当前的设备
mkfs.ext4 /dev/xvdb
注意:首先 df -T -h 查看当前被挂载的设备的文件系统类型
Filesystem Type Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
ext4 16G 795M 14G 6% /
tmpfs tmpfs 5.8G 0 5.8G 0% /dev/shm
/dev/xvda1 ext4 485M 32M 429M 7% /boot
如果其他的硬盘是 ext3 就使用 mkfs.ext3 /dev/xvdb
如果是ext4 就使用 mkfs.ext3 /dev/xvdb
3.2.然后再次尝试挂载设备
mount /dev/xvdb /data