|
SageTV Linux Discussion related to the SageTV Media Center for Linux. Questions, issues, problems, suggestions, etc. relating to the SageTV Linux should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
Adding Harddrive to an exsiting install
I am running SageTV on a 20 GB drive. I have a 250 GB harddrive that I would like to add to the system. How do I go about formating and getting it ready to accept video. I want to use the 20 GB for the OS and the 250 GB for video.
TIA |
#2
|
||||
|
||||
Are you adding a Sata or IDE drive? If you are adding an IDE drive, you may need to strap the drives correctly.
Once the drive is recognised in BIOS, in windows XP go into start>administrative tools>computer management> Disk Management select the new 250G drive. right click> format. select NTFS and 64k allocation size. Go eat dinner. Come back and your drive will be formatted. In Sage, go into Setup>detailed>general. Click video directories "modify". "Add New directory". "Change to new directory-specify". Type in the new drive's letter that windows assigned it. In setup>system information, you should now see the new amount of space available for recording. |
#3
|
||||
|
||||
Quote:
Gerry
__________________
Big Gerr _______ Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB. |
#4
|
|||
|
|||
Yea, windows is pretty easy and straight forward, I am just not sure on how to do it in the Linux version of SageTV.
|
#5
|
||||
|
||||
Essentially, you need to format the hard drive and mount it.
First, you have to identify which device is the new hard drive. This will be different depending on whether you have a SATA or IDE drive. From the command prompt, issue the command dmesg | less This will show you what the kernel discovered about your system when it booted. You'll have to look through it for the section where it talks about hard drives. On my laptop (with 1 IDE drive) this looks like Quote:
If you are running a SATA system (actually, if your first drive is 20G then I guess it must be IDE) then you drives will be named like sda, sdb, sdc, etc. So, assuming that you new drive is hdd (slave on secondary channel), you first need to partition it. fdisk /dev/hdd (replace hdd with whatever your new drive is) It will give you somehting like this: Quote:
First, you'll want to add a partition. As the promt says, m will get you a menu of the command fdisk understands. Press n to create a new partition, and follow the prompts to create a new primary partition, accepting the defaults so that it is to full 250 gigs. When you're done, w will write the partition table and exit. You now have a partition named something like /dev/hdd1 Now, we need to format your new drive. Linux supports a variety of filesystems, so you have some choice here. Sage has decided to use ext3, which IMO is an odd choice because it is one of the slowest filesystems. I'd choose XFS or Reiser myself, but you should probably stick with their choice. mke2fs -j /dev/hdd1 (again, use whatever your drive is instead of hdd) After an eternity (ext3 is even slow when formatting) you should have a brand shiny new formatted partition. Now, you'll need a place to mount this filesystem. /var/media seems to be a logical place, since Sage appears to keep all their data there. However, you'll probably already have stuff there, so we'll need to copy it. Create a temporary mountpoint: mkdir /mnt/tmp and mount the new filesystem there: mount /dev/hdd1 /mnt/tmp Now, Sage doesn't seem to have any graceful way to shut it down, so issue this command to kill it the hard way, so it doesn't try to do stuff while we're working: killall java That should kill the SageTV process, unless they've got it set to respawn it which case... well... just make sure nothing is recording while you're trying to do this. Okay, now we will move everything under /var/media to your new drive. mv /var/media/* /mnt/tmp Hopefully you won't get any errors about files being in use. Now, we detach the partion from the temporary mountpoint umount /mnt/tmp and re-attach it to where we want it. In order to do this so that it will 'stick', we need to update the /etc/fstab file nano -w /etc/fstab Add this line to that file: Quote:
Mount the partition mount /var/media (it will look at the file we just modified to figure which partition to mount there) The easiest way to get Sage back up is probably to reboot: reboot (this is probably the only UNIX command there is that doesn't make you go "huh?" :-) ) Quote:
It is however, probably the best documented and supported by its community. It's an excellent distribution on which to learn Linux (and here I mean a Linux-based OS, not merely a desktop like KDE or Gnome). I highly recommend the Gentoo Wiki and the Gentoo Community forums for research on your Linux Sage box. Cheers, Arawak |
#6
|
|||
|
|||
Ok does this sound correct. I got this info from various places.
When Linux boots you need to find the new drive and make sure that the bios and linux sees it and it is correct and what device it is labeled as (i.e. hdd). Use “dmesg | more” to see the boot log. Use "fdisk /dev/hdd" to edit the partition table on the disk. Create a new primary partition (hdd1) and set the size to be the whole disk, then write the changes to disk and exit. Now format the partition as ext3 using: # /sbin/mkfs.ext3 -m 0 -j /dev/hdd1 The -m 0 tells the format program to not reserve any space for root, and the -j creates an ext3 journal. Now create a mount point and mount the partition: # mkdir /mnt/hdd1 # mount /dev/hdd1 /mnt/hdd1 Use this to check it out: # ls -l /mnt/hdd1 Finally add an entry to the /etc/fstab file to mount the partition when your machine boots: /dev/hdd1 /mnt/hdd1 ext3 defaults 1 2 I would then make a new dir on the drive (i.e. video) to store the video files in. Then make the changes in SageTV to point to the new drive and video directory. |
#7
|
|||
|
|||
Thanks Arawak, your post is great and has a great deal of info. Looks like we posted about the same time. I will give it a try tonight.
|
#8
|
|||
|
|||
Well I got the drive formatted and it mounts in /mnt/hdb1 after rebooting, but when I go to Detailed Setup - General - Video Recording Dir, it does not show up. I can go from /var/media to /var and see all the folders there, then go up one more dir to /, but nothing shows up. So I can't get to /mnt to get to hdb1.
Any ideas? TIA |
#9
|
||||
|
||||
Quote:
Open mouth, insert foot. I could've sworn I checked to see if it was a linux or windows thread. |
#10
|
|||
|
|||
Quote:
If you look in the OS where are all your media files? Andy. |
#11
|
|||
|
|||
OK, I went back and changed fstab:
/dev/hda1 / ext3 noatime 0 1 /dev/hda3 /var/media ext3 noatime 0 2 /dev/hda2 none swap sw 0 0 /dev/hdb1 /var/media ext3 noatime 0 1 /dev/cdroms/cdrom0 /mnt/cdrom iso9660 noauto,ro 0 0 none /proc proc defaults 0 0 none /dev/shm tmpfs defaults 0 0 Rebooted the machine. STVMC-272 / # cd /var/media STVMC-272 media # ls lost+found music pictures tv videos STVMC-272 media # df -k . Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda3 240362656 3420524 236942132 2% /var/media This reports the main drive (20GB) hda3. So I went to /mnt. STVMC-272 media # cd /mnt STVMC-272 mnt # ls cdrom floppy hdb1 tmp STVMC-272 mnt # cd hdb1 STVMC-272 hdb1 # ls STVMC-272 hdb1 # df -k . Filesystem 1K-blocks Used Available Use% Mounted on /dev/hda1 3199216 1716756 1319948 57% / And it show again hda1 the main 20GB, but shows 57% used, which would be close with Gentoo and SageTV loaded. So I am a bit confused on this one. |
#12
|
|||
|
|||
You have the /var/media mountpoint specified twice in /etc/fstab. Comment out the line that mentioned /dev/hda3. Then do a umount -a (don't worry about any device-busy error messages) followed by a mount -a and report back to us.
Andy. |
#13
|
|||
|
|||
OK, I was wondering about. So I did as you say. Had to reboot. But everything looks good.
STVMC-272 media # df -k . Filesystem 1K-blocks Used Available Use% Mounted on /dev/hdb1 240362656 5787044 234575612 3% /var/media Thanks for all your help. |
#14
|
|||
|
|||
No problem. FYI, if you do a 'df -m' instead you get allocated and freespace in megabytes. It's a little easier to read than kilobytes.
Andy. |
#15
|
|||
|
|||
Oh my. just look at the long sequence of shell commands to do such a simple thing.
|
#16
|
|||
|
|||
Quote:
Well, it works both ways. Unix is low-level (hence the numerous commands above) but can be very terse in its syntax. So you could (for instance) look for all the files with a '.mpg' extension in a particular filesystem and perform an operation on them and then move them to a different location with a different name all on one single line. Try that in Windows! Andy. |
#17
|
|||
|
|||
what about hda3?
Hi all,
Let's say I add a second (larger) HD (/dev/hdb) to my sage system and move /var/media as described, what happens to the old /var/media mounted on /dev/hda3? Anyway to reclaim the space and give it to /dev/hda1 (the / filesystem)? Thanks.
__________________
-Chirag |
#18
|
|||
|
|||
It would be much better to use LVM and add the disk to a physical volume / logical volume.
That way Sage configuration would not need to change. Well maybe initially it would change, but after the initial adoption of the LVM setup it would essentially never need to change. -MrD |
#19
|
||||
|
||||
Quote:
http://www.gnu.org/software/parted/parted.html/ Last edited by zoop; 05-30-2006 at 01:38 PM. |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|