New Disk Wizard
Amahi needs an easy, wizard-like way to add new hard drives.
Here's how it could work.
1. Format (erase) the new drive?
WARNING! This will completely erase this new drive! Make sure the selected hard drive is the drive you'd like to erase.
(No: Remember selection, then go to #3)
2. Format using what file system?
[X] ext4: Linux format; <strong>strongly recommended</strong> for use in Amahi, or other Linux systems.
[ ] NTFS: Windows format; only use this option if you really need to be able to read this drive when it's (physically) connected directly on a Windows computer.
[ ] FAT32: Windows format; not recommended for big files; maximum size of files on a FAT32 partition: 4GB.
3. What would you like to do with this new drive?
[ ] Mount as /var/hda/files/drives/drive#. You'll then be able to <a href="/setup?sub=shares&tab=share">create new shares</a> in that directory, to use this new drive.
[ ] (Experimental) Add it to your <a href="/setup?sub=disk_pooling&tab=share">shared storage pool</a>.
4. Show animated 'Please wait...'
- If user asked to format, fdisk & format now, using selected file system.
- Mount new drive with: NEW_DRIVE_PATH=`hda-diskmount --silent /dev/sdX#`
(mount failed if NEW_DRIVE_PATH == "")
- If the user asked to add the drive to storage pool: do that, and if no shares have the 'Uses Pool' option enabled yet, enable it for all of them, with 0 extra copies, then restart greyhole & Samba. If some shares have 'Uses Pool' enabled, don't thouch anything there, and just restart Greyhole.
- If the user asked to just mount:
- if user asked for a format: echo Your new drive has been formatted, and is now available as $NEW_DRIVE_PATH. You can now <a href="/setup?sub=shares&tab=share&root=$NEW_DRIVE_PATH">create new shares</a> in that directory.
- else: echo Your new drive is now available as $NEW_DRIVE_PATH. You can now <a href="/setup?sub=shares&tab=share&root=$NEW_DRIVE_PATH">create new shares</a> in that directory.
- If the user asked to add the drive to storage pool: echo Your new drive is now part of your shared storage pool.
- if 'Uses Pool' has been enabled for all shares: echo All your shares are now using your shared storage pool. You can configure your shared storage pool in the <a href="/setup?sub=disk_pooling&tab=share">Shares > Storage Pool</a> page. You can configure storage pool usage for shares in <a href="/setup?sub=shares&tab=share">Shares</a> page. Note that the existing data in your shares (if any) will be moved into your shared storage pool starting at midnight tonight.
#1 Updated by jinxytj about 8 years ago
Here is one design which could be used within the storage tab in the HDA to control hard disks.
Could also possibly implement removal of drives, especially those controlled by greyhole.
#3 Updated by vegaramos1 almost 8 years ago
I'm not new to Linux (or the CLI), but I'm not an expert either. However, the only issue I had with using Greyhole on my new HDA installation, was formatting the drive and having it permanently mount (via editing the /etc/fstab). I think anything the Amahi team can do to keep the users from having to use tools like gParted, and editing the /etc/fstab will go a long way in making Amahi as user friendly as WHS is. Ideally I would like to never have to log into the Amahi desktop.
#4 Updated by cpg over 7 years ago
- Status changed from New to Assigned
vegaramos1, understood. we're brainstorming about all the little issues, like how to prevent losing long-running things like making a file system, etc.
in addition of detecting new drives (i.e. unmounted), etc. the first thought is to come up with a queue, so that one can close a window willingly or accidentally, and come back to it. be able to cancel.
another thought is to take things one at a time, for instance, restrict to only mounting, not partitioning or formatting. when this works, then work on formatting, then work on simple partitioning.
#6 Updated by tmkasun over 4 years ago
I have build a prototype1 for the add-new-disk-wizard plugin,it is based on the details available on this ticket and the wiki page and the help from amahi team.
IMHO its good to have a model(new table) to keep the information of removeable/permenant devices which are attached to HDA.so then we can track the removel and addition of devices to the system specially when user has removed a device from we don't have any record of it.
- I think what is meant by (Remember selection) is, remembering the options which are selected by the user in the wizard.
i.e: if user wants to go back and change what he/she has chosen in a previous step , then they should able to see their previous selection on that step.
i hope i got the things correctly,please correct me if i'm not.
- if i'm correct, what is ment by "If the user asked to just mount" is, use the disk without making any changes to excisting data/partition table.so then we don't have to worry about the partition types and formating just mount all the excisting partitions to the /var/hda/files/drives/drive[number], and i think we can use hda-diskmount script to do that.
(if i have got the concept correctly,
in hda-diskmount shell script, --silent argument will set the flag VERBOSE to 'n', so the output to the STDIO will be less which can be easily identify by a regex pattern)
- It is quite difficult to understand what is meant by 'queues' (mentioned in #4) , so could you please explain it little bit more.
- As i have understand from the discussed we had earlier,The new-disk-wizard plugin can be placed as a sub-tag,under the disk tab2, if it is not the correct tag please let me know.
so code is open for review :)
#7 Updated by cpg over 4 years ago
First, great job in the prototype!
Answers to your questions: * Remember selection is that the settings have to be remembered by the back-end (not just cookies), because formatting can take a while to run. * i don't know about "just mount" we can discuss that separately * queues: basically, the system has to take a sequence of steps, each of which could fail, or take non-trivial amounts of time to execute. the logical way to do this is to use a queue of things to do once the user clicks on "apply" (or "go ahead"), etc. * one possibility is to put it under the disk tab, yes (note the typos: tab, not tag)
Also available in: Atom