Difference between revisions of "New Disk Wizard"

From Amahi Wiki
Jump to: navigation, search
m (Cpg moved page New disk wizard to New Disk Wizard)
 
(12 intermediate revisions by 3 users not shown)
Line 1: Line 1:
Ideas for a new disk wizard:
+
= Introduction =
 +
This is a plugin to add new disks to an Amahi HDA in a "seamless as possible" fashion.
  
* need to distinguish between temporary/removable and permanent
+
<div style="border: 1px solid #A3B1BF; padding: .8em 1em; background-color: #faa; margin: 0px 1em;">
* need to have the ability to format
+
'''CAUTION:''' If you mount a drive and at some point remove it, ensure you remove the appropriate entry from the ''/etc/fstab''. If you don't, your HDA will boot into '''Emergency Mode''' and be inoperable.</div>
* need to be able to moun or unmount
 
* easy to make it part of the shares (and the pool)
 
* should be able to unmount it/remove it?
 
**Yes if it is flagged as temporary storage
 
* it should support/recognize multiple file systems, most notably, NTFS and ext3/4, possibly FAT
 
  
= Amahi New Disk Wizard =
+
= Assumptions and Dependencies =
  
1. Format (erase) the new drive?
+
== Features ==
    WARNING! This will completely erase this new drive! Make sure the selected hard drive is the drive you'd like to erase.
+
* Create partition tables, (e.g., msdos or gpt)
 +
* Create, move, copy, resize, check, label, set new UUID, and delete partitions
 +
* Enable and disable partition flags, (e.g., boot or hidden)
 +
* Align partitions to mebibyte (MiB) or traditional cylinder boundaries
 +
* Attempt data rescue from lost partitions
  
    (No: Remember selection, then to to #3)
+
== Devices supported ==
2. Format using what file system?
+
* Hard disk drives (e.g., [[SATA]], [[IDE]], and [[SCSI]])
  [X] ext4: Linux format; <strong>strongly recommended</strong> for use in Amahi, or other Linux systems.
+
* Flash memory devices, such as USB memory sticks and Solid State Drives (SSD&#39;s)
  [ ] 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.
+
* RAID Devices (hardware RAID, motherboard BIOS RAID, and Linux software RAID)
  [ ] FAT32: Windows format; not recommended for big files; maximum size of files on a FAT32 partition: 4GB.
+
* All sector sizes (e.g., devices with 512, 1024, 2048, 4096 byte sectors and more)
 +
Disk-Wizard does not support logical volume management (LVM2) at present.
  
  (Remember selection)
+
The Disk-Wizard uses a wide variety of third party libraries and tools which perform these operations. Disk-Wizard is a frontend, which brings together all these underlying functions and processes, and presents them in a graphical and accessible way.
  
3. What would you like to do with this new drive?
+
There is a list of dependencies, or a list of packages required for the program to work. In this occasion, they are file system tools.
  [ ] 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>.
 
  
  (Remember selection)
+
* ntfsprogs
 +
* udisks2
 +
* e2fsprogs
 +
* hdparm
  
4. Show animated 'Please wait...'
+
== File system support ==
 +
{| border="1"
 +
|-
 +
| style="background-color: #e3ffc3"|
 +
File system
 +
|style="background-color: #e3ffc3"|
 +
Detect
 +
|style="background-color: #e3ffc3"|
 +
Read
 +
|style="background-color: #e3ffc3"|
 +
Create
 +
|style="background-color: #e3ffc3"|
 +
Grow
 +
|style="background-color: #e3ffc3"|
 +
Shrink
 +
|style="background-color: #e3ffc3"|
 +
Move
 +
|style="background-color: #e3ffc3"|
 +
Copy
 +
|style="background-color: #e3ffc3"|
 +
Check
 +
|style="background-color: #e3ffc3"|
 +
Label
 +
|style="background-color: #e3ffc3"|
 +
UUID
 +
|style="background-color: #e3ffc3"|
 +
Required software
 +
|-
 +
| style="background-color: #e3ffc3"|
 +
ext2
 +
|style="color: #6aa84f"|
 +
&#10003;
  
* If user asked to format, fdisk & format now, using selected file system.
+
|style="color: #6aa84f"|
* Mount new drive with: NEW_DRIVE_PATH=`hda-diskmount --silent /dev/sdX#`
+
&#10003;
    (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.
 
  
5. Done!
+
|style="color: #6aa84f"|
* If the user asked to just mount:
+
&#10003;
** 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.
 
  
Attached: Required changes to hda-diskmount to support --slient and device parameters: [[File:Hda-diskmount.txt]]
+
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|
 +
e2fsprogs
 +
 
 +
|-
 +
| style="background-color: #e3ffc3"|
 +
ext3
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|
 +
e2fsprogs
 +
 
 +
|-
 +
| style="background-color: #e3ffc3"|
 +
ext4
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|
 +
e2fsprogs v1.41+
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
f2fs
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
f2fs-tools
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
fat16
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
dosfstools
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
fat32
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|
 +
dosfstools
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
hfs
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
hfsutils
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
hfs+
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
hfsprogs
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
jfs
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
jfsutils
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
linux-swap
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|
 +
util-linux
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
lvm2 pv
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
lvm2
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
nilfs2
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
nilfs-utils
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
ntfs
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|style="color: #6aa84f"|
 +
&#10003;
 +
 
 +
|style="color: #ff0000"|
 +
&#10005;
 +
 
 +
|
 +
ntfs-3g / ntfsprogs
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
reiser4
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
reiser4progs
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
reiserfs
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
reiserfsprogs
 +
 
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
ufs
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
|-
 +
|style="background-color: #e3ffc3"|
 +
xfs
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|style="color: #b7b7b7"|
 +
N/A
 +
 
 +
|
 +
xfsprogs, xfsdump
 +
 
 +
|}
 +
'''Legend'''
 +
 
 +
<font color="#6aa84f">&#10003;&#10003;</font>    Supported offline and online. For example, unmounted and mounted.
 +
 
 +
<font color="#6aa84f">&#10003;</font> Supported offline only.
 +
 
 +
<font color="#ff0000">&#10005;</font> Not supported.
 +
 
 +
<font color="#b7b7b7">N/A</font> Not applicable

Latest revision as of 13:31, 17 October 2016

Introduction

This is a plugin to add new disks to an Amahi HDA in a "seamless as possible" fashion.

CAUTION: If you mount a drive and at some point remove it, ensure you remove the appropriate entry from the /etc/fstab. If you don't, your HDA will boot into Emergency Mode and be inoperable.

Assumptions and Dependencies

Features

  • Create partition tables, (e.g., msdos or gpt)
  • Create, move, copy, resize, check, label, set new UUID, and delete partitions
  • Enable and disable partition flags, (e.g., boot or hidden)
  • Align partitions to mebibyte (MiB) or traditional cylinder boundaries
  • Attempt data rescue from lost partitions

Devices supported

  • Hard disk drives (e.g., SATA, IDE, and SCSI)
  • Flash memory devices, such as USB memory sticks and Solid State Drives (SSD's)
  • RAID Devices (hardware RAID, motherboard BIOS RAID, and Linux software RAID)
  • All sector sizes (e.g., devices with 512, 1024, 2048, 4096 byte sectors and more)

Disk-Wizard does not support logical volume management (LVM2) at present.

The Disk-Wizard uses a wide variety of third party libraries and tools which perform these operations. Disk-Wizard is a frontend, which brings together all these underlying functions and processes, and presents them in a graphical and accessible way.

There is a list of dependencies, or a list of packages required for the program to work. In this occasion, they are file system tools.

  • ntfsprogs
  • udisks2
  • e2fsprogs
  • hdparm

File system support

File system

Detect

Read

Create

Grow

Shrink

Move

Copy

Check

Label

UUID

Required software

ext2

e2fsprogs

ext3

e2fsprogs

ext4

e2fsprogs v1.41+

f2fs

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

f2fs-tools

fat16

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

dosfstools

fat32

dosfstools

hfs

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

hfsutils

hfs+

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

hfsprogs

jfs

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

jfsutils

linux-swap

util-linux

lvm2 pv

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

lvm2

nilfs2

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

nilfs-utils

ntfs

ntfs-3g / ntfsprogs

reiser4

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

reiser4progs

reiserfs

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

reiserfsprogs

ufs

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

xfs

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

N/A

xfsprogs, xfsdump

Legend

✓✓ Supported offline and online. For example, unmounted and mounted.

Supported offline only.

Not supported.

N/A Not applicable