Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: rdtaylor on March 01, 2007, 11:45:22 PM
-
Hi!
I've been searching around here for a while this morning, and I've found some info, but nothing that solves my problem.
I am running SME 7.1 (from fresh install). I was running twin Maxtor 160Gb drives as a software RAID mirror.
One of the drives failed (SDA), and I have bought a replacement. It is a Western Digital 160Gb drive, but it appears to be slightly smaller than the Maxtor.
So, the info I've found here for using 'sfdisk' and dumping out the partition table of /dev/sdb, and applying it to /dev/sda do not work.
sfdisk /dev/sda < /tmp/sfdisk_sdb.out
Checking that no-one is using this disk right now ...
OK
Disk /dev/sda: 19457 cylinders, 255 heads, 63 sectors/track
Old situation:
Units = cylinders of 8225280 bytes, blocks of 1024 bytes, counting from 0
Device Boot Start End #cyls #blocks Id System
/dev/sda1 0 - 0 0 0 Empty
/dev/sda2 0 - 0 0 0 Empty
/dev/sda3 0 - 0 0 0 Empty
/dev/sda4 0 - 0 0 0 Empty
Warning: given size (319950540) exceeds max allowable size (312367860)
sfdisk: bad input
fdisk p output for new drive:
Disk /dev/sda: 160.0 GB, 160040803840 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
fdisk p output for good drive:
Disk /dev/sdb: 163.9 GB, 163927522816 bytes
255 heads, 63 sectors/track, 19929 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 104391 fd Linux raid autodetect
/dev/sdb2 14 19929 159975270 fd Linux raid autodetect
Another post on this forum suggested resizing the SWAP space in an effort to make the partitions fit on the new drive.
swapon shows me this:
swapon -s
Filename Type Size Used Priority
/dev/mapper/main-swap partition 2031608 0 -1
I don't understand how swap relates to the partitions. fdisk output doesn't seem to show any swap partition.
Where do I go now?
Thanks
Rob
-
Is my only option to resize the big partition on the old (good) drive?
And, if that's the case, what tools / utilities are recommended for doing this?
Obviously, I'm nervous about resizing the good drive's partition, but I have good backups of my data.
-
I'm going to buy a larger hard drive ($30 more for a 250Gb drive).
That will definately fit the old partition on it 8-)
-
Rod,
Did you try logging into the admin console and adding the new disk via option 5 "manage disk redundancy" ??.
Lloyd
-
Thanks...yes...I tried that option right at the get go.
It failed with an error. I assume that the error was related to the fact that the new drive is not large enough to contain partitions of the same size as the existing drive.
A larger drive is the simplest (read less stress for me!!) solution.
-
Just installed brand new 250Gb hard drive.
Used option 5 from admin menu, RAID mirror is now i the process of resyncing.
All is well...
People should watch out for this situation.
i.e. you buy different brands of the (apparently) same size disk, but they are not quite the same size. This can make things difficult for RAID mirrors.
-
My situation : two seagate 80GB harddisk of different type/model.
[root@smeserver ~]# fdisk -l
Disk /dev/sda: 80.0 GB, 80026361856 bytes
16 heads, 63 sectors/track, 155061 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes
Device Boot Start End Blocks Id System
/dev/sda1 * 1 203 102280+ fd Linux raid autodetect
/dev/sda2 204 155061 78048432 fd Linux raid autodetect
Disk /dev/sdb: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/sdb1 * 1 13 102272+ fd Linux raid autodetect
Partition 1 does not end on cylinder boundary.
/dev/sdb2 13 9729 78045919 fd Linux raid autodetect
I am aware the harddisk size is the same (red), however the partition size is not the same(blue).
I know sdb have to be the same size or bigger than sda.
Can I just adjust (shrink?) the partition of /dev/sda? How?
Just to make sure before I rush off to computer store to buy a new hdd.
thomas
-
Ok i currently have the same situation.
i do not want to use the "work around" and buy a larger disk.
I do not think that this is a solution ;).
So my question is :
Is there any other way to shrink an raid to about 150mb's smaler size then current to fit the harddrive sizes between two disks?
all partion resize programms i tested doesn't allow to shrink the raid partion.
I'm open for suggestions :)
Thanks
Shodan
-
http://www.acronis.com/enterprise/products/ATISLin/ you could have a look at this but it costs dollars and you would need to email them about raid support
would cost you about 700 dollars US
i use it to backup linux fine but not in raid and that is only the home version i read there is a way to put it on a bartpe cd and it may work
bartpe is like knoppix but it is a windows live cd
there are some open source one's but they can be rather nasty to use
-
Be aware that resizing partitions is not as straightforward as it may seem.
See here: http://forums.contribs.org/index.php?topic=41362.0
and here: http://forums.contribs.org/index.php?topic=41408.0
-
I think we have a how-to somewhere in our documentation on contribs.org but I can't seem to find it. There is a pointer here: http://www.linux.com/feature/118645 under the heading Resizing logical volumes. The order of tasks to shrink a volume is:
1-resize (shrink) the filesystem.
2-resize (shrink) the volume.
If we are expanding a volume the order is the opposite of course.
1-resize (expand) the volume.
2-resize (expand) the filesystem.
be sure you read all the warnings. What you are attempting to do could cause you to lose data.
-
some things i do.
i never buy the most largest drive, because i always want to run in raid 1 mode.
so i purchase at least 3 drives and put one on the shelf, hopefully i will never need it.
and also the not so largest drive will always be much cheaper too.
also purchase drives that you think will be easy to get your hands on too in the future.
after several years there will be much larger drives so you can upgrade.
here is my upgrade path.
if i have two drives in raid 1 mode what i do is purchase three exact drives of what i am wanting to upgrade to.
do multiple backups, remove one of the already running hard drives from the raid 1 setup, install one of my larger, faster, drives then mirror to it.
then remove my second hard drive that was running in the first raid mode.
so now i have one of the three hard drives running in the setup(formatted) configurations.
now i delete as much information on that drive so i can backup to a desktop.
then do several backups to a desktop.
remove that drive
install your your number 2 and 3 drives from the new set
install your sme server,
restore from the desktop backup and restore from your large backups.
let things run as long as you can on your new setup before using the server, this is in case a new drive breaks during a break in period.
after things are going well for a few weeks, take the number 1 drive(on of the newer drives) that is already out of our computer and reformat it.
so a google search mbrwipe, place the program on a dos bootable floppy drive. place the number drive in a machine by itself, then boot from the floppy, and wipe the mbr with the mbrwipe program, now you have a backup drive to your raid set and two possibly large drives you place into an older system. just remember these drives are much use now.
purvis
-
just a little side note if drives keep running after 48 jours they shoulkd be ok to use fron then on 48 housr is a good burn in time