View unanswered posts    View active topics

All times are UTC - 6 hours





Post new topic Reply to topic  [ 15 posts ] 
Print view Previous topic   Next topic  
Author Message
Search for:
 Post subject: Quick hdd question.
PostPosted: Sat Jun 09, 2007 7:57 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
After the debarcle with my last attempt at adding a second harddrive I am now back with a fresh install of R5F1.
I've got my new Samsung SATA-II 500g Spinpoint as my prinary drive. I have a Western Digital 250 SATA as my secondary drive.

Here's my fstab:
Code:
# /etc/fstab: filesystem table.
#
# filesystem  mountpoint  type  options  dump  pass
/dev/sda1  /  ext3  defaults,errors=remount-ro  0  1
/dev/sda3  /myth  auto  defaults,auto  0  2

proc  /proc  proc  defaults  0  0
/dev/fd0  /floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
usbfs  /proc/bus/usb  usbfs  devmode=0666  0  0
sysfs  /sys  sysfs  defaults  0  0
tmpfs  /dev/shm  tmpfs defaults  0  0
/dev/cdrom /cdrom  auto  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/sda2 none swap defaults 0 0
# Added by KNOPPIX
/dev/sdb1 /media/sdb1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sdb5 none swap defaults 0 0


I want to use the second hard dirve exclusively for videos and music, whereas the lion's share of sda3 for recordings.

Looking at the ADditionalHardDriveHowTo from the wiki it suggests to put Myth on a seperate hard drive you use this command:

mount -t ext3 /dev/sda1 /myth/tv

As I want to put /vedoes /music on sdb I shoul do this:
mount -t f xfs /dev/sdb1 /myth/video
mount -t f xfs /dev/sdb1 /myth/music


What do I need to do to chmod these directories and would I be right in thinking tv will still be on sda?

Regards

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject: Re: Quick hdd question.
PostPosted: Sat Jun 09, 2007 8:36 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
tophee wrote:
After the debarcle with my last attempt at adding a second harddrive I am now back with a fresh install of R5F1.
I've got my new Samsung SATA-II 500g Spinpoint as my prinary drive. I have a Western Digital 250 SATA as my secondary drive.

Here's my fstab:
Code:
# /etc/fstab: filesystem table.
#
# filesystem  mountpoint  type  options  dump  pass
/dev/sda1  /  ext3  defaults,errors=remount-ro  0  1
/dev/sda3  /myth  auto  defaults,auto  0  2

proc  /proc  proc  defaults  0  0
/dev/fd0  /floppy  vfat  defaults,user,noauto,showexec,umask=022  0  0
usbfs  /proc/bus/usb  usbfs  devmode=0666  0  0
sysfs  /sys  sysfs  defaults  0  0
tmpfs  /dev/shm  tmpfs defaults  0  0
/dev/cdrom /cdrom  auto  defaults,ro,user,noexec,noauto  0  0
# Added by KNOPPIX
/dev/sda2 none swap defaults 0 0
# Added by KNOPPIX
/dev/sdb1 /media/sdb1 ext3 noauto,users,exec 0 0
# Added by KNOPPIX
/dev/sdb5 none swap defaults 0 0
This doesn't look right to me. 2 swap partitions? (/dev/sda2 and /dev/sdb5)

tophee wrote:
I want to use the second hard dirve exclusively for videos and music, whereas the lion's share of sda3 for recordings.

Looking at the ADditionalHardDriveHowTo from the wiki it suggests to put Myth on a seperate hard drive you use this command:

mount -t ext3 /dev/sda1 /myth/tv

As I want to put /vedoes /music on sdb I shoul do this:
mount -t f xfs /dev/sdb1 /myth/video
mount -t f xfs /dev/sdb1 /myth/music
I can't say I have tried that type of configuration, but in theory it should work.

Personally (and there are many ways to approach this, I'm not saying this is the right way), I would load up the 250Gb as the primary drive, leave fstab the way it is, then mount the 500Gb into /myth/tv. You only lose ~6Gb on the 250 using the auto installation routine (for the root and swap partitions), leaving you with over 200Gb for music/videos.

That being said, my preferred way would be to LV /dev/sda3 and /dev/sdb1 (the whole 500Gb drive as 1 partition), but I know you're probably a little gun-shy about that right now :wink: Seriously, as it's a fresh install, what have you got to lose?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 9:24 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Hay slowtolearn, you're right (again). I suppose I might be just a little gun shy :roll: but it'll pass. Anyhow, there is some method in my madness... the 250 sata drive was aquired and I am being cautions of it's stability. It should be fine - was running ubuntu on it until this morning (which probably explains 2 caches), but I thought I'd rather loose some ripped cd/dvd images rather than tv recordings - instead of have to explain why I've lost the latest recording of whatever she wanted to watch... again.

So, on that basis, how would I go about chmod those two new directories?

Thanks

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 9:44 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
tophee wrote:
Hay slowtolearn, you're right (again). I suppose I might be just a little gun shy :roll: but it'll pass. Anyhow, there is some method in my madness... the 250 sata drive was aquired and I am being cautions of it's stability. It should be fine - was running ubuntu on it until this morning (which probably explains 2 caches), but I thought I'd rather loose some ripped cd/dvd images rather than tv recordings - instead of have to explain why I've lost the latest recording of whatever she wanted to watch... again.

So, on that basis, how would I go about chmod those two new directories?

Thanks
I don't know that you would have to do anything as those directories already exist. Check them before the mounts with ls -l /myth, then again after the mounts. On my R5D1 systems I have
Code:
root@myth4:/# ls -l /myth
total 72
drwxr-xr-x   6 www-data www-data  4096 Oct 19  2004 avimanager
drwxrwxr-x   2 mythtv   mythtv    4096 May  1 19:01 backup
drwxrwxr-x   2 mythtv   mythtv    4096 May  1 19:01 gallery
drwxrwxr-x   6 mythtv   mythtv    4096 May  1 19:01 games
drwxrwxrwx   2 mythtv   mythtv    4096 Dec 10  2005 image_cache
drwx------   2 mythtv   mythtv   16384 May  1 18:43 lost+found
drwxrwxr-x   2 mythtv   mythtv    4096 May  1 19:01 music
drwxr-xr-x  15 root     root      4096 May  1 19:04 mythburn
drwxrwxr-x   8 mythtv   mythtv    4096 Aug 31  2005 nuv2disc
drwxr-xr-x   2 mythtv   mythtv    4096 May  1 19:03 pretty
drwxrwxrwx   2 mythtv   mythtv    4096 May  1 19:03 stream
drwxrwxrwx   2 mythtv   mythtv    4096 May  1 19:10 streamtv
drwxrwxr-x   2 mythtv   mythtv    4096 May  1 19:01 tmp
drwxrwxr-x   2 mythtv   mythtv    4096 May  1 19:02 tv
drwxrwxr-x   4 mythtv   mythtv    4096 May  1 19:03 video
Notice that owner and group are both mythtv, if you are running the frontend as mythtv (the default) you should be good to go.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 9:56 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Hi, after mounting I get this:

    drwxrwxr-x 2 mythtv mythtv 6 Jun 9 12:16 motion
    drwxr-xr-x 20 root root 4096 Apr 16 21:28 music
    drwxrwxr-x 4 mythtv mythtv 52 Jun 9 12:26 phone
    drwxr-xr-x 2 mythtv mythtv 6 Jun 9 12:26 pretty
    drwxr-xr-x 4 root root 4096 Jun 9 12:26 rrd
    drwxrwxr-x 2 mythtv mythtv 6 Jun 9 12:16 stream
    drwxrwxrwx 2 mythtv mythtv 127 Jun 9 12:26 streamtv
    drwxrwxr-x 2 mythtv mythtv 6 Jun 9 12:16 tmp
    drwxrwxr-x 2 mythtv mythtv 29 Jun 9 16:04 tv
    drwxr-xr-x 20 root root 4096 Apr 16 21:28 video


I'm assuming that this means I need to chmod those directories. How do check this has worked then?

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 10:06 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
tophee wrote:
Hi, after mounting I get this:

    drwxrwxr-x 2 mythtv mythtv 6 Jun 9 12:16 motion
    drwxr-xr-x 20 root root 4096 Apr 16 21:28 music
    drwxrwxr-x 4 mythtv mythtv 52 Jun 9 12:26 phone
    drwxr-xr-x 2 mythtv mythtv 6 Jun 9 12:26 pretty
    drwxr-xr-x 4 root root 4096 Jun 9 12:26 rrd
    drwxrwxr-x 2 mythtv mythtv 6 Jun 9 12:16 stream
    drwxrwxrwx 2 mythtv mythtv 127 Jun 9 12:26 streamtv
    drwxrwxr-x 2 mythtv mythtv 6 Jun 9 12:16 tmp
    drwxrwxr-x 2 mythtv mythtv 29 Jun 9 16:04 tv
    drwxr-xr-x 20 root root 4096 Apr 16 21:28 video

I'm assuming that this means I need to chmod those directories.
Run chown mythtv:mythtv /myth/music and the same for /myth/video, and you should be all set. Are there files in those directories? You may need to change those as well.

tophee wrote:
How do check this has worked then?
df -h should show you where the mount points are, as well as how much free/used space you have. They should correspond to your /etc/fstab entries. Then try watching LiveTV and accessing your music/videos.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 10:09 am 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
Eeeek! You can't mount a parttiona in 2 different places and stay sane!

Also, you really want to have your mounts done from your /etc/fstab if possible. Also it looks like you have an extraneous token in your mount command. Also... :shock:

OK, lets back up two steps and look at what you're really trying to do and how to accomplish it.

I'd really recomment using LVM and putting all of your media on a single /myth partion mounted on the LVM volume. This avoids those annoying "out of space here, while that one is mostly empty..." problems. Slicing and dicing your space into discrete pools is one of those games for professional storage managers who know how to shuffle stuff around with their eyes closed. Don't let one bad experience scare you off forever.

Either way my first move would be to reformat the smaller drive into one big partition. You really don't need an extra swap partition. or other space wasters on there. Also while your at it, label the partition since this is the safest way to mount SATA and SCSI drives.

To do LVM I would recommend doing it during a fresh install, running the create_lvm.sh script and creating the filesystem in the Phase 2a gap. This is where I run recreate_lvm.sh during an upgrade. At this point during an install there's nothing in /myth that won't get rebuilt. Better still after that the rest of the install is normal and your LVM volume just looks like one big happy partition.

To use the drive as seperate chunk of space underlying two different directories mount it somewhere else and then use symlinks to make the connection. For example:

In /etc/fstab
Code:
LABEL=OTHER  /nontv  xfs  defaults  0  0

Code:
mkdir /nontv
mount /nontv
mkdir /nontv/video /nontv/music
rmdir /myth/music /myth/video # This may not work if the directory isn't empty...
ln -s /nontv/music /myth/music
ln -s /nontv/video /myth/video

If there is already stuff in the /myth/music and/or /myth/video directorys you may want to move it to the appropriate /nontv directory before replacing it with a symlink.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 10:25 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Viideos nd music are empty directories. I didn't think there would be an issue as I was looking at it like this:

sha3/ /myth/tv
shb1/myth/videos
shd1/myht/music
I didn't think the fact there was two /myth directories would make any difference.
And there I was having almost finished all my fix ups.

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 10:44 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
tophee wrote:
Viideos nd music are empty directories. I didn't think there would be an issue as I was looking at it like this:

sha3/ /myth/tv
shb1/myth/videos
shd1/myht/music
OK, this differs from your original post in which you said
Quote:
mount -t f xfs /dev/sdb1 /myth/video
mount -t f xfs /dev/sdb1 /myth/music
You have sda1, sda2 and sdb1, correct? And you are mounting sdb1 into both /myth/videos AND /myth/music, correct? As I said earlier, I've not done that but in theory it should work. tjc's point is that it may lead to an administrative nightmare (I would also be curious as to how performance is affected as well).

tophee wrote:
I didn't think the fact there was two /myth directories would make any difference.
Well, there can't be 2 /myth directories, tjc's point was regarding mounting the same device into 2 different directories (in your case /myth/music and /myth/video).

tophee wrote:
And there I was having almost finished all my fix ups.
Looking further down the road, if you setup an LV now you can add to it with pvcreate/vgextend. You won't have to worry about the extra mount points, etc. Much easier in the long run...


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 11:46 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Ah, aside form the is tpyes there: sha3/ /myth/tv shb1/myth/videos shd1/myht/music shoud have been sba3 and sdb1 etc...
(sorry was checking this inbetween checking dinner.... anyhow, ah I see... I was under the misaprehension that I was essentially recreating the music and video directories on sdb1 instead of making two identical directories.

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Jun 09, 2007 12:44 pm 
Offline
Joined: Thu Mar 25, 2004 11:00 am
Posts: 9551
Location: Arlington, MA
BTW - Your device names (as described here) are all screwy. The naming scheme works like this:

hda1 is IDE hard disk a partition 1

sda1 is scsi (or sata) disk a partition 1

I've never heard of partitions named "sha3", "shb1", or "sba3". The only one that sounds normal is "sdb1".


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 10, 2007 2:33 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
Back again to this.
tjc, you are absolutely right. Made a mistake while typing the hard drive names, as I wasn't entirely concerntrating. However, there was some oddness in my original fstab file - I think the auto install to sda had detcted the partitions on sdb resulting in entries like sdb5. I commented that out.

The guide on AdditionalHardDriveHowTo over on the wiki http://www.knoppmythwiki.org/index.php?page=AdditionalHarddriveHowTo suggests mounting /myth/tv. As seen below:

Quote:
* mount a drive at /myth/tv -- The drawback to this is that you will lose the space from your first drive if you do this.

I was thinking that the mounting of /myth/tv to a second harddrive would leave /myth/video and myth/music on the first hadrdrive. Is this correct? The wiki seems to suggest so:
Quote:
"mount" - ex: "mount -t ext3 /dev/sda1 /myth/tv" would mount a second drive (a serial one) to be your destination for all tv recordings.
My intention therefore was to mount /myth/video and /myth/music to the 250 gig sdb1 leaving /myth/tv available on sda3 and the majority of the 500 g for storing recorded tv. My reasoning for this was to use the newer - and by that rational - more reliable disc available to thigs that could not be replaced as easily instead of DVDs and CDs I'd ripped.

The wiki seems to suggest that the first drive would no longer be used for recordings, so I concluded in my case the /myth/video and /myth/music would be the same.

Any further pointers on this would be good, as I'm not sure where I am with this now. If I am doing unadvisable things to my system the wiki should be clearer about the potential pitfalls and consiquences.

Regards Chris

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 10, 2007 6:58 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
tophee wrote:
Back again to this.
tjc, you are absolutely right. Made a mistake while typing the hard drive names, as I wasn't entirely concerntrating. However, there was some oddness in my original fstab file - I think the auto install to sda had detcted the partitions on sdb resulting in entries like sdb5. I commented that out.

The guide on AdditionalHardDriveHowTo over on the wiki http://www.knoppmythwiki.org/index.php?page=AdditionalHarddriveHowTo suggests mounting /myth/tv. As seen below:

Quote:
* mount a drive at /myth/tv -- The drawback to this is that you will lose the space from your first drive if you do this.

I was thinking that the mounting of /myth/tv to a second harddrive would leave /myth/video and myth/music on the first hadrdrive. Is this correct? The wiki seems to suggest so:
Quote:
"mount" - ex: "mount -t ext3 /dev/sda1 /myth/tv" would mount a second drive (a serial one) to be your destination for all tv recordings.
Yes, that is correct. But that's not what you are attempting to do. Instead, you are trying to mount a single filesystem into 2 different mount points.

tophee wrote:
My intention therefore was to mount /myth/video and /myth/music to the 250 gig sdb1 leaving /myth/tv available on sda3 and the majority of the 500 g for storing recorded tv. My reasoning for this was to use the newer - and by that rational - more reliable disc available to thigs that could not be replaced as easily instead of DVDs and CDs I'd ripped.
Just because something's new doesn't mean it's more reliable. Have you had trouble with the 250Gb in the past?

tophee wrote:
The wiki seems to suggest that the first drive would no longer be used for recordings, so I concluded in my case the /myth/video and /myth/music would be the same.
In your case, should you go down the path you outlined earlier.

tophee wrote:
Any further pointers on this would be good, as I'm not sure where I am with this now. If I am doing unadvisable things to my system the wiki should be clearer about the potential pitfalls and consiquences.
The authors of the wiki articles couldn't possibly think of all the ways someone would come up with. The "unadvisable" thing would be mounting the same filesystem into 2 different mount points. While perfectly valid, it will have administrative and possibly performance consequences.

At this point I think stepping back and re-assessing what you have/need is the best thing to do. It would be much simpler to install to the 250Gb, wipe the 500Gb and turn it into 1 partition and mount that partition into /myth/tv (as I mentioned in my first response, and as the Wiki implies). Done. Another very simple thing to do would be as tjc suggested and create an LV, to use the space from both your drives as one partition, mounted to a single mount point.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 10, 2007 7:41 am 
Offline
Joined: Tue Sep 13, 2005 10:48 am
Posts: 852
Location: London, UK
I see what you are saying. I think we are trying to skin that cat in more than one way.
Though I didn't realise I was trying to mount the same file system in two places. I thought I was mounting it in separate places. In the original HOWTO the command would have created this surely:

>sda3>Myth>Video
>sda3>Myth>Music

>sdb1>Myth>TV

While I was intending to reverse this. And rereading an earlier post of yours I think I understand what the issue is...

By mounting /myth/video to sdb1 and /myth/music to sbd1 am I telling Myth that I have one hard drive labelled for two different things... I suppose a good analogy would be having a pint pot, with two different labels saying this can hold one pint and then being surprised that you can't fit two pints in it just because it says one pint twice?

Now I understand.

That's why it would be easier to do what tjc and yourself are suggesting.

Perhaps I'll give that a go, though I'm still a bit vague on the necessary steps to create a LV in myth. Have to go and do some reading.

_________________
Version:R8
Intel C2D 7400, Nvidia 5600 via HDMI to Samsung B37B650TW (PAL), Asus P5QL-E mobo, 4Gb PC6400 DDR2 ram, Samsung Spinpoint 500 Gb & 1Tb drive, Nova-HD-S2 (x2)


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 10, 2007 9:19 am 
Offline
Joined: Wed Nov 16, 2005 8:55 pm
Posts: 1381
Location: Farmington, MI USA
tophee wrote:
I see what you are saying. I think we are trying to skin that cat in more than one way.
Though I didn't realise I was trying to mount the same file system in two places. I thought I was mounting it in separate places. In the original HOWTO the command would have created this surely:

>sda3>Myth>Video
>sda3>Myth>Music

>sdb1>Myth>TV

While I was intending to reverse this. And rereading an earlier post of yours I think I understand what the issue is...

By mounting /myth/video to sdb1 and /myth/music to sbd1
Actually, it's the other way around. You mount a filesystem (your filesystem is on /dev/sdb1) into a directory (AKA mountpoint). Thusly, mount /dev/sdb1 /myth/video. The key is in the details, which is why tjc and I pointed out that you had used incorrect terminology for your drive definitions.

tophee wrote:
... am I telling Myth that I have one hard drive labelled for two different things... I suppose a good analogy would be having a pint pot, with two different labels saying this can hold one pint and then being surprised that you can't fit two pints in it just because it says one pint twice?

Now I understand.
Yep!

tophee wrote:
That's why it would be easier to do what tjc and yourself are suggesting.
Yep again!

tophee wrote:
Perhaps I'll give that a go, though I'm still a bit vague on the necessary steps to create a LV in myth. Have to go and do some reading.
It's really very simple with the create_lvm.sh script. The only real trouble you ran into was that your media (recordings, music, etc.) was already sitting on /dev/sda3 (which was mounted into your /myth directory), and creating an LV is a destructive operation (as tjc noted in that thread). Look through http://knoppmythwiki.org/index.php?page=LvmHowTo again now that you have a better understanding of what you're trying to accomplish, it won't seem nearly as confusing now.


Top
 Profile  
 

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 15 posts ] 


All times are UTC - 6 hours




Who is online

Users browsing this forum: No registered users and 25 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group

Theme Created By ceyhansuyu