Sunday, April 28, 2024
 Popular · Latest · Hot · Upcoming
1
rated 0 times [  1] [ 0]  / answers: 1 / hits: 823  / 1 Year ago, mon, december 5, 2022, 9:59:34

When I first installed Ubuntu a couple years ago, I set it up with a software RAID using the Ubuntu alternate install disk. I have two 500 GB drives in the RAID.



A few days ago, one of the drives failed. I had to switch the boot order of the drives in the computer's BIOS, but other than that, the computer kept on truckin'. All my data is safe on the remaining drive.



I bought a new drive to replace the defective one, and it is installed in my computer. If I look at it with gParted Partition Manager, I can see it's there with all its space unallocated.



How do I get Ubuntu to see it as part of the RAID and begin mirroring the other drive?



dave@homebase:~$ sudo fdisk -lu

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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: 0x00078955

Device Boot Start End Blocks Id System
/dev/sda1 * 63 39070079 19535008+ fd Linux raid autodetect
/dev/sda2 39070080 46877669 3903795 fd Linux raid autodetect
/dev/sda3 46877670 781449794 367286062+ fd Linux raid autodetect
/dev/sda4 781449795 976768064 97659135 83 Linux

Disk /dev/sdb: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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/sdb doesn't contain a valid partition table

Disk /dev/md2: 376.1 GB, 376084365312 bytes
2 heads, 4 sectors/track, 91817472 cylinders, total 734539776 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

Disk /dev/md1: 3997 MB, 3997368320 bytes
2 heads, 4 sectors/track, 975920 cylinders, total 7807360 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/md1 doesn't contain a valid partition table

Disk /dev/md0: 20.0 GB, 20003749888 bytes
2 heads, 4 sectors/track, 4883728 cylinders, total 39069824 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/md0 doesn't contain a valid partition table
dave@homebase:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 19G 4.5G 13G 26% /
none 1.8G 708K 1.8G 1% /dev
none 1.8G 752K 1.8G 1% /dev/shm
none 1.8G 332K 1.8G 1% /var/run
none 1.8G 0 1.8G 0% /var/lock
/dev/sda4 92G 211M 87G 1% /tmp
/dev/md2 345G 237G 91G 73% /home
192.168.0.12:/home/mythbuntu
651G 174G 444G 29% /home/dave/Mythbuntu
dave@homebase:~$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid1 sda1[1]
19534912 blocks [2/1] [_U]

md1 : active (auto-read-only) raid1 sda2[1]
3903680 blocks [2/1] [_U]

md2 : active raid1 sda3[1]
367269888 blocks [2/1] [_U]

unused devices: <none>

More From » 11.04

 Answers
2

Answer found here.



Basically, just use gnome-disk-utility (Under System->Administration in Gnome). Point and click. Nice and easy.


[#44246] Monday, December 5, 2022, 1 Year  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
aciousoun

Total Points: 178
Total Questions: 110
Total Answers: 98

Location: Lithuania
Member since Fri, Sep 4, 2020
4 Years ago
;