View Full Version : How do I point Squeeze Server at more than one drive in Ubuntu?
I have almost 3 TB of FLAC files, obviously these have to be stored on more than one drive.
How do I tell Squeeze Server that my music is in two drives? The server setup HTML page only lets me put one drive in the setup.
In Windows, to make Squeeze Server use both drives I just put a shortcut to the second drive someplace in the first drive. I don't know how to do this in Linux, or if it's even possible.
Running Ubuntu 7.10 64 bit.
steve9000
2009-11-02, 04:08
A symlink is probably what you're looking for.
steve9000
2009-11-02, 04:10
A symbolic link (symlink) is probably what you're looking for. The command is ln (LiNk)
ln -s original link_name
Stephen.
Hmm
ln -s original link_name
Not exactly sure how that works but I can start with that and work it out...
Thanks
This doesn't work because the data is stored on drives formatted as NTFS and you can't store a symbolic link on an NTFS volume.
I guess I could put try to put symbolic links to both MUSIC0 and MUSIC1 drives in the /home/bill/music folder then point Squeeze Server to /home/bill/music
By the way I am trying ln in terminal and I can;t get the syntax right, it's not doing anything useful.
User-friendly Ubuntu is NOT, unless you're used to all this command-line stuff.
The drive is named Music1 - it shows up in ..PLACES/COMPUTER
I can MOUNT it.
I have SHARED it on my Windows network.
In TERMINAL, I am in the /Home/Bill/Music directory and I type
ln -s Music1 [enter]
A symbolic link appears in the ../Music directory, but it says
The Link "Music1" Is Broken. Move it to Trash?
This link cannot be used, because it's target "Music1" doesn't exist.
Of course that's a lie, Music1 CERTAINLY does exist, except I'm probably not specifying the drive in correct syntax somehow. Do I need to say
ln -s /dev/sdb
or something like that instead of calling it Music1?
As far as I can tell it's not possible to create a symbolic link to the root of these two drives. However, using File Manager I can OPEN the drive Music1, "SELECT ALL" then SHIFT-CTRL Click-and-Drag all those files into /home/bill/Music in File Manager. That creates links to all those folders.
Kinda lame, but I tested it and it works. The problem is if I add new music to the drive, I have to remember to create a symbolic link to the newly created folder. In Windows, Squeeze Server is pointed at the DRIVE itself and therefore any contents added to that drive get picked up in a Scan. There's more manual work to do In Ubuntu, apparently.
Clnanderson
2009-11-02, 05:37
I'm not sure I follow the difficulty you're having.
But the syntax in one of your posts (2 back) should be something like
ln -s [target] [link]
ln -s /media/Music1 /home/bill/music/Music1
The command takes two arguments target and link. You need the full path to the drive where it is mounted, and need to name the symbolic link. Or, if you execute the command without the full path on the link name it will create the link in your current directory.
And this should solve your problem. I have a "slim-music" directory that is nothing but links to various folders on different drives and actually computers.
atrocity
2009-11-02, 06:57
On 2 Nov 2009 at 3:34, milosz wrote:
> I guess I could put try to put symbolic links to both MUSIC0 and
> MUSIC1 drives in the /home/bill/music folder then point Squeeze
> Server to /home/bill/music
That's what I've done. I think I have SqueezeCenter pointed to
/home/administrator/Squeezebox-Links and within there I have links
to an NAS and two FireWire drives.
Remember that your external drives also need to be mounted via
their own lines in /etc/fstab. Personally, I've found doing so via UUID
references the most reliable way to go about it:
http://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/
http://linux.byexamples.com/archives/321/fstab-with-uuid/
http://ubuntuforums.org/showthread.php?t=283131
http://www.cyberciti.biz/faq/linux-finding-using-uuids-to-update-fstab/
You probably need to create a 'mount' point to the windows share. Edit your /etc/fstab file to have the drive mounted at startup. Then, as everyone has suggested, create symbolic links within /home/bill/music to all your music locations:
ln -s /mount/myWindows/music0
ln -s /var/music1
ln -s /usr/music2
etc..
Fstab help:
https://help.ubuntu.com/community/Fstab
I've already changed directories to /home/bill/music in Terminal, so when I call ln I only need one argument, the link is created in the "folder I am in" without having to explicity state it.
The drives are mounted, but I still can't create symbolic links to the drives themselves, only to the folders and files on the drives.
I also see that once I mount the drives they appear in /media
I tried navigating to /media to set it as the location of my music collection in the Squeeze Server setup HTML window, and I am allowed to use /media as the location of my collection, but when I tell Squeeze Server to scan my music collection, it doesn;t find any files at all.
I changed FSTAB but it doesn't mount at bootup. I think the issue is that MUSIC0 and MUSIC1 drives are part of an Intel fake raid array under Windows. I guess I'd have to use DMRAID and frankly I'm afraid of doing that, last time I tried I lost 1.5 TB of data.... took HOURS to recover data from a backup.
In the following,
sda and sdb = music0
sdc and sdd = music1
----------------------------------
/dev/sda: TYPE="isw_raid_member"
/dev/sdb: TYPE="isw_raid_member"
/dev/sdc: TYPE="isw_raid_member"
/dev/sdd: TYPE="isw_raid_member"
/dev/sde1: UUID="700f09ad-5923-427c-93c0-2ac49424b575" TYPE="ext3"
/dev/sde3: UUID="0860CB3C60CB2EEE" TYPE="ntfs"
/dev/sde5: UUID="ab7ae46f-f6a3-44de-b1ac-e9f479406ac7" TYPE="swap"
/dev/mapper/isw_chafhdfhhf_MUSIC11: UUID="D81829EF1829CD76" LABEL="Music1" TYPE="ntfs"
/dev/mapper/isw_chcfeifdab_Music1: UUID="B44C92FE4C92BA96" LABEL="MUSIC0" TYPE="ntfs"
-------------------------------------------
I think I'll just stick to Windows.
hellesangel
2009-11-03, 01:08
I think I'll just stick to Windows.
Ok, that's fighting talk ;-)
First to recap - your music is on several drives that are formatted NTFS and on a computer that is 'running' some sort of Windows?You want to be able to see this music from your Squeezecenter which is running on another PC running Ubuntu and both PC's are on at the same time? Or are the disks on the same PC that you dual boot, sometimes Windows, sometimes Ubuntu?
Anyway, try this as root on your Ubuntu computer:
1. Create a directory to mount a NTFS disk:
mkdir /mnt/ntfs1
2. Identify your NTFS disks:
fdisk -l | grep NTFS
The first part of the answer, /dev/xxxx will be what you want, where xxxx is something like /dev/sda1, /dev/sdb1, /dev/hda1 etc.
3. Mount the NTFS disk into that directory:
mount -t ntfs /dev/sdb1 /mnt/ntfs1
4. Check to see if anything is there:
ls -Ral /mnt/ntfs1
You should see the disk's content scrolling past.
Now you repeat this for all other NTFS disks you have, creating /mnt/ntfs2,3,4 etc.
Then it's time to make the symbolic links the others have talked about. Use the cd command to go to the place where you've told your music is stored. This can be anywhere but it's best to choose somewhere quiet on the local disk, I use /home/slim/music. From here enter the
ln -s music_on_ntfs1 /mnt/ntfs1
ln -s music_on_ntfs2 /mnt/ntfs2
etc.
That should do the trick, the directories music_on_ntfs1 etc are now links to the mounted /dev/ntfsx directories which are the drives' contents that contain the music, you follow? Post the output if you have any trouble. I used this page as reference http://www.linuxconfig.org/How_to_mount_partition_with_ntfs_file_system_and_r ead_write_access and stripped out the bits about installing the packages as you probably have them already, if not then install them the Ubuntu way, whatever that may be.
And FWIW your opening statement of having a large music collection inevitably means it's going to be on more than one disk is incorrect - you can create a Linux software RAID device that glues together as many disks as your mainboard can support into one large volume with build in fault tolerance (RAID5 or RAID6). The performance isn't stellar but more than adequate for listening to music. Do some Googling for mdadm and see if you like the idea, but remember this does not replace good backups...
I have removed four 1,000 gb drives that were set up as two pairs raid 1 from a Windows XP machine that is no longer running. These were seen by the Windows machine as two drives, MUSIC0 and MUSIC1. They are NTFS. Between them they have nearly 2 TB of FLAC files.
These four SATA drives are now in a PC with an Intel chipset; a fifth drive, IDE, is set up as boot drive for Ubuntu 4.10
Initially I tried to use two of these drives -MUSIC1 and MUSIC0- no fake raid- in Ubuntu, as the music source for Squeeze Server. Since Squeeze Center only lets you specify one source for music, I have to figure out some way to tell Squeeze Server to scan BOTH drives.
Aparently Ubuntu sees that the BIOS wants these to be software raid, even though I am telling Ubuntu to just read two of the drives and forget the raid.
I WOULD like to use software RAID 1 for data security, but I am afraid of DMRAID because last time I fooled with DMRAID I lost 1 TB of data when I put a slash in the wrong place. Since I am afraid of DMRAID I thought I would just try two drives, not raid, at first, just to see how Squeeze Server worked in Ubuntu. I thought I could cross the fake raid bridge later.
I am guessing that the issues I am having are related to the fact that the BIOS wants to set these drives up in software raid and so Ubuntu is not going to let me just use them as regular drives. Even so, I can MOUNT them, all my files are there, etc. I just can't make Squeeze Server see them or scan them.
I WOULD like to use software RAID 1 for data security, but I am afraid of DMRAID because last time I fooled with DMRAID I lost 1 TB of data when I put a slash in the wrong place. Since I am afraid of DMRAID I thought I would just try two drives, not raid, at first, just to see how Squeeze Server worked in Ubuntu. I thought I could cross the fake raid bridge later.
The best solution for data security is linux software RAID1 (md module) and an ext3 filesystem. With the RAID1 from your motherboard BIOS you are bound to this hardware. If your board dies, you need the same motherboard for recovery or your data is lost. The linux software RAID will be detected in every computer with linux installed, even a Live CD can access your data.
Even so, I can MOUNT them, all my files are there, etc. I just can't make Squeeze Server see them or scan them.
Then maybe it is just a permission problem? For ntfs "man mount" says: "By default, the files are owned by root and not readable by somebody else." So you must provide a proper uid and umask when mounting ntfs filesystems.
" provide a proper uid and umask when mounting ntfs filesystems"
uid? umask?
When i double-clcik those NTFS drives in File Manager, I can read them. The Ubuntu audio player will play the FLAC files. It's just that Squeeze Server doesn't see them.
hymerman
2009-11-03, 02:42
You're unlikely to be able to just mount and use the drives normally if they're part of a RAID array. You'd ruin it if you were to alter the contents of only one of the drives in the array, for example.
I don't know how to allow a RAID array to be detected and used by both Windows and Linux (other than letting a dedicated controller like you have do it and hide it from the OS), but under just Linux I'd recommend mdadm. I'm using that with three drives in a level 5 array, pointing Squeezebox Server at a couple of locations on that, and it works flawlessly.
hellesangel
2009-11-03, 07:09
When i double-clcik those NTFS drives in File Manager, I can read them. The Ubuntu audio player will play the FLAC files. It's just that Squeeze Server doesn't see them.
Then what you need is to ask the Ubuntu forums how the File Manager is mounting the disks as a RAID array. That's a bit Ubuntu specific for us here.
It seems that the Ubuntu file manager is pretty clever and has figured out that the disks are a RAID array that creates an NTFS file system and has done the 'mount' step I describe above for you. I'm quite surprised that has worked. If you can figure this mounting out and provide the symbolic links then Squeezecenter will read the music without further fuss.
Essentially there's a step missing in what I describe earlier - after 'find the NTFS disks' step there should be 'Assemble this into a RAID array', then mount the RAID array, then provide the link to it from the Squeezecenter music directory. As hymerman says RAID arrays in Linux are usually created using the mdadm command which is very powerful, but I have no experience with using it, or any other tool, to reassemble RAID arrays created elsewhere.
Another option open to you is to take two of your disks, create a RAID0 array with them under Ubuntu native using the normal Linux ext3 file system, copy the music across, then when you're sure the copy was Ok, create another native Linux ext3 RAID0 from the final two disks and mirror the first RAID0 onto it using RAID1. mdadm will do all this for you.
Powered by vBulletin® Version 4.1.12 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.