0

I have 4 HDD, the system is installed on /dev/sda2

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             884G  2.1G  836G   1% /
/dev/sda3             2.0G  159M  1.7G   9% /tmp
/dev/sda1              99M   18M   77M  19% /boot
tmpfs                 7.9G     0  7.9G   0% /dev/shm


 fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14      119040   956084377+  83  Linux
/dev/sda3          119041      119301     2096482+  83  Linux
/dev/sda4          119302      121601    18474750    5  Extended
/dev/sda5          119302      121601    18474718+  82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121601   976760001   83  Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      121601   976760001   83  Linux

I want to Raid 0 all 4 HDDs:

mdadm -C /dev/md0 --level=raid0 --raid-devices=4 /dev/sda2 /dev/sdb1 /dev/sdc1 /dev/sdd1
mdadm: Cannot open /dev/sda2: Device or resource busy
mdadm: create aborted

1 Answer 1

2
  1. You have /dev/sda2 mounted as the root partition, it is busy.
  2. Making it part of a strip set (RAID0) would destroy all the data currently on it.
  3. Making a 4 disk strip set increases your chances of losing data by about 4 times.

    I doubt you want to do what you're trying to do...

3
  • No, I am trying to make /dev/sda2 smaller, and partition it so I can use the rest of it to make a RAID or LVM
    – domz
    Apr 30, 2011 at 11:25
  • @domz, sda2 is a partition of the sda drive to begin with. You can't shrink the file system while the computer is running off it.
    – Chris S
    Apr 30, 2011 at 14:22
  • Got it... I found this: howtoforge.com/linux_resizing_ext3_partitions
    – domz
    May 1, 2011 at 21:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .