LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Shrinking software RAID 0 (https://www.linuxquestions.org/questions/linux-general-1/shrinking-software-raid-0-a-4175541164/)

maples 04-29-2015 07:20 PM

Shrinking software RAID 0
 
Hi,
I have a software RAID on my home server that spans 3 drives. Two of the drives are entirely dedicated to the RAID, the third also has my / and /home partitions:

Code:

root@maples-server:/home/anthony# fdisk -l

Disk /dev/sda: 279.5 GiB, 300069052416 bytes, 586072368 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
Disklabel type: dos
Disk identifier: 0x0008bede

Device    Boot    Start      End  Sectors  Size Id Type
/dev/sda1  *        2048  39063551  39061504  18.6G 83 Linux
/dev/sda3      39063552  97656831  58593280    28G 83 Linux
/dev/sda4      97656832 586072063 488415232 232.9G 83 Linux

Disk /dev/sdd: 74.5 GiB, 80026361856 bytes, 156301488 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
Disklabel type: dos
Disk identifier: 0x0004962e

Device    Boot    Start      End  Sectors  Size Id Type
/dev/sdd1          2048  20973567  20971520  10G 82 Linux swap / Solaris
/dev/sdd2      20973568 156301311 135327744 64.5G 83 Linux

Disk /dev/sdc: 232.9 GiB, 250000000000 bytes, 488281250 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
Disklabel type: dos
Disk identifier: 0x00075241

Device    Boot Start      End  Sectors  Size Id Type
/dev/sdc1        2048 488280063 488278016 232.8G 83 Linux

Disk /dev/sdb: 232.9 GiB, 250000000000 bytes, 488281250 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
Disklabel type: dos
Disk identifier: 0x00017cc3

Device    Boot Start      End  Sectors  Size Id Type
/dev/sdb1        2048 488280063 488278016 232.8G 83 Linux

Disk /dev/md0: 698.6 GiB, 750063714304 bytes, 1464968192 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes

sda1 is my /
sda3 is my /home
sda4 is the member of the RAID
sdb and sdc are the other two disks in the RAID.

I would like to remove sda4 (to make room to expand sda3). Is it possible to do this without needing to completely re-do the RAID? Or is that just not possible, given the way that RAID 0 stripes the data?

smallpond 04-30-2015 12:48 PM

You have non-transient data on a RAID 0?

maples 04-30-2015 01:17 PM

Quote:

Originally Posted by smallpond (Post 5355776)
You have non-transient data on a RAID 0?

I'm not sure I understand what you're asking... Are you asking if I have a backup? I have backups, but I'd prefer to avoid copying 250-300 GB of data if that's possible. But from the lack of replies and the little information I've found, I'm starting to think that I'd be better off just removing and creating a new empty RAID and restoring from backup.

maples 05-01-2015 03:50 PM

I just went ahead and removed the RAID and created a new one.


All times are GMT -5. The time now is 10:45 AM.