1HzCoder
Posts: 31
Joined: Thu Jul 12, 2012 1:15 am
Location: Lower Alabama

Wrong NAS disk size

Wed Apr 10, 2013 2:57 am

Greetings,
I used this tutorial to set up one of my Pis as a NAS http://elinux.org/R-Pi_NAS, which worked fine, except the 160gb usb hdd I used shows up as disk1(\\RASPBERRYPI\public) with a size of 2.83 Gb. Needles to say Windows refuses to copy anything bigger than that over. I have checked my typing, especially in all the nano sessions to make sure it isn't a typo or i forgot a step. I know it is some simple mistake I am not seeing. I can post any of the full files if I need to, but the NAS Pi is running headless and I am not to good with that setup yet, so Ill need to hook it back up to TV & keyboard.
TomJ
Einstein once said you don't really understand anything until you can explain it to your Grandmother

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Wrong NAS disk size

Wed Apr 10, 2013 3:06 am

Can you run the commands fdisk -l and df -h and paste the output ?
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

1HzCoder
Posts: 31
Joined: Thu Jul 12, 2012 1:15 am
Location: Lower Alabama

Re: Wrong NAS disk size

Wed Apr 10, 2013 3:38 am

SirLagz,
fdisk -l just returns the options list, tried fdisk -l sda1 just got back the command prompt.
Here are df -h and cat /proc/partitions results. Hopre they help.

pi@raspberrypi ~ $ df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 2.9G 2.3G 427M 85% /
/dev/root 2.9G 2.3G 427M 85% /
devtmpfs 85M 0 85M 0% /dev
tmpfs 19M 1016K 18M 6% /run
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 37M 0 37M 0% /run/shm
/dev/mmcblk0p1 51M 19M 33M 37% /boot

and
pi@raspberrypi ~ $ cat /proc/partitions
major minor #blocks name

179 0 3870720 mmcblk0
179 1 52224 mmcblk0p1
179 2 3018752 mmcblk0p2
8 0 117220824 sda
8 1 117218304 sda1


Maybe i need to link /home/shares/public/disk1 to sda1 somehow?. or mount sda0 & 1 there?
Thanks
TomJ
Einstein once said you don't really understand anything until you can explain it to your Grandmother

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Wrong NAS disk size

Wed Apr 10, 2013 4:30 am

1HzCoder wrote: mount sda0 & 1 there?
TomJ
Bingo.

You need to mount sda1 to somewhere...

fdisk should be able to list the partitions on the external hard drive...
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

DirkS
Posts: 10363
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: Wrong NAS disk size

Wed Apr 10, 2013 8:21 am

fdisk should be able to list the partitions on the external hard drive...
You'll probably need to use 'sudo fdisk -l'

Gr.
Dirk.

SirLagz
Posts: 1705
Joined: Mon Feb 20, 2012 8:53 am
Location: Perth, Australia
Contact: Website

Re: Wrong NAS disk size

Wed Apr 10, 2013 8:33 am

lol. I work as root so much that I keep forgetting sudo =/
My Blog - http://www.sirlagz.net
Visit my blog for Tips, Tricks, Guides and More !
WiFi Issues ? Have a look at this post ! http://www.raspberrypi.org/phpBB3/viewtopic.php?f=28&t=44044

1HzCoder
Posts: 31
Joined: Thu Jul 12, 2012 1:15 am
Location: Lower Alabama

Re: Wrong NAS disk size

Wed Apr 10, 2013 11:49 am

Sorry for the delay, fell asleep.
Results fdisk

pi@raspberrypi ~ $ sudo fdisk -l

Disk /dev/mmcblk0: 3963 MB, 3963617280 bytes
4 heads, 16 sectors/track, 120960 cylinders, total 7741440 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x567ad727

Device Boot Start End Blocks Id System
/dev/mmcblk0p1 * 2048 106495 52224 c W95 FAT32 (LBA)
/dev/mmcblk0p2 106496 6143999 3018752 83 Linux

Disk /dev/sda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders, total 234441648 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000cffe0

Device Boot Start End Blocks Id System
/dev/sda1 4096 234440703 117218304 83 Linux

//////////////////////////
OK , I had put this line in my .etc/fstab file: /dev/sda1 /home/shares/public/disk1 auto noatime 0 0
I thought that would mount it automatically, but I can see from the fdisk and df results it isn't.
How can I force it to mount to disk1 when it boots?
I manually mounted it there and df -h shows it , but it doesn't get any larger in Wndows7, still the size of /root on the pi. Tried re-mapping the drive in Windows, still small.
Any suggestions?
Thank you all for the help so far, at least I know what my problem is.
TomJ

edit:
From reading other posts, could the problem be that the disk is formatted as ext4 instead of NTFS?
I was trying to use ext4 because of a lot of posts saying it was faster.
TomJ
Einstein once said you don't really understand anything until you can explain it to your Grandmother

1HzCoder
Posts: 31
Joined: Thu Jul 12, 2012 1:15 am
Location: Lower Alabama

Re: Wrong NAS disk size

Wed Apr 10, 2013 2:54 pm

OK used Simonthepimans instructions from this post http://www.raspberrypi.org/phpBB3/viewt ... =27&t=8657
sda1 now mounts automatically on reboot at /home/shares/public/disk1, df -h says 111Gb (I was wrong on size of ext hdd), but windows still can't see the external disk. Tried re-mapping the drive again, no change.
Maybe map to a subdirectory on disk1?
A-a-argh, I know this is simple, I guess I am just dumber than I thought.
I set up a samba share on redhat linux back around 2000, thought I could do it again.
TomJ
Einstein once said you don't really understand anything until you can explain it to your Grandmother

Return to “Beginners”