Page 1 of 2

Full disk not used in partition

Posted: Mon Jun 28, 2010 1:15 pm
by mcquam
I have just set up amahi from the express cd.

The partitions tab says I have one partition of 229 Gb but I have 1x1Tb and 1x 250Gb disks installed. The disks are correctly listed in the disks tab.

How do I allocate the full disk space?

Re: Full disk not used in partition

Posted: Fri Jul 02, 2010 2:26 pm
by mcquam
apparently the rest is a swap partition.

Re: Full disk not used in partition

Posted: Fri Jul 02, 2010 3:04 pm
by cpg
That's a pretty large partition. I guess the default partitioning does that?

Code: Select all

fdisk -l /dev/sda
(or sdb, etc.)

Re: Full disk not used in partition

Posted: Sun Jul 04, 2010 1:24 am
by mcquam
This is what I get:

Code: Select all

Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 240362656 193747544 34405312 85% / tmpfs 250816 0 250816 0% /dev/shm
Does this mean the rest is not usable?

Re: Full disk not used in partition

Posted: Sun Jul 04, 2010 4:16 am
by moredruid
what's the output of

Code: Select all

root@host# fdisk -l
if you see /dev/sdb (but not /dev/sdb1) it means the system does see the disk but it lacks a partition. Create a partition and filesystem and mount it.
if you see /dev/sdb and /dev/sdb1 it means there's a partition and you can mount it like so:

Code: Select all

root@host# mkdir /mnt/test root@host# mount /dev/sdb1 /mnt/test
if you don't see /dev/sdb at all you should check the connection between the disk and the mainboard.

Re: Full disk not used in partition

Posted: Sun Jul 04, 2010 5:02 am
by mcquam
Here is the output of fdisk -1

Code: Select all

Disk /dev/sda: 250.1 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000c786a Device Boot Start End Blocks Id System /dev/sda1 * 1 30401 244196001 83 Linux Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes 119 heads, 55 sectors/track, 298475 cylinders Units = cylinders of 6545 * 512 = 3351040 bytes Disk identifier: 0xd35b417c Device Boot Start End Blocks Id System /dev/sdb1 1 311 1015808 82 Linux swap / Solaris
So I presume that means there is a disk recognised that needs a partition.

I thought amahi just created a single partition and recommends only 1? So should I be just increasing the size of this one?

Re: Full disk not used in partition

Posted: Sun Jul 04, 2010 5:05 am
by mcquam
Sorry I got that wrong. I see now that there is an sdb1 so I just need to mount it?

I'm still confused about the single partition though. Is 2 ok?

Re: Full disk not used in partition

Posted: Sun Jul 04, 2010 5:43 am
by moredruid
it seems your 1TB disk has been used for a swap partition
you can create an additional partition on that disk:

Code: Select all

root@host# fdisk /dev/sdb n for new partition p for primary 2 for the partition number accept the defaults for the partition start and ending (<enter>, <enter>) which is by default the first available block and fills the partition up till the end t for type 83 (= type Linux ext) w for writing the changes to disk, you should then drop back into your shell
Once you've done all that you can create a filesystem on the partition (substitute mkfs.ext3 for your preferred flavor like ext4):

Code: Select all

root@host# mkfs.ext3 /dev/sdb2
then mount the partition where you want it (e.g. /mnt/test, substitute this with your own e.g. /var/hda/files/pictures)

Code: Select all

root@host# mount /dev/sdb2 /mnt/test
check if you can read/write on the mount point and check the mounts (just the command "mount"), the new mount should be listed.
unmount the drive; add it to /etc/fstab:

Code: Select all

root@host# cp /etc/fstab /etc/fstab.old vi /etc/fstab <--add the following line--> /dev/sdb2 /mnt/test ext3 defaults 1 2
make sure you match your own desired mount point and the filesystem type (ext3, ext4) you chose.
run "mount -a" and check that you don't get any errors.
run "mount" to see if the disk is mounted.
run "df -h" to see the available space.

enjoy!

Re: Full disk not used in partition

Posted: Sun Jul 04, 2010 6:13 am
by mcquam
Thanks for your help.

When I do:

Code: Select all

mkfs.ext3 /dev/sdb2
I get

Code: Select all

Could not stat /dev/sdb2 --- No such file or directory The device apparently does not exist; did you specify it correctly?
Should I have used just sdb?

Re: Full disk not used in partition

Posted: Sun Jul 04, 2010 11:12 am
by moredruid
no, don't use /dev/sdb for creating a filesystem.
You first need to create a new partition (which will then automatically be called /dev/sdb2)