我有一台配备 2x2TB 的服务器,但我只能访问和安装一个 2TB 磁盘。我不确定如何在运行的服务器上安装第二个 2TB 磁盘(空的)而不丢失第一个 2TB 的数据。
输出sudo fdisk -l
:
WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util
fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sda: 2000.4 GB, 2000398934016 bytes 255 heads, 63
sectors/track, 243201 cylinders, total 3907029168 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
Device Boot Start End Blocks Id System
/dev/sda1 1 3907029167 1953514583+ ee GPT
WARNING: GPT (GUID Partition Table) detected on '/dev/sdb'! The util
fdisk doesn't support GPT. Use GNU Parted.
Disk /dev/sdb: 2000.4 GB, 2000398934016 bytes 255 heads, 63
sectors/track, 243201 cylinders, total 3907029168 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
Device Boot Start End Blocks Id System
/dev/sdb1 1 3907029167 1953514583+ ee GPT
Disk /dev/md3: 1978.9 GB, 1978886193152 bytes 2 heads, 4
sectors/track, 483126512 cylinders, total 3865012096 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/md3 doesn't contain a valid partition table
Disk /dev/md2: 21.0 GB, 20970405888 bytes 2 heads, 4 sectors/track,
5119728 cylinders, total 40957824 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/md2 doesn't contain a valid partition table
输出df -h
:
Filesystem Size Used Avail Use% Mounted on
rootfs 20G 4.2G 14G 23% /
/dev/root 20G 4.2G 14G 23% /
devtmpfs 7.9G 4.0K 7.9G 1% /dev
none 1.6G 284K 1.6G 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 7.9G 0 7.9G 0% /run/shm
/dev/md3 1.8T 416G 1.3T 25% /home
sudo mdadm --detail /dev/md3 的输出
/dev/md3:
Version : 0.90
Creation Time : Wed Jul 13 11:34:23 2016
Raid Level : raid1
Array Size : 1932506048 (1842.98 GiB 1978.89 GB)
Used Dev Size : 1932506048 (1842.98 GiB 1978.89 GB)
Raid Devices : 2
Total Devices : 2
Preferred Minor : 3
Persistence : Superblock is persistent
Intent Bitmap : Internal
Update Time : Sat Oct 29 12:30:25 2016
State : active
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
UUID : 0fe79156:bfd477c3:a4d2adc2:26fd5302
Events : 0.15411
Number Major Minor RaidDevice State
0 8 3 0 active sync /dev/sda3
1 8 19 1 active sync /dev/sdb3
答案1
您没有指定打算如何使用此磁盘。附加数据或 /home?还是 RAID 的一部分?(steeldriver 提出了一个很好的问题)。
如果您只想将其用作额外的存储空间......
如果第二块硬盘确实是空的(它已经有 gpt 分区表),则您需要在尝试挂载它之前在其上创建一个分区。从仪表板启动 gparted。等待它询问您的磁盘。选择 sdb(应该是您的第二块硬盘)。确认没有现有分区。在 EXT4 中创建一个新分区并命名。然后右键单击新创建的分区并选择 MOUNT。这应该可以快速启动。然后了解如何将其添加到您的 /etc/fstab 文件中。