[Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Hi all:

I am following right now the guide to "Setup Emoncms on a RaspberryPI with a Hard drive"

http://emoncms.org/site/docs/raspberrypihdd

 

Could you please help me on the following?

 

1. Why using a HDD when after creating the image, just 2.9gB are used from my HDD and others are not visible? (200gB sata disk).

($ sudo dd bs=4M if=pi_hdd_stack.img of=/dev/sdb)

 

[solved] 2. Also, when trying to update to latest version , I am getting the following error

pi@raspberrypi ~ $ git pull /var/www/emoncms
fatal: Not a git repository (or any of the parent directories): .git
pi@raspberrypi ~ $

pi@raspberrypi ~ $ cd /var/www/emoncms

pi@raspberrypi ~ $ git pull origin master

 

Thanks so much in advance,

Iridium.

Paul Reed's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Iridium

I partitioned my HDD before writing the image, this way you can make use of the remaining HDD capacity without interfering with the emoncms installation.

I would suggest a partition of 5GB should suffice, leaving you 195GB to use as a file or media server, backup, or whatever you want.

You will need to edit the file;

/boot/cmdline.txt    (which is on your SD card)

...to let the raspberry pi know where the rootfs is located. My rootfs is installed in /sda2  so my cmdline.txt reads;

dwc_otg.lpm_enable=0 console=tty1 root=/dev/sda2 rootfstype=ext4 elevator=deadline rootwait

 

PLAN B
An alternative is to expand your existing 2.9GB rootfs to fill the entire 200GB via this;

$ sudo raspi-config

....but is seems like a waste of 195GB to me...

 

Paul

iridium's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Thanks Paul.........!!

I have found a 4Gb USB. I think I will use this one as an "Solid state disk" :-)

Paul Reed's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

The USB SSD's will only have a limited life, similar to the SD card, it's the same technology..

Paul

Bill Thomson's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Paul,

When I used raspi-config to expand my HDD partiton, it gave me an error message about the drive not being an SD card, and aborted the resize. Did it work OK for you?

Regards,

Bill

 

Paul Reed's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Yes, it fully expanded with no errors. I think that the current minimum recommended size for Raspbian is 4GB so leaving it at 2.9GB may cause problems in time.

I don't know how old the OEM 'image'  Raspbian version is, but there has been many updates which overcame early problems;

$ sudo apt-get update

Followed by;

$ sudo apt-get upgrade

will bring the OS up to date, if not already done.

Paul

Bill Thomson's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Did the update, then the upgrade. No problems there, but I still get an error message about the drive not being an SD card.

Not a big problem though, as I connected the drive to a Linux box and was able to resize it.

 

Bill

 

 

Paul Reed's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Bill, presumably you have increased the size of a partition, don't you still need to expand the rootfs to fill it?

ie. What do you get if you call;

$ df -h

Paul

Bill Thomson's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Paul,

Expanding the rootfs partition is what actually gives the OS more "room," since
the root filesystem is simply the filesystem on the same partition the root
directory is located.

Here's a better explanation: http://www.linfo.org/root_filesystem.html 

Here's the results of df -h (10GB HDD with 1GB swap partition)

Filesystem      Size  Used Avail Use% Mounted on
rootfs          8.2G  2.1G  5.7G  27% /
/dev/root       8.2G  2.1G  5.7G  27% /
devtmpfs        212M     0  212M   0% /dev
tmpfs            44M  208K   44M   1% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs           293M     0  293M   0% /run/shm
pi@raspberrypi ~ $

Bill

Paul Reed's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

That's pretty much what I've got too, which seems to work well;

Filesystem              Size    Used     Avail     Use%     Mounted on
rootfs                        20G     3.1G     16G      17%           /
/dev/root                   20G     3.1G     16G      17%           /
devtmpfs               235M       0        235M        0%          /dev
tmpfs                        49M     2.7M     46M        6%          /run
tmpfs                       5.0M       0         5.0M       0%           /run/lock
tmpfs                        98M       0          98M       0%           /run/shm
/dev/mmcblk0p1    120M      19M    102M     16%          /boot
/dev/sda1              814G       35G    780G      5%           /mnt/iomega

 

Paul

iridium's picture

Re: [Solved] Help: Setup Emoncms on a RaspberryPI with a Hard drive.

Finally I used "gparted" to expand the filesystem quite easely.

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.