Reducing the size of a device in an existing RAID set/Seagate formatting problem
Alternate Heading: Unable to use opensuse partitioner to fully format a Seagate 1Tb drive
OK. Swapped over a motherboard to increase the number of slots available for hard drives so that I could expand my raid array (4 X 1Tb drives). Discovered I had no thermal paste so all delayed for 24 hours while I bought some, miscalculated on rebuild and had to reinstall OpenSuse but in the end system is now up and running. Unfortunately when I formatted my new 1Tb drive (Seagate) it formats to 931.50 Gb while the other 4 drives formatted to 931.51 Gb (they are WD). I'm now in the position that when I try to add this new drive I get : mdadm: /dev/sdc1 not large enough to join array Is there any way I can resize the existing devices down to 931.50 Gb so that I can add in the new drive without having to restore the array? |
fdisk is your friend
|
At the moment fdisk is only a relatively close neighbour.
How can I make it my friend? To increase the size of the formatted Seagate drive or to reduce the size of the other devices? Is that possible with the RAID assembled? |
Just in case soeone gets into the same position that I was. FDISK did eventually become my froend - still not sure why the advice was so enigmatic.
My problem: WHen creating a partition on my new 1Tb Seagate drive openSUSE YAST created a partition of size 953.50Gb when I set it to create the maximum partition. Previousely it had created partitions of 953.51Gb on 4 1Tb WD drives I had bought so when I tried to add this new device to the array I received: mdadm: /dev/sdc1 not large enough to join array My solution: Running fdisk -l gave me: The first entry repeated 4 times for each of the raid devices Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000655ae Device Boot Start End Blocks Id System /dev/sdb1 1 121601 976760001 fd Linux raid autodetect and this for the new device: Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000b7001 Device Boot Start End Blocks Id System /dev/sdc1 2 121601 976752000 fd Linux raid autodetect Saw the starting in Cylcinder 2 and thought I'd manually create the device in YAST rather than just setting it to max. Unfortunately YAST/partitioner refused toallow parameters 1 -> 122601. So decided use my new best friend : # fdisk /dev/sdc The number of cylinders for this disk is set to 121601. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes 255 heads, 63 sectors/track, 121601 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000b7001 Device Boot Start End Blocks Id System Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4): 1 First cylinder (1-121601, default 1): 1 Last cylinder, +cylinders or +size{K,M,G} (1-121601, default 121601): 121601 Command (m for help): t Selected partition 1 Hex code (type L to list codes): fd Changed system type of partition 1 to fd (Linux raid autodetect) Command (m for help): w The partition table has been altered! Calling ioctl() to re-read partition table. Syncing disks. Then it showed in partitioner as 953.51Gb - all was ok with the world. (just to finish off the raid expand: # mdadm /dev/md1 -a /dev/sdc1 mdadm: added /dev/sdc1 # mdadm --grow /dev/md1 --raid-devices=5 mdadm: Need to backup 1536K of critical section.. mdadm: ... critical section passed. .... and the long wait starts |
I was probably in a hurry and got the impression you knew enough to figure the rest out ,... as you did.
Good one ;) |
All times are GMT -5. The time now is 07:47 PM. |