Koozali.org: home of the SME Server

Replacing the disk with a bigger one

Offline megl

  • 2
  • +0/-0
Replacing the disk with a bigger one
« on: May 03, 2009, 01:10:30 AM »

I have just cloned by SME-server disk (120 GB) onto a new disk (160 GB) using ddrescue because the old disk was 3 years old and I want to avoid HW failure.

I replaced the old disk with the clone.

The new disk works fine and boots correctly but it uses only the first 120 GB (of cause).

Because of lvm2 I can not use pmagic to expand the partition of the new disk to include the last 40 GB.

Can someone guide me to a description of how to utilize the last 40 GB of my new disk. Thank you.

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Replacing the disk with a bigger one
« Reply #1 on: May 03, 2009, 02:10:16 AM »
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline versa

  • ****
  • 109
  • +0/-0
Re: Replacing the disk with a bigger one
« Reply #2 on: May 03, 2009, 02:12:12 AM »
I cannot say if it works but this may help you
http://wiki.contribs.org/AddExtraHardDisk#Quota
taken from this
http://wiki.contribs.org/AddExtraHardDisk

SME Server docs are quite good but there is a lot of reading etc involved look through the wiki before you proceed, some of the other guys here may be able give you better pointers

......

Offline versa

  • ****
  • 109
  • +0/-0
Re: Replacing the disk with a bigger one
« Reply #3 on: May 03, 2009, 02:15:02 AM »
There yo go mary's link may be better to follow as she/he? would have a better know how of sme than me  :grin:
......

Offline megl

  • 2
  • +0/-0
Re: Replacing the disk with a bigger one
« Reply #4 on: May 04, 2009, 09:29:46 PM »
Thank you for the hints, but they do not cover my situation.

I have only one single disk in my machine and therfore running RAID 1.
I have cloned my single harddisk and now using the clone.

It it possible to create an extra partition in the free 40GB, and somhow including this space into my existing lvm2 partition?

Here's my fdisk -l output

Disk /dev/hdc: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1   *           1          13      104391   fd  Linux raid autodetect
/dev/hdc2              14       14593   117113850   fd  Linux raid autodetect

Disk /dev/md1: 106 MB, 106823680 bytes
2 heads, 4 sectors/track, 26080 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md1 doesn't contain a valid partition table

Disk /dev/md2: 119.9 GB, 119924457472 bytes
2 heads, 4 sectors/track, 29278432 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/md2 doesn't contain a valid partition table

Disk /dev/dm-0: 118.8 GB, 118816243712 bytes
2 heads, 4 sectors/track, 29007872 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 1040 MB, 1040187392 bytes
2 heads, 4 sectors/track, 253952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes

Disk /dev/dm-1 doesn't contain a valid partition table


I hope you can help.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Replacing the disk with a bigger one
« Reply #5 on: May 04, 2009, 09:40:53 PM »
megl:

are you saying you have only 1 hd? well, in this case you are not safe at all, even if the hd is new (sometime this is worst)..

anyway, I suggest you to re-use the "old" (quoted as a 3 years old hd is not old.. I've 7 years old scsi disk running 24/24 without problems) in a raid1.

to do so:
- erase the mbr sector of your 120 GB hd
- add it via the manage console ("Manage disk redudancy")

in this way you'll get a 120 GB raid1 array.. you will not use al the space on the bigger one, but you will not suffer if one hd fails.

my 2c
Ciao
Stefano

Offline MSmith

  • *
  • 675
  • +0/-0
Re: Replacing the disk with a bigger one
« Reply #6 on: May 06, 2009, 11:39:24 PM »
It should be possible, though tedious, for you to go back to the 120-gig drive, use one of the many contribs (DAR, Affa, BackupPC) to back up your server & data, then restore to a clean 7.4 installed on the 160-gig drive.
...