February 6, 201115 yr User-Share spinup groups. Today we have "spinup groups" that work on the disk controller basis. Devices that share the same IDE channel can spin up together to minimize disruption of the media experience. These work ok, but do not solve a different problem when browsing a media collection with a media player. If the media collection spans multiple disks, we are still subjected to a delay when we browse a part of the collection residing on a spun-down disk. I would like to see a user-share spinup group feature. If the user-share spinup group is enabled, if ANY disk within a given user-share is accessed, all of them with the same top level directory will spin up at the same time. Yes, I realize all those who want to be "green" will hate this, but there are a lot of media players that will time-out if we browse part of the collection that is not spinning. On most of my media players it requires going back to their main menu and again selecting the server on the lan, then the shared folder, then traversing the directory listing once more to get to the movie I wanted to play. I would love one spinup-group name to be user-defined per user share. Those disks having top level directories (user-shares) with identical user-share "spinup-group" names will be spun up together. This way, I can have a "spinup-group" name of "movies" on all the user-shares that hold my movie collection. When I access one, all will spin up. I'll trade the usability for a bit more expense in power usage since 90% of the time they are all spun down anyways. I've been using a shell script version of this for quite some time, but it requires constant polling of the /mnt/user file system. My script works by using lsof on /mnt/user to find the files and folders being accessed and then gets a list of the disks with the same top level folders (the user-shares) and then spins up the affiliated disks if they are not currently spinning. It would be so much simpler if part of the user-share file system. As soon as one of my media players performs a directory listing, or accesses a file, all the affiliated drives in that user-share are spun up. When I press "Play" the drives are ready and the media player does not time-out. It would be wonderful if this feature was built into the user-file-system and could be enabled/disabled on a per-share basis. Joe L.
February 6, 201115 yr Having just discovered your very useful script http://lime-technology.com/forum/index.php?topic=4858.msg102654#msg102654 earlier today, I obviously would also like for it to be an integrated feature.
February 7, 201115 yr You can set this up manually using the current spinup groups feature. The way it works is like this: - the "Spinup group(s)" field for each disk can contain a number of whitespace-separated "tokens". - when array is Started, for each disk, system looks at set of tokens for that disk and compares to set of tokens for all the other disks. If there are common tokens, both disk's bit are set in a mask. Once all the the disks have been checked, we are left with a "spinup_group_mask". - for each I/O the unraid driver looks at spinup_group_mask for the disk involved in the I/O. For each bit set in there, it check is the corresponding disk is spun up or not. If not, then it issues an asynchronous "spinup" command to those disks and then issue the I/O to the target disk. - When the spinup groups feature is disabled, the "Spinup groups(s)" field is set the "default" which is simply the "host" token found in the slot identifier. This is an approximation to disks on the same host (esp. for IDE disks), but, e.g., SAS controllers, the host is the same for all connected disks and clearly not what you want. Example. Suppose you have 3 data disks: disk1, disk2, disk3. And the default spinup groups is like this: disk1 = host1 disk2 = host1 disk3 = host2 Lets say you have a user share1 that spans disk1 and disk2, and user share2 that spans disk2 and disk3, and you want the disks of those user shares to spin up on any access to the share. You can change like this: disk1 = share1 disk2 = share1 share2 disk3 = share2 Now if you access share1, disk1 and disk2 will both spin up. If you access share2, disk2 and disk3 will spin up. Let's say, in addition to this, disk1 and disk2 are IDE disks on the same channel (one's a master the other is a slave). So you want these two to spin up together independently (and in addition to) any user share spin up groups. Change to this: disk1 = host1 share1 disk2 = host1 share1 share2 disk3 = share2 Make sense? I guess the new feature would be to automatically generate the user share tokens for each disk of each user share.
February 7, 201115 yr Tom, what you describe is what I do but I don't think this is what was being asked. Here's an example. disk1 - holds "Movies" and "TV Shows" user shares disk2 - holds "Movies" and "Pictures" user shares disk3 - holds "Movies and "Music" user shares Now, what is being asked for is the ability to spin up all 3 disks listed above but only if the Movies share is accessed. The disks would spin up individually if the TV Shows, Pictures or Music shares were accessed. The simplest solution would be to have a check box for each user share that you check to "spin up all disks using this share when this share is accessed". Right now, unRAID has disk groups, not user share groups. Peter
February 7, 201115 yr Tom, what you describe is what I do but I don't think this is what was being asked. Here's an example. disk1 - holds "Movies" and "TV Shows" user shares disk2 - holds "Movies" and "Pictures" user shares disk3 - holds "Movies and "Music" user shares Now, what is being asked for is the ability to spin up all 3 disks listed above but only if the Movies share is accessed. The disks would spin up individually if the TV Shows, Pictures or Music shares were accessed. The simplest solution would be to have a check box for each user share that you check to "spin up all disks using this share when this share is accessed". Right now, unRAID has disk groups, not user share groups. Peter Set spinup groups for each disk like this: disk1 = Movies TV_Shows disk2 = Movies Pictures disk3 = Movies Music The actual value of the token can be anything: disk1 = green red disk2 = green blue disk3 = green orange So if you access a file on the Movies share, this will result in a disk I/O to say, disk2 - well disk2 is part of the 'green' spinup group, so all drives of that group will spin up (disk1,disk2,disk3). What you're asking for is merely a way to have the system automatically assign this. What makes this a pain is suppose you have Movies including disk1-5, but at present time only disk1 has anything on it. It would be easy to generate spinup group so that if you accessed movie on disk1, disks 1-5 all spin up - but then people complain that empty disks are spinning up. To solve this I think I have to add code to the user share file system to detected top-level directory creation and then dynamically change the config - right now the user share file system is more-or-less independent of everything else & so I'd have to add this dependency. Though maybe I could use inotify....
February 7, 201115 yr Author You can set this up manually using the current spinup groups feature. The way it works is like this: - the "Spinup group(s)" field for each disk can contain a number of whitespace-separated "tokens". - when array is Started, for each disk, system looks at set of tokens for that disk and compares to set of tokens for all the other disks. If there are common tokens, both disk's bit are set in a mask. Once all the the disks have been checked, we are left with a "spinup_group_mask". - for each I/O the unraid driver looks at spinup_group_mask for the disk involved in the I/O. For each bit set in there, it check is the corresponding disk is spun up or not. If not, then it issues an asynchronous "spinup" command to those disks and then issue the I/O to the target disk. - When the spinup groups feature is disabled, the "Spinup groups(s)" field is set the "default" which is simply the "host" token found in the slot identifier. This is an approximation to disks on the same host (esp. for IDE disks), but, e.g., SAS controllers, the host is the same for all connected disks and clearly not what you want. Example. Suppose you have 3 data disks: disk1, disk2, disk3. And the default spinup groups is like this: disk1 = host1 disk2 = host1 disk3 = host2 Lets say you have a user share1 that spans disk1 and disk2, and user share2 that spans disk2 and disk3, and you want the disks of those user shares to spin up on any access to the share. You can change like this: disk1 = share1 disk2 = share1 share2 disk3 = share2 Now if you access share1, disk1 and disk2 will both spin up. If you access share2, disk2 and disk3 will spin up. Let's say, in addition to this, disk1 and disk2 are IDE disks on the same channel (one's a master the other is a slave). So you want these two to spin up together independently (and in addition to) any user share spin up groups. Change to this: disk1 = host1 share1 disk2 = host1 share1 share2 disk3 = share2 Make sense? I guess the new feature would be to automatically generate the user share tokens for each disk of each user share. what will happen if I have music on one disk, pictures on 2, and movies on all? disk1 = music movies disk2 = pictures movies disk3 = pictures movies disk4 = movies data disk5 = movies data disk6 = movies music disk7 = movies disk8 = movies Now, I go to open up a file in the "picture"' share. Will just the disk2 and 3 spin up? I don't think so. I'm guessing all the disks will spin up, since all share the bitmap mask "bit" for "movies" It is the problem that the spinup groups are at the disk level, not the user-share level. Your solution works only if the data is only on a subset of disks. For your example I feel you may be mistaken disk1 = share1 disk2 = share1 share2 disk3 = share2 I think that if a share on disk2 is accessed, all three disks will spin up. I just tried your solution on my server. I added a "movies" token to all the data disks. I added a "music" token to just the few disks with music. I left the host controller tokens i place. My disk.cfg now looks like this: diskSpinupGroup.0=host6 diskSpinupGroup.1=ide0 movies music diskSpinupGroup.2=ide1 movies diskSpinupGroup.3=ide1 movies diskSpinupGroup.4=ide2 movies music diskSpinupGroup.5=ide2 movies diskSpinupGroup.6=ide3 movies music diskSpinupGroup.7=ide5 movies diskSpinupGroup.8=ide5 movies music diskSpinupGroup.9=ide4 movies diskSpinupGroup.10=ide0 movies diskSpinupGroup.11=host5 movies music I spun down the disks, then opened up file explorer to a specific song on one of the disks holding music. I expected the one disk I physically accessed to spin up, and its partner on the same controller, and the others with music to spin up. Instead, all the disks spun up. (because they share the same "bit" representing "movies", and that bit is also set on the disk holding the music.) I wanted only the 4 disks with the music to spin up. (and potentially the disks on the same host controllers) Your existing code works fine for the disks on the same disk controller, but since it has no concept of the user-share being accessed, it does not work properly for spinning up disks representing shares UNLESS the shares are exclusive to specific disks. As I said, all my disks spun up, not just the 4 holding the music. Joe L.
February 13, 201115 yr Sorry if this is a bit off topic. I'm thinking of purchasing Unraid for the simple reason that my current setup with Windows keeps spinning up my drives for no apparent reason. I do however how one question regarding how this works in Unraid. My setup will have 8 drives with a folder called "Movies" on each and then a share called "Movies". Can i open this share and see (list) its content without the drives spinning up? I would like drives to spinup only when i actually open or download a movie from the share and that only the drive containg that movie is spinup at that time.
February 13, 201115 yr Author Sorry if this is a bit off topic. I'm thinking of purchasing Unraid for the simple reason that my current setup with Windows keeps spinning up my drives for no apparent reason. I do however how one question regarding how this works in Unraid. My setup will have 8 drives with a folder called "Movies" on each and then a share called "Movies". Can i open this share and see (list) its content without the drives spinning up? I would like drives to spinup only when i actually open or download a movie from the share and that only the drive containing that movie is spinup at that time. It is possible, but NOT with the feature mentioned in this thread. It is to force the spin-up of all the drives involved with a specific user-share, to make the server a better experience for family members and media player software that will tiime-out waiting for a disk to spin up otherwise, and ruin the experience for others in your household. Search for "cache_dirs" on the forum. It performs a frequent scan of the directories in an attempt at keeping the directory listings in the disk buffer cache for quick access without spinning up the disks. Joe L.
Archived
This topic is now archived and is closed to further replies.