Koozali.org: home of the SME Server

Where's my diskspace gone

Offline SuperGrover

  • ***
  • 56
  • +0/-0
Where's my diskspace gone
« on: October 02, 2006, 10:53:38 PM »
Last week set up of SME 7 and running like a charm. Today I installed phpsysinfo, and my 45 Gb installed space (listed under IDE devices) only lists as a total of 8.86 GB in the mounted file systems.

I know it's a Noob question, but where's the other 36 Gb gone  :?

Offline raem

  • *
  • 3,972
  • +4/-0
Re: Where's my diskspace gone
« Reply #1 on: October 03, 2006, 04:19:23 AM »
SuperGrover

What does this show
df -h
...

Offline SuperGrover

  • ***
  • 56
  • +0/-0
Where's my diskspace gone
« Reply #2 on: October 03, 2006, 06:19:06 PM »
Code: [Select]

Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/main-root
                      8.7G  3.6G  4.7G  43% /
/dev/md1               99M   19M   75M  21% /boot
none                  124M     0  124M   0% /dev/shm


and phpsysinfo displays:

Code: [Select]

IDE Devices  
- hdd: LTN486S
- hdc: Maxtor 31024H1 (Capacity: 9.42 GB)
- hda: MAXTOR 6L040J2 (Capacity: 37.28 GB)


Looks like only hdc is used  :?

Offline dmay

  • *
  • 450
  • +0/-0
    • http://myezserver.com
Where's my diskspace gone
« Reply #3 on: October 03, 2006, 07:01:55 PM »
SME 7.x auto creates a RAID array if it sees two disks. As your disks are not the same size the array is built based on the smaller disks capacity.

Offline SuperGrover

  • ***
  • 56
  • +0/-0
Where's my diskspace gone
« Reply #4 on: October 03, 2006, 07:32:49 PM »
Quote from: "dmay"
SME 7.x auto creates a RAID array if it sees two disks. As your disks are not the same size the array is built based on the smaller disks capacity.

AAARGH  :(

So it's a RAID 1, mirror of two disks ? I just needed the extra diskspace, since I now use Torrentflux  :P

What's the best way to get the system working on 'only' the largest disk ? Make a backup, reinstall SME7 and restore ?

Offline Boris

  • *
  • 783
  • +0/-0
Where's my diskspace gone
« Reply #5 on: October 03, 2006, 09:02:49 PM »
There are a couple of ways to use that 36Gb unused now space.
First try fdisk /dev/hda and see if another partition can be created on unused portion of the disk. Create a partition, format it as ext3 and mount it into ibay.
Second way is to reinstall server while using only one smaller drive. Next add a second drive.
There is very helpfull "how-to add a second disk" available that will guide you through the steps.
...

Offline SuperGrover

  • ***
  • 56
  • +0/-0
Where's my diskspace gone
« Reply #6 on: October 03, 2006, 10:03:55 PM »
Quote from: "Boris"
There are a couple of ways to use that 36Gb unused now space.
First try fdisk /dev/hda and see if another partition can be created on unused portion of the disk. Create a partition, format it as ext3 and mount it into ibay.
Second way is to reinstall server while using only one smaller drive. Next add a second drive.
There is very helpfull "how-to add a second disk" available that will guide you through the steps.

Thanks for your help, found the how-to before, but didn't read carefully how SME7 would be installed on a fresh system

Code: [Select]
Disk /dev/hda: 40.0 GB, 40027029504 bytes
255 heads, 63 sectors/track, 4866 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1          13      104391   fd  Linux raid autodetect
/dev/hda2              14        4866    38981722+  fd  Linux raid autodetect


This is what fdisk returns on /dev/hda, when I try to add a partition on this disk it gives
Code: [Select]
No free sectors available

so I still don't understand where all this space is occupied by

Offline Gaston94

  • *****
  • 184
  • +0/-0
Where's my diskspace gone
« Reply #7 on: October 04, 2006, 12:26:01 PM »
Hi,
the space is just 'hidden' under the raid definition. As indicated, you have got a RAID array builted based on the smaller space available.

What is you current real request :
 - have SME on the 36GB with the 9GB as an extra strorage device ?
 :arrow: I have no (quick and simple )idea to perform this operation without reinstallation - and unless you have real constraint,  I would not recommend it.
 - keep SME on the single 9GB disk with the 40GB as an extra storage device?

in this case I would see the operation that way :
 - remove the 36GB disk from the raid device
Code: [Select]
mdadm --manage /dev/md2 --fail /dev/hda2
mdadm --manage /dev/md2 --remove /dev/hda2
 mdadm --manage /dev/md1 --fail /dev/hda1
mdadm --manage /dev/md1 --remove /dev/hda1

 - reinitialize your hda drive (fdisk remove partition + create partition + mkfs)
 - create mount point
 - mount new partition on this place
(the extra storage on another disk has already been discussed recently)

:!: I did not test the above command on a live system - check the command :!: :!:
If you have the opportunity, reboot the server to be sure, I did not miss any part in teh RAID config, and it won't try to reassemble the RAID array.

G.

Offline Gaston94

  • *****
  • 184
  • +0/-0
Where's my diskspace gone
« Reply #8 on: October 05, 2006, 01:29:46 PM »
Quote from: "Gaston94"

 - remove the 36GB disk from the raid device
Code: [Select]
mdadm --manage /dev/md2 --fail /dev/hda2
mdadm --manage /dev/md2 --remove /dev/hda2
 mdadm --manage /dev/md1 --fail /dev/hda1
mdadm --manage /dev/md1 --remove /dev/hda1

 - reinitialize your hda drive (fdisk remove partition + create partition + mkfs)

If you have the opportunity, reboot the server to be sure, I did not miss any part in teh RAID config, and it won't try to reassemble the RAID array.

and I missed one :(
You should perform the following instructions to avoid bad experience :
Code: [Select]
mdadm --zero-superblock /dev/hda1
 mdadm --zero-superblock /dev/hda2

this does really clean the info on the disk itself mdam is looking at .
Then you can recreate partition an FS (deleting partition is not enough to remove mdam flags :!: )

G.