我尝试在14.04 64位桌面版上使用3个500GB SATA硬盘设置一个大型LVM磁盘。安装过程中出现设备错误导致失败。我找到了一个链接,说扩展的限制是256G以上的驱动器,但我不知道这是否适用于此情况。
从Live CD的"试用Ubuntu而不安装"选项中,您仍然可以安装MDADM。但仍然没有运气。GParted检测似乎有些问题,无法识别LVM中的某些卷或RAID /dev/mdX中的某些卷,除非已经给每个卷分配了文件系统。
$ sudo mkfs.etx4 /dev/md2
此外,RAID配置现在带来了更多的挑战。MDADM似乎不再添加到安装的/target/usr/sbin软件包列表中,而且在那里安装它以便在重新启动时开始安装将是一项巨大的任务,我根本没有时间或耐心,只是为了发现几个小时后它仍然无法在这些新的Windows 8性能改进的主板(UEFI)上启动(由于GRUB问题)。
$ sudo fdisk -l
Device Boot Start End Blocks Id System
/dev/sda1 2048 616447 307200 83 Linux
/dev/sda2 616448 4810751 2097152 83 Linux
/dev/sda3 4810752 976773167 485981208 fd Linux raid autodetect
Device Boot Start End Blocks Id System
/dev/sdc1 * 2048 616447 307200 83 Linux
/dev/sdc2 616448 4810751 2097152 83 Linux
/dev/sdc3 4810752 976773167 485981208 fd Linux raid autodetect
Device Boot Start End Blocks Id System
/dev/sdb1 2048 616447 307200 83 Linux
/dev/sdb2 616448 4810751 2097152 83 Linux
/dev/sdb3 4810752 976773167 485981208 fd Linux raid autodetect
...
$ sudo ls /dev/md*
/dev/md0 /dev/md1 /dev/md2
/dev/md:
0 1 2
$ sudo mdadm -D /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Wed Aug 6 13:03:01 2014
Raid Level : raid1
Array Size : 306880 (299.74 MiB 314.25 MB)
Used Dev Size : 306880 (299.74 MiB 314.25 MB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Mon Aug 11 19:51:44 2014
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Name : ubuntu:0
UUID : 03a4f230:82f50f13:13d52929:73139517
Events : 19
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 8 33 2 active sync /dev/sdc1
$ sudo mdadm -D /dev/md1
/dev/md1:
Version : 1.2
Creation Time : Wed Aug 6 13:03:31 2014
Raid Level : raid0
Array Size : 6289920 (6.00 GiB 6.44 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Wed Aug 6 13:03:31 2014
State : clean
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Chunk Size : 512K
Name : ubuntu:1
UUID : 9843bdd3:7de01b63:73593716:aa2cb882
Events : 0
Number Major Minor RaidDevice State
0 8 2 0 active sync /dev/sda2
1 8 18 1 active sync /dev/sdb2
2 8 34 2 active sync /dev/sdc2
$ sudo mdadm -D /dev/md2
/dev/md2:
Version : 1.2
Creation Time : Wed Aug 6 13:03:50 2014
Raid Level : raid5
Array Size : 971699200 (926.68 GiB 995.02 GB)
Used Dev Size : 485849600 (463.34 GiB 497.51 GB)
Raid Devices : 3
Total Devices : 3
Persistence : Superblock is persistent
Update Time : Mon Aug 11 19:54:49 2014
State : active
Active Devices : 3
Working Devices : 3
Failed Devices : 0
Spare Devices : 0
Layout : left-symmetric
Chunk Size : 512K
Name : ubuntu:2
UUID : 6ead2827:3ef088c5:a4f9d550:8cd86a1a
Events : 14815
Number Major Minor RaidDevice State
0 8 3 0 active sync /dev/sda3
1 8 19 1 active sync /dev/sdb3
3 8 35 2 active sync /dev/sdc3
$ sudo cat /etc/fstab
'# /etc/fstab: static file system information.'
'#'
'# Use 'blkid' to print the universally unique identifier for a'
'# device; this may be used with UUID= as a more robust way to name devices'
'# that works even if disks are added and removed. See fstab(5).'
'#'
'# '
'# / was on /dev/md126 during installation'
UUID=2af45208-3763-4cd2-b199-e925e316bab9 / ext4 errors=remount-ro 0 1
'# /boot was on /dev/md125 during installation'
UUID=954e752b-30e2-4725-821a-e143ceaa6ae5 /boot ext4 defaults 0 2
'# swap was on /dev/md127 during installation'
UUID=fb81179a-6d2d-450d-8d19-3cb3bde4d28a none swap sw 0 0
跑得像纯种马一样。我突然想到,如果你使用的是32位硬件,这对你来说行不通,但我认为在这一点上,软RAID可能比只有单个磁盘的LVM更糟糕,而且对于任何较小的东西,JBOD也比这个更老的东西更糟糕。
lvextend -l +100%FREE
来扩展并使用所有的可用空间,而不是使用lvextend -L+20G
。 - nathancahillcat /proc/partitions; /sbin/rescan-scsi-bus; cat /proc/partitions
命令来查找新安装的驱动器的名称,例如sdb
。 - O. Joneslsblk
来检查可用磁盘会更美观。尽管在RHEL7上进行测试。 - erikbstack/dev/ubuntu-vg/ubuntu-lv
而不是/dev/ubuntu-vg/root
。因此,请通过sudo lvdisplay
或ls /dev/ubuntu-vg/
进行确认。例如,我在第4步中需要使用以下命令:sudo lvextend -l +100%FREE /dev/ubuntu-vg/ubuntu-lv
。 - Stéphane