LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-09-2009, 06:16 AM   #1
horde
LQ Newbie
 
Registered: Jan 2005
Posts: 24

Rep: Reputation: 0
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?

Last edited by horde; 09-22-2009 at 03:53 AM. Reason: put my last edit in the wrong spot
 
Old 09-10-2009, 12:49 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
fdisk is your friend
 
Old 09-10-2009, 05:03 AM   #3
horde
LQ Newbie
 
Registered: Jan 2005
Posts: 24

Original Poster
Rep: Reputation: 0
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?
 
Old 09-12-2009, 02:30 AM   #4
horde
LQ Newbie
 
Registered: Jan 2005
Posts: 24

Original Poster
Rep: Reputation: 0
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
 
Old 09-14-2009, 12:29 AM   #5
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
I was probably in a hurry and got the impression you knew enough to figure the rest out ,... as you did.
Good one
 
  


Reply

Tags
mdadm, raid



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reducing size in LVM SBN Linux - General 8 07-28-2009 06:30 AM
Reducing Debian Installation Size??? kushalkoolwal Debian 18 08-15-2005 01:58 PM
Reducing file size using mencoder SithX Linux - Software 3 04-15-2005 08:56 PM
Reducing kernel size Kholnuu Slackware 6 01-22-2005 02:57 AM
Reducing size of PV (partition) in LVM clacour Linux - General 2 10-24-2003 08:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration