Welcome! Log In Create A New Profile

Advanced

Prepping 1 TB portable drive to USB Pogoplug?

Posted by JoeyPogoPlugE02 
Prepping 1 TB portable drive to USB Pogoplug?
August 10, 2015 07:33PM
This week at Best Buy for $49 they have a WD My Passport Ultra 1TB Portable External Hard Drive USB 3.0. I managed one, and hopefully on a pauper's budget can swing a 2nd one for safety backup. I'd like to use this for home cloud storage, and have choice of Debian E02 or Pros whatever is best for the job. So..... I should be able to just make two partitions on the WD and copy the USB stick to partition 1 and use the massive 2nd partition for storage right?

I do like the idea grayman4hire mentioned about configuring Pogo so you could run it connected to a switch when you wanted to, and when the wireless router is on you could get in from neighborhood wireless that way. But before I get ahead of yourself...

thought I'd see if the gurus can be persuaded to share any thoughts on anything to do with it?

=========
-= Cloud 9 =-
Re: Prepping 1 TB portable drive to USB Pogoplug?
August 10, 2015 07:56PM
Joey,

I like Pogo E02 better with more RAM for Homecloud or NAS, if you only ever attach USB HDDs to it. And if you are going to run additional memory-intensive apps later then Pogo E02 is better. In real life uses, Pogo E02 memory pretty much negates the CPU advantage of the Pro (once the Pro starts swaping, its CPU and SATA are not going to help much).

OtOH, think about your future use cases what you will want to make it doing :) SATA and more CPU of the Pro might be better choice in certain cases.

So it is hard to choose. If I were you, I would choose Pogo E02 to do NAS and Homecloud as of today. You can buy another Pogo Pro for less than $20 later, if you really need it

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Prepping 1 TB portable drive to USB Pogoplug?
August 10, 2015 10:29PM
I currently run several Pogo E02s with standard hard drives installed in a cheap USB case. Some SATA, some IDE. They work great. I've also used portable external drives in the past, but they have issues. Perhaps the most significant one is that the portables are usually set up in their firmware to park the heads after several seconds of quiescence. This is done so that if they are accidentally dropped they are better protected from a head crash. But, when they are used in a 24x7 application, they can rack up a startling number of head parks quite quickly. You can usually get the counts with the SMART tool "smartctl". The counts are stored under the field "Load_Cycle_count". In one WD drive I used for a brief period, I found it had parked its heads over 250K times in a three month period, and most drives are only rated for 300K - 1M parks in their lifetime. This can lead to premature drive failures.

Dealing with this depends upon the drive. Sometimes you can turn off power management or set the drive for maximum performance to prevent this auto-head-parking. Sometimes nothing seems to work. But be aware that you have to re-apply this setting each time the drive is powered up. Typically, you can put the appropriate "smartctl" command in /etc/rc.local to accomplish this, once you figure out what works with your drive.

Another potential problem is the drive spinning down after several minutes (typically 5 - 15) of inactivity, but normally Linux hits the drive often enough that this does not happen.

And, sometimes, this can even be advantageous: I have a SheevaPlug with Linux on an SD card which I use for recording digital TV programs. The programming itself goes to an external HD which stays spun down when it is neither recording nor feeding a program to me to watch. Saves wear-and-tear on the drive.

But, in any event, pay close attention to the "Load_Cycle_count" field of the SMART tool readout when putting your system together to make sure the drive isn't beating itself to death with head parks and reloads, if you intend to use it in a 24x7 application.

(I have an old Toshiba portable I use for testing. Normally, it doesn't stay up for more than a day, or a weekend. It generates a couple thousand "Load_Cycle_count" events in the course of that time, but since it is only occasionally used, I don't worry about it.)

Good luck with your project. I do prefer spinning disks on my Pogos as opposed to thumb drives.
YEAH!
August 11, 2015 12:21AM
@ bodhi: Sounds great, the only thing I'll change last minute is use a recently bought G-connect 500 GB. White external hard drive for E02 and black for the Pro, makes aesthetic sense.

@ restamp: scary stuff, reminds me of a WD Green my neighbor gave me when upgrading his DirecTV receiver and I got his old one. It was 1 /1/2 hours of awesome and then the head parking problem reared it's ugly... you guessed it, head.

As for disks spinning down, that's great, the kind of thing I like to know is happening if it sits all night on idle.

So i'll have to look into the head parking issue and see what's the best treatment for this device - I'd made a blind assumption it's just a WD Scorpio. Could be for all I know. If so I have a laptop to re purpose it because the last scorpio was great and ran 4 OSs. Swap drives and use the old one for the Pogo @ 250GB. Yeah, turn this around, make it work for me. :-D Truth be told, I have no Seagate failures in 10 years, and three WD fails.

So if you guys have recommendations for more reliable hard drives for home NAS, do tell. I can put the portables to some other use that's every bit as useful. Problem for me is the 10 watts it always takes to run a "standard" hard drive from an adapter - negates Pogo's original strong point and makes me re-think a Windows machine that has wake on demand, with redundant hard drives. Also sitting idle at 5-watts or less.

HELP! :-)

=========
-= Cloud 9 =-



Edited 2 time(s). Last edit at 08/11/2015 12:27AM by JoeyPogoPlugE02.
Re: YEAH!
August 11, 2015 04:52AM
Joey,

> receiver and I got his old one. It was 1 /1/2
> hours of awesome and then the head parking problem
> reared it's ugly... you guessed it, head.

:))

> So if you guys have recommendations for more
> reliable hard drives for home NAS, do tell.

If you get 3.5" HDD with adapter, then Hitachi is pretty reliable drives (used to be Hitachi, but I think they are under different brand now, HGTS?). My 2nd choice for 3.5" is Seagate's. And you'd put it sleep most of the time on the Pogo so you'll get your low power usage requirement there! The used 3.5" case for GoFlex Desk can be had for < $10 on eBay.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Prepping 1 TB portable drive to USB Pogoplug?
August 11, 2015 11:11AM
Like this?

=========
-= Cloud 9 =-
Re: Prepping 1 TB portable drive to USB Pogoplug?
August 11, 2015 03:35PM
Yes. But note that it does not come with SATA to USB cable. The snap-in stock base that comes with this enclosure is more expensive than a common 3rd party adapter.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Prepping 1 TB portable drive to USB Pogoplug?
August 11, 2015 04:09PM
Could you recommend a specific 3.5" case for GoFlex Desk so I have a higher likelihood of success? I get all excited you see...

As far as the USB 2.0 speed limit of the E02, no problem at all here.

Other than that, only one more question if anyone's up for it - which SATAs (whether adapted to E02 or straight to Pro), match closer? SATA 1? II? you know.

=========
-= Cloud 9 =-
Re: Prepping 1 TB portable drive to USB Pogoplug?
August 11, 2015 04:25PM
Joey,

> Could you recommend a specific 3.5" case for
> GoFlex Desk
so I have a higher likelihood of
> success? I get all excited you see...
>

The enclosure I've posted above is stock Seagate. It is the GF Desk enclosure out of the box, with the USB 3.0 adapter base, and a HDD inside. I had no problem using this GoFlex Desk adapter and enclosure combo on Pogo plugs.

I don't know enough about 3.5" USB enclosures in general. So should let others chime in.

> Other than that, only one more question if
> anyone's up for it - which SATAs (whether adapted
> to E02 or straight to Pro), match closer? SATA 1?
> II? you know.

SATA II (3Gbs). But if your HDD is SATA I, it should work fine on the Pro. If connected to USB adapter, then it does not really matter.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
SWEET!
August 11, 2015 04:58PM
Ah thanks a lot!

But don't give up on me yet! Please let me pick your brain one last time this thread and see what you say.

I suspect the benefit of restamp's method of having maybe USB stick with the OS on USB port 1, and use the spinning disk for data storage and retrieval. Keep a backup of the 8-GB USB stick of course. But let's say on my 500 GB data drive, what if I formatted a 1-2 GB as swap, would Debian on the USB stick ever use it? Or is that a good idea? Because of spindown events

All done! :-)

=========
-= Cloud 9 =-



Edited 2 time(s). Last edit at 08/11/2015 05:01PM by JoeyPogoPlugE02.
Re: SWEET!
August 11, 2015 06:07PM
Joey,

> I suspect the benefit of restamp's method of
> having maybe USB stick with the OS on USB port 1,
> and use the spinning disk for data storage and
> retrieval. Keep a backup of the 8-GB USB stick of
> course. But let's say on my 500 GB data drive,
> what if I formatted a 1-2 GB as swap, would Debian
> on the USB stick ever use it? Or is that a good
> idea? Because of spindown events

Right on! the USB HDD is sleeping most of the time, but if you run something memory intensive, it will be woken up by the kernel for swapping. This is a good thing, the way it should work. If your system is idle, or nothing got swapped then the drive is back to sleep.

An example how to make optimal use of this set up. You want to have 2 swap files:

- swapfile1 is on USB stick at root folder /swapfile1, and your /etc/fstab has specified this swapfile1 in there
/swapfile1     swap            swap    defaults          0       0

- swapfile2 is on the USB HDD, at root folder for the mounted disk: /media/sdb1/swapfile2 (or whatever mounted letter or label the drive was mounted at).

Here is how you can choose swapfile2 dynamically (put these lines of script in /etc/rc.local). If your USB HDD is mounted as /media/HOME:
if [ -f /media/HOME/swapfile2 ]; then
            swapoff -a
            swapon /media/HOME/swapfile2
            logger -s -i "Swap ON using /media/HOME/swapfile2"
         else
            logger -s -i "/media/HOME/swapfile2 not found, use system default swapfile1"
         fi

Important note for this setup, you will need to turn off swap before removing the USB HDD for whatever reason. Don't just unmount it:
swapoff -a
umount /media/HOME

EDIT: typo in comments

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 08/11/2015 11:46PM by bodhi.
nose to grindstone
August 11, 2015 09:36PM
Just letting you know, I'm copying everything from the G-Connect (Hitachi 500 GB) and will get a swap partitioned ASAP.
So the G-Connect will have one swap and one 498 GB FAT32 partition.

I'm going real slow but that's been a good policy, in fact now that I think of it I can probably do test runs with drives that are expendible anyway.

Can't thank you enough, and hope this will help others.

Back in a byte (haha, did you see that one? Oh man, CLEVER!)

=========
-= Cloud 9 =-
Re: nose to grindstone
August 11, 2015 11:53PM
JoeyPogoPlugE02 Wrote:
-------------------------------------------------------
> Just letting you know, I'm copying everything from
> the G-Connect (Hitachi 500 GB) and will get a swap
> partitioned ASAP.
> So the G-Connect will have one swap and one 498 GB
> FAT32 partition.
>
> I'm going real slow but that's been a good policy,
> in fact now that I think of it I can probably do
> test runs with drives that are expendible anyway.
>
>
> Can't thank you enough, and hope this will
> help others.
>
> Back in a byte (haha, did you see that one? Oh
> man, CLEVER!)

In case you've overlooked. Swap file is not the same as swap partition. If you use a swap partition, the script above is not applicable. If you use a normal HDD partition, and then put the 2nd swap file there, then the script above is applicable.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
yeah I overlooked
August 12, 2015 02:07PM
Appreciated, better real safe than real sorry is probably my motto. Found my 10-watt power adapter so I'm clearing an old SATA to use as a guinea pig.

Since I've got some time to kill, you know there's one thing Pogoplug-specific I've never gotten to the bottom of. When you plug in another drive, I still don't understand how to know what it's name is. "sdb1" and all that. Even at my lacking linux skill level I could use Webmin to start a Samba folder, but when I've plugged in something I don't know what to call it (or what it's called).

We've gone near that topic, but not enough for me to mount something. Say I've got a working Debian self-contained USB stick plugged into Pogoplug and running fine. I format a hard disk that will be all data and plug it in. how do i know the name that Linux wants to hear in order to mount it?

=========
-= Cloud 9 =-
Re: yeah I overlooked
August 12, 2015 03:10PM
Joey,

> how do i know the name
> that Linux wants to hear in order to mount it?

Look in dmesg output before and after inserting the USB drive. It will show the assigned drive letter.
dmesg | tail

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Prepping 1 TB portable drive to USB Pogoplug?
August 12, 2015 11:14PM
One before and one after - inserting a test USB formatted FAT32 with lots of pictures (that are backed-up):

root@debian:~# dmesg | tail
[   14.578908] kjournald starting.  Commit interval 5 seconds
[   16.004449] udevd[259]: starting version 175
[   16.633017] orion_wdt: Initial timeout 21 sec
[   16.786446] USB Power: 5000 mV
[   17.246687] random: nonblocking pool is initialized
[   18.271347] EXT3-fs (sda1): using internal journal
[   23.109516] NET: Registered protocol family 10
[   24.349616] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   27.394300] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, ful    l duplex, flow control disabled
[   27.404229] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready


root@debian:~# dmesg | tail
[  365.607033] usb-storage 1-1.2:1.0: USB Mass Storage device detected
[  365.622892] scsi host1: usb-storage 1-1.2:1.0
[  366.871242] scsi 1:0:0:0: Direct-Access     Lexar    USB Flash Drive  8.07 PQ    : 0 ANSI: 4
[  366.891571] sd 1:0:0:0: Attached scsi generic sg1 type 0
[  366.898689] sd 1:0:0:0: [sdb] 62537728 512-byte logical blocks: (32.0 GB/29.8     GiB)
[  366.914584] sd 1:0:0:0: [sdb] Write Protect is off
[  366.919409] sd 1:0:0:0: [sdb] Mode Sense: 23 00 00 00
[  366.923332] sd 1:0:0:0: [sdb] Write cache: disabled, read cache: enabled, doe    sn't support DPO or FUA
[  366.994418]  sdb: sdb1 < sdb5 >
[  367.007306] sd 1:0:0:0: [sdb] Attached SCSI removable disk
root@debian:~#

To be on the safe side initially, I'm using webmin > Samba Windows File Sharing and it's easy to share a directory on the OS stick (have been for a while) but I'm missing something when it comes to recognizing an additional USB stick or HD plugged in.
Another thing with Webmin, there's something about that type of GUI that makes it easier to comprehend when I look at a configuration file later on.
Can you see the blind spot i'm missing?

(Admittedly my host and pass will change before this is online with internet on).

=========
-= Cloud 9 =-



Edited 1 time(s). Last edit at 08/12/2015 11:19PM by JoeyPogoPlugE02.
Best laid plans of mice & men
August 14, 2015 01:33PM
Gents, Pogoplug > Samba might not be in the cards here. I've tried E02 Debian (fail) and Pro > OpenWRT (fail too) and what I've learned is, this is higher than my skill level.

While I don't see easy documentation on the web, maybe someone does. On a good note, I haven't whacked anything, can't complain there.

The two methods I haven't tried is Pro with Debian or DavyGravy's samba server. Really all this is for is picture viewing over LAN for relatives and photo editing. The rest i could just plug anything into my router USB port, but those thumbnails are real important to me and others.

Any ideas, fire away - or easier documentation somewhere. It's a lot easier to see what we're trying to do when it's done right and you can dissect what works.

=========
-= Cloud 9 =-
Samba smb.conf for a simple set up
August 14, 2015 04:22PM
Joey,

The problem with using Webmin is a lot of us here don't use it. So probably nobody has ideas why it did not work for you. Most everybody probably did this only when starting to play with Linux. Can you turn off that option in Webmin? and then set it up manually using instruction found searching the net, or use this instruction here.

With Samba, the best way to make it work is to start small. Once it is working, then worry about restricted shares with login credentials. Here is the summary:

1. Install Samba (you've already done this) with apt-get ....

2. Set up a public share (no login credential). This is a wide open share that everybody in the network will have read/write privelege. Here I've attached my simplest smb.conf that you can use. Download it to your box, save the current one, and copy the new smb.conf to this directory

cd /etc/samba
mv smb.conf smb.conf.save
and then copy the download smb.conf to here.

3. Test the Samba conf file for any syntax error:
testparm
If there is any error then it will give some indication where to fix, if not then you will see normal output of the test.

4. Restart Samba
/etc/init.d/samba restart


Explanation for a few customization in smb.conf

I've modified the stock Samba conf to optimize it (you can do a diff and see the changes). There are 2 changes that you need to be aware:

1. The log file was moved to /tmp so that it will log to memory instead of disk:
#   log file = /var/log/samba/log.%m
   log file = /tmp/logsamba.%m

2. The share definition is at the end of the file. This will share everything under /media as public. It means all USB drives plugged in will be visible to everybody, and they have full privilege, no credential needed (be careful to avoid sharing R-rate or higher-rate material to kids :-). Note that because it is /media, if any of your HDD partition was mounted under /media then it will also be shared.
[media]
        comment = shared media (eg. USB drives)
        path = /media
        browseable = yes
        writeable = yes
        guest ok = yes

If you want to make a Samba share for another folder in the sdb1 HDD then follow the example above, copy/paste and name the share of that folder. For example:
[Pictures]
        comment = shared media (eg. USB drives)
        path = /media/sdb1/Pictures
        browseable = yes
        writeable = yes
        guest ok = yes

You can see above pattern. If you don't want to make all the drives mounted under /media visible, then only include the share definition for each subfolder under it (in this case it is Pictures). Comment out the [media] share definition above, if that is what you want to do. I would recommend this approach, since you are sharing a public share, where less technical-savy users can mess up the content by accident! and also back it up regularly, too.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 2 time(s). Last edit at 05/04/2017 11:56PM by bodhi.
Attachments:
open | download - smb.conf (11.9 KB)
edit
August 14, 2015 11:39PM
.



Edited 2 time(s). Last edit at 09/10/2015 11:20PM by JoeyPogoPlugE02.
delete me
August 18, 2015 02:20AM
progress



Edited 1 time(s). Last edit at 09/10/2015 11:22PM by JoeyPogoPlugE02.
-=success-for-the-most-part=-
September 10, 2015 11:39PM
Success! Not fully but partial. I went with a USB 2.0 G-Connect external hard drive.

Using the command fdisk -l showed the hard drive plugged into /dev/sdb1

then I swapped my smb.conf with Bodhi's and added:

[G-Connect]
	guest ok = yes
	comment = Cloud 9!
	writeable = yes
	path = /mnt/sdb1

At first this drove me mad because path was set to path = /dev/sbd1 and it took a consultation at /ect/fstab to review:

/dev/sdb1      /mnt/sdb1       vfat    defaults          0       0

Restart Samba and ONE Windows machine (Win7 x64) on the LAN has read access to G-Connect and it'll settle into 25 MB-sec transfer. Not a speed demon when Pogos own gas-station Sandisk Glides transfer at 33 MB-sec with torrents going on. But a big step up from my Rosewill Gigabit router's USB slot, 12 MB-sec there is fairly normal. And it's fair to say this is practice for SATA II lines on the PogoPros so I'm quite happy with the progress.

As it's getting late and my head is racing a bit, allow me to blurt out what i'll look into tomorrow (comments appreciated)
1. Any idea why no write access? Reads fine from windows.
2. Mint Linux 17.2 is plugged into the same LAN switch and Thumar File manager doesn't seem to so readily see the Pogo nor G-Connect across the LAN
3. testparm and that other one give an error.
# -bash: testparm: command not found

So that's a ToDo find out what's what.





-afterthought- just a mental note to check if i need to use mount /dev/sdb1 again or if it helped. Been a long day and you know I'm not the sharpest knife in the drawer lol

=========
-= Cloud 9 =-



Edited 2 time(s). Last edit at 09/11/2015 12:06AM by JoeyPogoPlugE02.
Re: Best laid plans of mice & men
June 08, 2016 04:50PM
I have done all of the above, but can't write to the USB stick. I simply copied and pasted bohdi's file, after deleting the contents of the existing config file. While on the xfce desktop, I can write to the shared stick. But connected via Thunar, as root, I can't write to it. Any suggestions would be great. I need as well to set up users, shares for them, etc. But that comes later, however, anyone here with a guide I've missed in the forum for that, please direct me.
Thanks a lot everyone. And specially to bohdi for this config file.
Re: Best laid plans of mice & men
June 08, 2016 05:15PM
Author:

Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: