Full disk not used in partition

mcquam
Posts: 16
Joined: Sun Jun 13, 2010 5:32 am

Full disk not used in partition

Postby mcquam » Mon Jun 28, 2010 1:15 pm

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?

mcquam
Posts: 16
Joined: Sun Jun 13, 2010 5:32 am

Re: Full disk not used in partition

Postby mcquam » Fri Jul 02, 2010 2:26 pm

apparently the rest is a swap partition.

User avatar
cpg
Administrator
Posts: 2618
Joined: Wed Dec 03, 2008 7:40 am
Contact:

Re: Full disk not used in partition

Postby cpg » Fri Jul 02, 2010 3:04 pm

That's a pretty large partition. I guess the default partitioning does that?

Code: Select all

fdisk -l /dev/sda
(or sdb, etc.)
My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 8GB RAM, 1TBx2+3TBx1

mcquam
Posts: 16
Joined: Sun Jun 13, 2010 5:32 am

Re: Full disk not used in partition

Postby mcquam » Sun Jul 04, 2010 1:24 am

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?

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Full disk not used in partition

Postby moredruid » Sun Jul 04, 2010 4:16 am

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.
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

mcquam
Posts: 16
Joined: Sun Jun 13, 2010 5:32 am

Re: Full disk not used in partition

Postby mcquam » Sun Jul 04, 2010 5:02 am

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?

mcquam
Posts: 16
Joined: Sun Jun 13, 2010 5:32 am

Re: Full disk not used in partition

Postby mcquam » Sun Jul 04, 2010 5:05 am

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?

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Full disk not used in partition

Postby moredruid » Sun Jul 04, 2010 5:43 am

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!
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

mcquam
Posts: 16
Joined: Sun Jun 13, 2010 5:32 am

Re: Full disk not used in partition

Postby mcquam » Sun Jul 04, 2010 6:13 am

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?

User avatar
moredruid
Expert
Posts: 791
Joined: Tue Jan 20, 2009 1:33 am
Location: Netherlands
Contact:

Re: Full disk not used in partition

Postby moredruid » Sun Jul 04, 2010 11:12 am

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)
echo '16i[q]sa[ln0=aln100%Pln100/snlbx]sbA0D2173656C7572206968616D41snlbxq' | dc
Galileo - HP Proliant ML110 G6 quad core Xeon 2.4GHz, 4GB RAM, 2x750GB RAID1 + 2x1TB RAID1 HDD

Who is online

Users browsing this forum: No registered users and 58 guests