我在我的服务器上使用 ubuntu,并且只能通过 SSH 进行访问。
我需要添加新磁盘,但无论我怎么尝试都无法做到。希望得到您的帮助:
输出:fdisk -l
Disk /dev/xvdb: 53.7 GB, 53687091200 bytes
22 heads, 22 sectors/track, 216647 cylinders, total 104857600 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 identifier: 0xf9f9aaff
Device Boot Start End Blocks Id System
/dev/xvdb1 2048 104857599 52427776 83 Linux
Disk /dev/xvda: 8589 MB, 8589934592 bytes
255 heads, 63 sectors/track, 1044 cylinders, total 16777216 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 identifier: 0x000bbcb7
Device Boot Start End Blocks Id System
/dev/xvda1 2048 499711 248832 83 Linux
/dev/xvda2 501758 16775167 8136705 5 Extended
/dev/xvda5 501760 16775167 8136704 8e Linux LVM
WARNING: GPT (GUID Partition Table) detected on '/dev/xvdd'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/xvdd: 711 MB, 711983104 bytes
255 heads, 63 sectors/track, 86 cylinders, total 1390592 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 identifier: 0x42671707
Device Boot Start End Blocks Id System
/dev/xvdd1 * 0 1390591 695296 0 Empty
/dev/xvdd2 86300 90651 2176 ef EFI (FAT-12/16/32)
WARNING: GPT (GUID Partition Table) detected on '/dev/xvdd1'! The util fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/xvdd1: 711 MB, 711983104 bytes
255 heads, 63 sectors/track, 86 cylinders, total 1390592 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 identifier: 0x42671707
Device Boot Start End Blocks Id System
/dev/xvdd1p1 * 0 1390591 695296 0 Empty
/dev/xvdd1p2 86300 90651 2176 ef EFI (FAT-12/16/32)
Disk /dev/mapper/TEST--AudaHistory--vg-root: 6148 MB, 6148849664 bytes
255 heads, 63 sectors/track, 747 cylinders, total 12009472 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 identifier: 0x00000000
Disk /dev/mapper/TEST--AudaHistory--vg-root doesn't contain a valid partition table
Disk /dev/mapper/TEST--AudaHistory--vg-swap_1: 2143 MB, 2143289344 bytes
255 heads, 63 sectors/track, 260 cylinders, total 4186112 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 identifier: 0x00000000
Disk /dev/mapper/TEST--AudaHistory--vg-swap_1 doesn't contain a valid partition table
因此,正如您所看到的,我有一个 53 GB 的磁盘 xvdb,但如果我写入:
df -h
我在那里看不到他:
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/TEST--AudaHistory--vg-root 5.6G 5.0G 274M 95% /
udev 972M 4.0K 972M 1% /dev
tmpfs 399M 204K 399M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 997M 0 997M 0% /run/shm
/dev/xvda1 236M 32M 192M 14% /boot
我尝试了诸如 mount -l /dev/xvdb1 /var/www 之类的操作,但总是没有任何反应,我只得到了帮助的响应,或者我得到了写入文件系统的响应,如果我使用 ext4 或 ntfs,我只得到自动帮助的响应
有人能帮我吗?PS:我看到到处都有人忘记用这个名字创建目录,我的目录肯定是 /var/www,所以问题出在其他地方 :(
答案1
如果您不是以 root 用户身份执行此操作(我假设您不是),则需要使用 sudo。
它应该很简单sudo mount /dev/xvdb1 /var/www