Jump to content

Adding 2nd HDD under Linux - Need some help.


flambot

Recommended Posts

Greetings,

 

I wonder if some of you skilled Linux Guru's could help me out please.

 

I've recently built a small Ion-based media player (HTPC) to attach to my unRAID server (and replace my old Xbox).  It is running xbmc using a minimal Ubuntu install called LIVE (Based on Lucid I think) - that is actually installed on a SSD HDD (32Gb).

 

I have added a 2nd HDD to the case (a SG 500Gb 3.5" one).  I've read and researched numerous guides and posts about setting this all up.  I have managed to get it working (more fluke than skill) and I'm really worried I haven't done it right and this will impact me at some point.

 

The 2nd drive is for music/pics media (Partition 2), and partition 1 for a backup of the SSD so I can backup the complete install.  I've since decided I'd like to add another partition (3 in total) so I can load more recent versions of the Live/xbmc s/ware to test and iron out all the issues before committing to it.  I'm not sure if it is possible to have the backup partition or the test version partition work as I've stated??

 

Here is how I went about it.

 

I used "cfdisk" to create 2 partitions (I want to change this now to 3 partitions).  They were both primary partitions - one 32Gb in size and the other the remaining portion of the disk (about 468 Gb).

 

Using "fdisk -l" I discovered the SSD was labelled sda1,2,3 (3xpartitions I think) etc and the 2nd HDD was called sdb (sdb1 for the backup partition, and sdb2 for the media partition).

 

Once these were created, I tried to use the command "mkfs.ext3 -b 4096 [sdb1]" to format the partitions, but it gave some message that didn't mean much.

 

I ended up using this one "mkfs -t ext4 /dev/sdb1" and "mkfs -t ext4 /dev/sdb2" and that seemed to work (not sure this was right?).

 

I moved on to mounting them then. This part was really confusing as I don't understand why you have a mount point (seemed to be under a folder??) and why it just doesn't show up like a drive does in windows. (WHY??)

 

My reading said I should set the drive up under the /media folder in the SSD's root, so I used "sudo mount /dev/sda1 /media/sdb1". Later I found these folders under /media - "7c011d8d-7ed6-4cc5-868d-92e35ec6178e" and "c9ea0b4b-8f75-453d-bc31-42b2d9bd38b4" Not sure why the long letter/number name but I figured it was the partitions. See here -

 

HDDsetupUnderLinuxLive1.jpg

 

Can I re-name these long names? I'm betting they will change when I alter things to add the 3rd partition. Should they even be here?

 

Anyway, I found the partitions did mount, but that they didn't survive a reboot. I read I had to edit the fstab file, but in my playing I did something that made them survive a reboot - without modifying fstab.  (Sorry if some of this isn't clear - but I've been playing with this for several days and my memory is less than perfect, even though I tried to keep a written record of what I did).   I did play with these commands - "mount /mnt/sdb1" and also this one "mount | grep /dev/sdb1" and "mount | grep /dev/sdb1  /media/ 7c011d8d-7ed6-4cc5-868d-92e35ec6178e" etc. but not sure if either of these made it survive a reboot.

 

After all this, I found I couldn't write to the partitions - and read I had to set the permissions.  Wow...this linux is tough  :o

 

I found these commands in a post to set the permissions. Definitely not sure what they do, but it seemed to work.

 

sudo chown -R xbmc: /media/c9ea0b4b-8f75-453d-bc31-42b2d9bd38b4

 

sudo chmod -R 777 /media/c9ea0b4b-8f75-453d-bc31-42b2d9bd38b4

 

I need some help to understand if what I have done is correct, or if it'll create further troubles done the track. At present, the Ionbox is in a testing phase before I take it into the lounge for everyday use.

 

And...two more things.

 

1 - Is there an easy method to back up the SSD to the newly created partition (and then restore to the SSD should I need to)? I have read about something called clonezilla but I was wondering if this can be achieved from the terminal window??

 

2 - Can the 3rd partition I intend to create be used for a testing area for a "TEST" complete install (O/s and xbmc) - meaning - something I can start using the file manager within xbmc and then exit out of it to return to the usual install? (I can do this with the xbox currently, but have no idea if it's possible under linux.

 

Sorry for the long post and I appreciate any help that can be offered.

 

 

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...