Author Topic: Reading an external HDD  (Read 1568 times)

0 Members and 1 Guest are viewing this topic.

Offline galaxytdm

  • Ubuntu 11.04
  • Sr. Member
  • ****
  • Posts: 284
  • Karma: 7
  • Gender: Male
  • Something Something dark side
    • View Profile
    • Awards
Reading an external HDD
« on: November 21, 2013, 12:37:12 pm »
I've been thinking of getting a 3 TB internal HDD as mentioned elsewhere and using the desktop as a media server.
The wife overheard this and bought me one, trouble is, she bought an external usb HDD.
It came formatted to NTFS but as the TV could not handle this I reformatted it to fat32. I can now read/write with the DT via USB then plug it into the TV and play the media files from it.
What I would like to know is, is there any way I can leave it plugged into the computer and have plex read from it.
I can create a file path to it but plex/USHARE/minidlna can't read from it for some reason.
I know ultimately I can split the case and remove the HDD and put it in the computer but that seems a little disrespectful.
The drive is a Samsung D3 station.
Any help is much appreciated.
If you need help ask a professional, then act upon their advice.
Anything less and you're just wasting peoples time.

Offline chemicalfan

  • Hero Member
  • *****
  • Posts: 804
  • Karma: 28
  • Gender: Male
  • I've been here a little while!
    • View Profile
    • Awards
Re: Reading an external HDD
« Reply #1 on: November 21, 2013, 01:31:22 pm »
FAT32 isn't good, as you might have files bigger than the maximum filesize limit of 4GB (an HD movie, for example). If your desktop PC/media station is Linux-based, I'd format the drive to ext4. Much better filesystem than FAT32 (which is so old that Microsoft hasn't used it as their primary FS for over 10 years).

But I digress... I guess this is a smart TV running Plex? Plex Media Server is available for Linux, so you can run that on your desktop, configure it to point to the external drive, then connect to it from the TV. The fact the drive is external doesn't matter to Linux, it'll still mount it. If the PC isn't on all the time, you can set up a mount in fstab so that the machine always mounts the drive on boot (only do this if the drive will ALWAYS be connected though!).

Offline pooky2483

  • Hero Member
  • *****
  • Posts: 1620
  • Karma: 0
  • Gender: Male
  • Slowly getting the hang of it.
    • View Profile
    • Get your FREE Ubuntu stickers here. I'm the UK address
    • Awards
Re: Reading an external HDD
« Reply #2 on: November 21, 2013, 02:12:44 pm »
The only problem formatting the 3TbHd to ext4 is that you can't partition the full 3TbHd as one, you'll have to split it in half, as I found out as I have 2 3TbHd's.
I too wanted to plug the Hd into my TV, a Samsung Series 4, which hasn't got the capabilities of being networked  :(

Kubuntu 12.04LTS 64bit|KDE 4.13.2|QT 4.8.6|Linux 3.2.0-68-generic|M3A76-CM|BIOS 2101|AMD PhenomII X4 965 3400+|Realtek RTL8168C(P)|8111C(P) PCI-E Gigabit Ethernet NIC|NVIDIA 128MB GeForce6200 Turbocache|8.0GB Single-Channel DDR2|

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14279
  • Karma: 354
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Reading an external HDD
« Reply #3 on: November 21, 2013, 03:19:32 pm »
Fat32 sucks, specially as a file system for media as you cannot have files larger than 4gb.

If it's ever going to be directly connected to a windows PC, use NTFS

If it's only ever going to be connected to a Linux machine, and act as storage for a media server .. why not use XFS or JFS ?
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline SeZo

  • Hero Member
  • *****
  • Posts: 1549
  • Karma: 122
  • Gender: Male
    • View Profile
    • Awards
Re: Reading an external HDD
« Reply #4 on: November 21, 2013, 06:28:04 pm »
The only problem formatting the 3TbHd to ext4 is that you can't partition the full 3TbHd as one, you'll have to split it in half, as I found out as I have 2 3TbHd's.

That is not the fault of ext4. It is the limitation in the Master Boot Record (MBR).
Partitions greater than 2.2TB will need to utilize the GUID Partition Table (GPT) structure.
See here
Here is a guide to help you out.
« Last Edit: November 21, 2013, 06:36:29 pm by SeZo »

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14279
  • Karma: 354
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Reading an external HDD
« Reply #5 on: November 21, 2013, 07:14:26 pm »
Have you tried mounting it through fstab (or manually) rather than through gvfs ?

Or creating a symlink to the gvfs mountpoint say in your home directory .. the point ushare, etc. at the symlink ?
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline galaxytdm

  • Ubuntu 11.04
  • Sr. Member
  • ****
  • Posts: 284
  • Karma: 7
  • Gender: Male
  • Something Something dark side
    • View Profile
    • Awards
Re: Reading an external HDD
« Reply #6 on: November 22, 2013, 07:17:55 pm »
Right, what I have done.
Re formatted to ext 4.

What I have discovered.
My TV will only read fat 32.
The dt will read and write to the drive without issue.
Plex will not read the drive but...
Mini dlna and ushare won't read it either but they both return a lack of permission error.

I assume when you talk about mounting the drive you are just referring to being able to see it with the file manager?
I am afk for the weekend so trying things is not possible but any information to mull over would be appreciated.

SGS 2 and Tapatalk are awesome.

If you need help ask a professional, then act upon their advice.
Anything less and you're just wasting peoples time.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14279
  • Karma: 354
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Reading an external HDD
« Reply #7 on: November 22, 2013, 07:52:00 pm »
OK, now it's ext4 ..

Let's assume the partition on the external drive is /dev/sdb1

Then you could create a mountpoint at say /media/storage:
Code: [Select]
sudo mkdir /media/storage
mount the external HDD with:
Code: [Select]
sudo mount /dev/sdb1 /media/storage
make it writeable by anyone:
Code: [Select]
sudo chmod -R 777 /media/storage
now the contents should be accessible at /media/storage .. including by ushare, etc. as long as they're properly configured.

Obviously the above will need modifying if the external drive is anything other than /dev/sdb1

You can get an idea of the partition device assignment with:
Code: [Select]
sudo fdisk -l

If that works as expected .. you can add the drive/partition to be automounted at boot up from fstab.

--
« Last Edit: November 22, 2013, 07:53:53 pm by Mark Greaves (PCNetSpec) »
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline chemicalfan

  • Hero Member
  • *****
  • Posts: 804
  • Karma: 28
  • Gender: Male
  • I've been here a little while!
    • View Profile
    • Awards
Re: Reading an external HDD
« Reply #8 on: November 25, 2013, 11:53:41 am »
Is this a smart TV capable of streaming over a network via a share? If not, and it can only access the drive by direct USB connection, then FAT32 is your only option. Not sure where Linux comes in here though?  ???

Unless you're purely asking about accessing the drive through Linux - this should be as simple as just plugging it in to the PC's USB port...

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14279
  • Karma: 354
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Reading an external HDD
« Reply #9 on: November 25, 2013, 12:31:58 pm »
It's my understanding that he wants it permanently attached to the Linux PC and it's media contents streamed through Ushare (or similar) to other devices including the TV.

Hence why he originally wanted an internal drive .. so effectively he wants it mounting "normally" rather than through gvfs
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline galaxytdm

  • Ubuntu 11.04
  • Sr. Member
  • ****
  • Posts: 284
  • Karma: 7
  • Gender: Male
  • Something Something dark side
    • View Profile
    • Awards
Re: Reading an external HDD
« Reply #10 on: November 25, 2013, 06:44:18 pm »
Thanks for the info Chemicalfan.
I didn't know that but had worked it out by trial and error but nice to have it confirmed.

@ Mark Greaves
Spot on with the analysis of my requirements.
Creating the mount point worked eventually.
Now to auto mount. The drive is named /dev/sdc1 so if I have understood what I have read I should.....

Code: [Select]
sudo mkdir /mnt/3TBusb

Code: [Select]
sudo cp /etc/fstab /etc/fstab.bak

Code: [Select]
sudo gedit /etc/fstab

Then add

Code: [Select]
/dev/sdc1  /mnt/3tbusb auto auto,user,rw,exec 0 0

or

Code: [Select]
/dev/sdc1  /mnt/3tbusb ext4 auto,user,rw,exec 0 0

to fstab at the bottom, then save and re boot.

If all that is correct what will happen/needs to be done about the mount point we have already created?
If you need help ask a professional, then act upon their advice.
Anything less and you're just wasting peoples time.

Offline Mark Greaves (PCNetSpec)

  • Administrator
  • Hero Member
  • *****
  • Posts: 14279
  • Karma: 354
  • Gender: Male
  • "-rw-rw-rw-" .. The Number Of The Beast
    • View Profile
    • PCNetSpec
    • Awards
Re: Reading an external HDD
« Reply #11 on: November 26, 2013, 01:04:43 am »
I take it it's formatted EXT4 now ?

As  it's an external HDD adding it to fstab by device assignment (/dev/sdc1) is probably unwise as if you insert a USB stick the device assignment may change .. probably best to use UUID, so with the drive plugged in and mounted what's the output from
Code: [Select]
sudo blkid
WARNING: You are logged into reality as 'root'

logging in as 'insane' is the only safe option.

Offline galaxytdm

  • Ubuntu 11.04
  • Sr. Member
  • ****
  • Posts: 284
  • Karma: 7
  • Gender: Male
  • Something Something dark side
    • View Profile
    • Awards
Re: Reading an external HDD
« Reply #12 on: November 26, 2013, 10:53:40 am »
Yes it is ext4 now.

Output is

Code: [Select]
/dev/sda1: UUID="0227ff0d-2ed0-43af-af30-49aa0ef98919" TYPE="ext4" 
/dev/sda5: UUID="d94b9bb9-c04f-41e6-ac14-0d8e0abd1262" TYPE="swap"
/dev/sdb1: LABEL="USB HDD" UUID="1EC4-1101" TYPE="vfat"
/dev/sdb5: UUID="bec031a5-f620-43d5-b057-60797a8dbeaa" TYPE="swap"
/dev/sdc1: LABEL="Samsung D3" UUID="9a4e4dd7-9702-4923-a2a6-2ae8f33ea3d3" TYPE="ext4"

Ignore sdb1, I'll deal with that later.
So I'm guessing I'll need

Code: [Select]
UUID=9a4e4dd7-9702-4923-a2a6-2ae8f33ea3d3  /mnt/3tbusb auto auto,user,rw,exec 0 0
If you need help ask a professional, then act upon their advice.
Anything less and you're just wasting peoples time.

 


SimplePortal 2.3.3 © 2008-2010, SimplePortal