Author Topic: Trying to add in a 2nd automount HDD (Hard Drive)  (Read 7997 times)

chipppy

  • Veteran
  • ***
  • Posts: 65
    • View Profile
Trying to add in a 2nd automount HDD (Hard Drive)
« on: February 24, 2009, 06:48:20 am »
I am trying to add in a 2nd automount HDD
Items in bold are copy/paste from files/terminal/etc

At the bottom is the output from commands I though might help.
     sudo fdisk -l
     sudo blkid
     cat /etc/fstab
     df -h
     id

I am new to Linux and I am trying to setup a HTPC box.
The 2nd HDD is to increase the storage space for movies (1TB HDD).

I have edited the fstab to look like the following, last two line I added in. (The # is to keep it as a comment for the moment until I am sure things are correct)

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=7ddfc935-8b71-41f7-9655-3c6d47860d76 / ext3 errors=remount-ro 0 1
# /dev/sda6
UUID=3f968843-e1e6-43e8-a8ff-de2ca1f4b4f7 /var/lib xfs defaults 0 2
# /dev/sda5
UUID=d4c916b3-0e43-4a4e-b8b6-36abf1afd0f0 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

#/dev/sdb1 LABEL="Movies"
#UUID="882c7288-47f6-4e23-b171-8727e67cfef0 /var/lib xfs defaults 0 2


The idea is to add in /dev/sdb1 to store my movies on. I have mounted in at /var/lib the same as mythtv  automagically did. The same reason for the 'xfs' format.  I will then redirect mythtv to store all video files to /dev/sdb1
Is this the right way to set this up? (location, format type, mount point, etc)

I also have a second problem here.
I want to increase the size of my 'ext3' boot partion to 50GB as it is curently only 11GB and getting full of games.
How do I do this?
In partion editor I cannot change the size of this partion /dev/sda1. I think that I need to unmount all the sda*'s before i can change thier size but i am not sure and I also dont know how to do this as it wont let me unmount anything in /dev/sda.
How do I increase the size of the /dev/sda1 partion?

Cheers
chipppy

chipppy@chipppy:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d8e47

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1459 11719386 83 Linux
/dev/sda2 1460 60801 476664615 5 Extended
/dev/sda5 1460 1583 995998+ 82 Linux swap / Solaris
/dev/sda6 1584 60801 475668553+ 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b842f

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux
chipppy@chipppy:~$ sudo blkid
/dev/sda1: UUID="7ddfc935-8b71-41f7-9655-3c6d47860d76" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="d4c916b3-0e43-4a4e-b8b6-36abf1afd0f0"
/dev/sda6: UUID="3f968843-e1e6-43e8-a8ff-de2ca1f4b4f7" TYPE="xfs"
/dev/sdb1: LABEL="Movies" UUID="882c7288-47f6-4e23-b171-8727e67cfef0" TYPE="xfs"
chipppy@chipppy:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=7ddfc935-8b71-41f7-9655-3c6d47860d76 / ext3 errors=remount-ro 0 1
# /dev/sda6
UUID=3f968843-e1e6-43e8-a8ff-de2ca1f4b4f7 /var/lib xfs defaults 0 2
# /dev/sda5
UUID=d4c916b3-0e43-4a4e-b8b6-36abf1afd0f0 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
chipppy@chipppy:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 12G 3.6G 6.9G 35% /
tmpfs 2.0G 0 2.0G 0% /lib/init/rw
varrun 2.0G 336K 2.0G 1% /var/run
varlock 2.0G 0 2.0G 0% /var/lock
udev 2.0G 3.0M 2.0G 1% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
lrm 2.0G 2.4M 2.0G 1% /lib/modules/2.6.27-11-generic/volatile
/dev/sda6 454G 11G 444G 3% /var/lib
chipppy@chipppy:~$ id
uid=1000(chipppy) gid=1000(chipppy) groups=4(adm),20(dialout),24(cdrom),46(plugdev),10 8(mythtv),115(lpadmin),117(sambashare),123(admin), 1000(chipppy)
ASUS P5Q SE/R, Gigabyte 8400GS - Composite TV, 4GB 1066, Intel E8500 3.15GHz dual core, 500GB HDD + 1TG HDD, Divco FusionHDVT DVB-T Digital Dual 4 TV tuner.

'Cry wolf and let slip the dogs of war'

totallymaxed

  • LinuxMCE God
  • ****
  • Posts: 4660
  • Smart Home Consulting
    • View Profile
    • Dianemo - at home with technology
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #1 on: February 24, 2009, 10:37:44 am »
I am trying to add in a 2nd automount HDD
Items in bold are copy/paste from files/terminal/etc

At the bottom is the output from commands I though might help.
     sudo fdisk -l
     sudo blkid
     cat /etc/fstab
     df -h
     id

I am new to Linux and I am trying to setup a HTPC box.
The 2nd HDD is to increase the storage space for movies (1TB HDD).

I have edited the fstab to look like the following, last two line I added in. (The # is to keep it as a comment for the moment until I am sure things are correct)

# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=7ddfc935-8b71-41f7-9655-3c6d47860d76 / ext3 errors=remount-ro 0 1
# /dev/sda6
UUID=3f968843-e1e6-43e8-a8ff-de2ca1f4b4f7 /var/lib xfs defaults 0 2
# /dev/sda5
UUID=d4c916b3-0e43-4a4e-b8b6-36abf1afd0f0 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0

#/dev/sdb1 LABEL="Movies"
#UUID="882c7288-47f6-4e23-b171-8727e67cfef0 /var/lib xfs defaults 0 2


The idea is to add in /dev/sdb1 to store my movies on. I have mounted in at /var/lib the same as mythtv  automagically did. The same reason for the 'xfs' format.  I will then redirect mythtv to store all video files to /dev/sdb1
Is this the right way to set this up? (location, format type, mount point, etc)

I also have a second problem here.
I want to increase the size of my 'ext3' boot partion to 50GB as it is curently only 11GB and getting full of games.
How do I do this?
In partion editor I cannot change the size of this partion /dev/sda1. I think that I need to unmount all the sda*'s before i can change thier size but i am not sure and I also dont know how to do this as it wont let me unmount anything in /dev/sda.
How do I increase the size of the /dev/sda1 partion?

Cheers
chipppy

chipppy@chipppy:~$ sudo fdisk -l

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000d8e47

Device Boot Start End Blocks Id System
/dev/sda1 * 1 1459 11719386 83 Linux
/dev/sda2 1460 60801 476664615 5 Extended
/dev/sda5 1460 1583 995998+ 82 Linux swap / Solaris
/dev/sda6 1584 60801 475668553+ 83 Linux

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x000b842f

Device Boot Start End Blocks Id System
/dev/sdb1 1 121601 976760001 83 Linux
chipppy@chipppy:~$ sudo blkid
/dev/sda1: UUID="7ddfc935-8b71-41f7-9655-3c6d47860d76" TYPE="ext3"
/dev/sda5: TYPE="swap" UUID="d4c916b3-0e43-4a4e-b8b6-36abf1afd0f0"
/dev/sda6: UUID="3f968843-e1e6-43e8-a8ff-de2ca1f4b4f7" TYPE="xfs"
/dev/sdb1: LABEL="Movies" UUID="882c7288-47f6-4e23-b171-8727e67cfef0" TYPE="xfs"
chipppy@chipppy:~$ cat /etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc defaults 0 0
# /dev/sda1
UUID=7ddfc935-8b71-41f7-9655-3c6d47860d76 / ext3 errors=remount-ro 0 1
# /dev/sda6
UUID=3f968843-e1e6-43e8-a8ff-de2ca1f4b4f7 /var/lib xfs defaults 0 2
# /dev/sda5
UUID=d4c916b3-0e43-4a4e-b8b6-36abf1afd0f0 none swap sw 0 0
/dev/scd0 /media/cdrom0 udf,iso9660 user,noauto,exec,utf8 0 0
chipppy@chipppy:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 12G 3.6G 6.9G 35% /
tmpfs 2.0G 0 2.0G 0% /lib/init/rw
varrun 2.0G 336K 2.0G 1% /var/run
varlock 2.0G 0 2.0G 0% /var/lock
udev 2.0G 3.0M 2.0G 1% /dev
tmpfs 2.0G 0 2.0G 0% /dev/shm
lrm 2.0G 2.4M 2.0G 1% /lib/modules/2.6.27-11-generic/volatile
/dev/sda6 454G 11G 444G 3% /var/lib
chipppy@chipppy:~$ id
uid=1000(chipppy) gid=1000(chipppy) groups=4(adm),20(dialout),24(cdrom),46(plugdev),10 8(mythtv),115(lpadmin),117(sambashare),123(admin), 1000(chipppy)


Firstly dont edit fstab yourself on your Core... let the system auto detect/mount your drives. If you add them manually you will just creat problems for yourself.

Use the Ext3 line from this Wiki page to prepare your new drive(s) http://wiki.linuxmce.org/index.php/Frequently_Asked_Questions#How_should_I_format_additional_hard_drives.3F

After the steps above reboot and then allow your Core to detect the new partition... this can take 10 mins or so.

All the best

Andrew
Andy Herron,
CHT Ltd

For Dianemo/LinuxMCE consulting advice;
@herron on Twitter, totallymaxed+inquiries@gmail.com via email or PM me here.

Get Dianemo-Rpi2 ARM Licenses http://forum.linuxmce.org/index.php?topic=14026.0

Get RaspSqueeze-CEC or Raspbmc-CEC for Dianemo/LinuxMCE: http://wp.me/P4KgIc-5P

Facebook: https://www.facebook.com/pages/Dianemo-Home-Automation/226019387454465

http://www.dianemo.co.uk

RayBe

  • Guru
  • ****
  • Posts: 315
    • View Profile
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #2 on: August 25, 2010, 04:20:24 pm »
Hi Andrew,

i did as you suggested but without luck,

i put in a brand new 2TB WD green drive, opened a terminal, and typed:
mke2fs -b 4096 -m 1 -j /dev/sdb
this ran through just fine, after this i rebooted and waited appr. 10 min but still LMCE doesn't autodetect the drive.

any suggestions?

br
Raymond
When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #3 on: August 26, 2010, 02:15:01 pm »
Your problem was that you did not even partition the drive.

You MUST put at least one partition on the drive, and run mke2fs on the partition device, NOT the whole disk.

i.e. mke2fs -b 4096 /dev/sdb1

although, honestly, if you're going to use ext2, you might as well add -j and use ext3...

or even better, install xfsprogs and use mkfs.xfs /dev/sdb1 to initialize the drive, you'll get better performance...

or...even easier...just put your media storage on NAS... a lot more abstracted. We don't provide a utility in the system to initialize drives because it's far easier to just attach NAS bricks.

-Thom

RayBe

  • Guru
  • ****
  • Posts: 315
    • View Profile
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #4 on: August 26, 2010, 02:57:32 pm »
Thanks Thom,

before i read this i also came to the conclusion that i had to have a partition so i made 1 with fdisk,
then i formatted the drive with the -j option (as discribed in the wiki, maybe needs update if i read your post :) )
and now LinuxMCE recognized the drive.

i made only 1 primary partition of 2TB.
there is only 1 thing that looks strange, if i look at the devicedata of the 2TB drive (in the device tree) it shows:
Capacity: 1012M
Free Disk Space in MBytes: 1858518

so i wonder, do i have 2TB of diskspace to use this way?

the reason for me to use internal disks is that i have a mobo with 10 sata connectors,
i don't have to spent money on a extra nas box, and i don't have to connect 2 powereating machines to a powersocket :)
also i like the idea of 1 core that controles all (in hard and software)

br
Raymond
« Last Edit: August 26, 2010, 03:12:47 pm by RayBe »
When you were born, you were crying and everybody else was laughing.
Live your life so when you die, you are laughing and everybody else is crying.

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #5 on: August 27, 2010, 11:00:53 am »
Quote
Firstly dont edit fstab yourself on your Core... let the system auto detect/mount your drives. If you add them manually you will just creat problems for yourself.

Use the Ext3 line from this Wiki page to prepare your new drive(s) http://wiki.linuxmce.org/index.php/Frequently_Asked_Questions#How_should_I_format_additional_hard_drives.3F

After the steps above reboot and then allow your Core to detect the new partition... this can take 10 mins or so.

All the best

Andrew
For internal HDD and NAS the autodetection and automounting work perfect in 0810. But I had a problem with USB HDD. It was detected and added by the system. But sometimes I cannot access it. Even from terminal when run ls it freezes till I kill the process. So, I just delete the device from LinuxMCE, create manually symlink in the public/data/video and audio and mount it by usbmount. It works perfect except two things - content is available only on core and not on MD, you cannot rip CD/DVD on that drive.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #6 on: August 27, 2010, 11:05:23 am »
USB HD's are not best practice in linuxmce, I thought.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3676
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #7 on: August 27, 2010, 11:07:25 am »
USB HDD tax the system a lot.

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #8 on: August 27, 2010, 12:59:14 pm »
USB HD's are not best practice in linuxmce, I thought.
Maybe but they're cheaper then NAS and they are quiet.
Quote
USB HDD tax the system a lot.
That's why I mount it by myself and not by LMCE. In that case it isn't produce any problem for the system.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

bongowongo

  • wants to work for LinuxMCE
  • **
  • Posts: 826
    • View Profile
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #9 on: August 27, 2010, 02:14:05 pm »
Ok they are cheaper, but they also lack IO and lack features.
They are uncomparible with a NAS.
But I thought there was something wrong with linuxMCE that it doesn't like USB-sticks/USB-HD's etc etc.

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #10 on: August 27, 2010, 02:28:11 pm »
If you attach USB HDD to your core or MD why do you need some other features except read/write??? Only RAID I guess. But in any case sometimes it causes more troubles then advantages IMHO. BTW, I have both 1Tb USB HDD (got as a present) and 2Tb NAS (bought it two years ago). But to be honest  if I'd have a choice now between NAS and USB HDD I vote for USB HDD.
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #11 on: August 27, 2010, 03:45:31 pm »
Sorry, the sheer amount of overhead that USB HDD's do to the system, coupled with the fact that with your method you lose virtually all of the features of the Pluto Storage Devices system, I can't recommend this for _ANY_ user. AT ALL.

Why do you guys feel a need to completely fuck up the system, and not try to fix the underlying problems?!

-Thom

nite_man

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1019
  • Want to work with LinuxMCE
    • View Profile
    • Smart Home Blog
Re: Trying to add in a 2nd automount HDD (Hard Drive)
« Reply #12 on: August 27, 2010, 04:44:27 pm »
Sorry, the sheer amount of overhead that USB HDD's do to the system, coupled with the fact that with your method you lose virtually all of the features of the Pluto Storage Devices system, I can't recommend this for _ANY_ user. AT ALL.

Why do you guys feel a need to completely fuck up the system, and not try to fix the underlying problems?!

-Thom
Personally I don't have time, knowledges and desire to patch the Pluto Storage Devices system to properly support USB HDD. I just need to play media files from the attached HDD. Nothing more. The system work fine with my workaround without any fuck-ups. It really fucks up when I used the native storage functionality for USB HDD. Sure I don't push people to do the same dirty trick. If somebody would like to fix it - go ahead!
Michael Stepanov,
My setup: http://wiki.linuxmce.org/index.php/User:Nite_man#New_setup
Russian LinuxMCE community: http://linuxmce.ru