Growlight: Difference between revisions

 
(50 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[File:growlight.jpg|right|upright=2.0|thumb|alt="Growlight logo"|Grow, baby, grow]]
[[File:glight.png|right|thumb|alt="Growlight logo"|Grow, baby, grow]]
[http://www.sprezzatech.com/growlight.html Growlight] is Sprezzatech's open source disk management utility and system installation prep tool, designed for use with [http://www.sprezzatech.com/sprezzos.html SprezzOS].
Growlight is a powerful open source tool for visualizing and managing persistent storage under Linux, built atop [[Notcurses]]. It began life as Sprezzatech's system installation prep tool, designed for use with [http://www.sprezzatech.com/sprezzos.html SprezzOS], but is now aimed at more mainstream (and non-defunct) distributions.
* Code lives at [https://github.com/dankamongmen/growlight GitHub].
* Code lives at [https://github.com/dankamongmen/growlight GitHub].
* Downloads are available from [https://github.com/dankamongmen/growlight/releases GitHub].
* Growlight is present in [https://src.fedoraproject.org/rpms/growlight Fedora Core], [https://tracker.debian.org/pkg/growlight Debian], Alpine Edge, the AUR, and OpenSUSE.
* There is a [https://groups.google.com/forum/#!forum/growlight-dev mailing list]. You can post by mailing [mailto:growlight-dev@googlegroups.com growlight-dev@googlegroups.com].
* There is a [https://groups.google.com/forum/#!forum/growlight-dev mailing list]. You can post by mailing [mailto:growlight-dev@googlegroups.com growlight-dev@googlegroups.com].
* The [https://www.sprezzatech.com/bugs/buglist.cgi?list_id=8&resolution=---&query_format=advanced&component=Growlight Growlight] component of the SprezzOS project can be found on [https://www.sprezzatech.com/bugs Sprezzabugs].
* Bugs are now being tracked via [https://github.com/dankamongmen/growlight/issues Github issues]
 
==Debian installer==
My talk, "[https://debconf21.debconf.org/talks/3-proposing-a-new-d-i-disk-preparation-tool-growlight/ proposing a new d-i disk preparation tool]" at [https://debconf21.debconf.org/ debconf21] introduces the idea of using growlight within the mainstream Debian Installer.
 
==Some capabilities==
{|class="wikitable" border="1"
! Capability
! Version
! Helpers
|-
| <tt>CDROM_TIMED_MEDIA_CHANGE</tt>
|
| Linux 5.16
|-
| EFIstub setup
|
| efibootmgr
|-
| [https://phoronix.com/scan.php?page=news_item&px=Linux-5.15-Disk-Seq-No BLKGETDISKSEQ]
|
| Linux 5.15
|-
| [https://systemd.io/DISCOVERABLE_PARTITIONS Discoverable partitions]
|
|
|-
| NVMe-ZNS recognition
|
| Linux 5.9
|-
| exFAT support
|
| Linux 5.6, exfat-utils
|-
| Linux 5.6 "drivetemp" support
|
| Linux 5.6
|-
| [[NVMe|Optane]] DCPMM device support
|
| ipmctl
|-
| Collect and display statistics
| 1.1.0
| procfs
|-
| [[NVMe]] device support
| 1.0.5
| nvme-cli
|-
| Pass stride_width and stripe parameters to mkfs.ext*
| 1.0.2
| e2fsprogs (mkfs.ext*)
|-
| Make [[ZFS]] filesystems
| 1.0.1
| zfs
|-
| Make jfs filesystems
| 1.0.3
| mkfs.jfs
|-
| Make xfs filesystems
| 1.0.2
| mkfs.xfs
|-
| Make HFS/HFS+ filesystems
| needs testing
| mkfs.hfs, mkfs.hfsplus
|-
| Filesystem signature wiping
| 1.0.2
| wipefs
|-
| Create/manipulate MSDOS partition tables
| 1.0.2
|
|-
| Create/manipulate Apple Partition Maps
| Create added in 1.0.4
|
|-
| Create MD aggregates
| 1.0.2
| mdadm
|-
| Create DM aggregates
| needs testing
|
|-
| MD / zpool aggregate scan + import
| 1.0.1
| mdadm, zpool
|-
| Temperature sensing (where supported)
| 1.0.1
| libatasmart
|-
| Rotation speed / Transport detection
| 1.0.1
|
|-
| Create ZFS zpools
| 1.0.1
| zpool, zfs
|-
| Make ext2, ext3, ext4 filesystems
| 1.0.0
| e2fsprogs (mkfs.ext*)
|-
| Make swap devices
| 1.0.0
| mkswap
|-
| Labeled filesystem creation
| 1.0.0
|
|-
| Make vfat filesystems
| 1.0.0
| mkfs.vfat
|-
| Create/manipulate GPT partition tables
| 1.0.0
|
|-
| Align partitions based off physical sector size
| 1.0.0
|
|-
| SMART status check
| 1.0.0
| libatasmart
|-
|-
| UEFI boot preparation (UEFI bootloader, ESP, /etc/fstab)
| 1.0.0
| grub2
|-
| BIOS boot preparation (BIOS bootloader, /etc/fstab)
| 1.0.0
| grub2
|-
|}


<html><a href='http://www.pledgie.com/campaigns/18116'><img alt='Click here to lend your support to: Growlight - Total disk management and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/18116.png?skin_name=chrome' border='0' /></a></html>
==Partitions and the [[Linux]] kernel==
==Partitions and the [[Linux]] kernel==
When a disk's partitioning is changed, the kernel must be notified via an explicit ioctl() or [[sysfs]] operation.
When a disk's partitioning is changed, the kernel must be notified via an explicit ioctl() or [[sysfs]] operation.
* From the command line: echo 1 | sudo tee -a /sys/block/<device>/device/rescan
* From the command line: echo 1 | sudo tee -a /sys/block/<device>/device/rescan
* From C: use the BLKRRPART or BLKPG ioctls
* From [[C]]: use the BLKRRPART or BLKPG ioctls
** BLKRRPART is deprecated. It fails if any partition on the disk is in use, wheras BLKPG fails only if given invalid arguments, or attempting to modify a partition that is being used.
** BLKRRPART is deprecated. It fails if any partition on the disk is in use, wheras BLKPG fails only if given invalid arguments, or attempting to modify a partition that is being used.
Growlight handles all of this for you, of course.


==Identifying Block Devices==
==Identifying Block Devices==
[[File:Growlightterm.png|thumb|right|alt="A terminal running growlight-tty"|A terminal running growlight-tty]]
[[File:Growlight-1.0.1.png|thumb|right|alt="A terminal running growlight-curses"|The growlight 1.0.1 release poster]]
[[File:Growlight-curses.png|thumb|right|alt="A terminal running growlight-curses"|A terminal running growlight-curses]]
Terminology!
Terminology!
* '''UUID''' A 128-bit RFC 4122 number. Used in [[GPT]] for disks and partitions. Used in many filesystems.
* '''UUID''' A 128-bit RFC 4122 number. Used in [[GPT]] for disks and partitions. Used in many filesystems.
Line 20: Line 165:
* '''Partition table''': A structure describing logical volumes on a single disk
* '''Partition table''': A structure describing logical volumes on a single disk
** '''Disklabel''' An old ([[FreeBSD|BSDish]]) name for a partition table
** '''Disklabel''' An old ([[FreeBSD|BSDish]]) name for a partition table
* '''Superblock''' A filesystem's metadata, usually occupying the first few sectors
** Sometimes backed up, sometimes multiple times.
* '''Label''' A string of up to 16 bytes associated with a filesystem
* '''Label''' A string of up to 16 bytes associated with a filesystem
** '''Volume Label''' An old (DOSish) name for a filesystem label
** '''Volume Label''' An old (DOSish) name for a filesystem label
* '''Master Boot Record''' The first sector on a disk in a BIOS/MBR machine
* '''Master Boot Record''' The first sector on a disk in a BIOS/MBR machine
** '''Boot sector''' The first sector of a bootable partition
** '''Boot sector''' The first sector of a bootable partition
Thus:
Thus:
* A ''disk'' has a ''WWN'', a ''model'', and a ''serial number''.
* A ''disk'' has a ''WWN'', a ''model'', and a ''serial number''.
Line 66: Line 214:
| 9.4ZB
| 9.4ZB
| 128 * ''n''
| 128 * ''n''
|-
! APM
| 2TB
| 2TB
| n, requiring n + 1 512-byte sectors
|-
|-
|}
|}
===Unique Identification===
===Unique Identification===
It is useful to uniquely identify block devices in a persistent manner. Device topology and thus <tt>/dev</tt> entry naming can change dynamically -- devices can be moved between boots; hot pluggable drives can be attached and removed; media can be ejected and replaced or reinserted. For physical devices, the unique identification ought be associated with the physical device. For virtual devices, the unique identification ought be associated with the virtual device and its component devices.
It is useful to uniquely identify block devices in a persistent manner. Device topology and thus <tt>/dev</tt> entry naming can change dynamically -- devices can be moved between boots; hot pluggable drives can be attached and removed; media can be ejected and replaced or reinserted. For physical devices, the unique identification ought be associated with the physical device. For virtual devices, the unique identification ought be associated with the virtual device and its component devices.
Line 79: Line 233:


==Resources==
==Resources==
Note that even using DMI 2.0, the standard 4x southbridge uplink can be supersaturated by two SATA3 devices.
Note that even using DMI 2.0, a 4x southbridge uplink can be supersaturated by four SATA3 devices.
{| class="wikitable" border="1"
{| class="wikitable" border="1"
! Interface
! Interface
Line 146: Line 300:
| 32
| 32
|-
|-
| DMI lane (almost always x4, sometimes x2)
| DMI lane
| 2.5 Gbps (312.5 MB/s)
| n/a
| 5
| 5
| 10
| 10
|-
|-
| DMI 2.0
| DMI 2.0 lane
| 5 Gbps (625 MB/s)
| n/a
| 10
| 10
| 20
| 20
|-
| DMI 3.0 lane
| n/a
| 20
| 40
|-
|-
|}
|}
Line 211: Line 370:
* Extract true parameters from SSDs and 4k sector (especially WD-EARS) drives
* Extract true parameters from SSDs and 4k sector (especially WD-EARS) drives
* Properly align everything
* Properly align everything
===Possible Goals===
* Install either Linux or FreeBSD


[[CATEGORY: Projects]]
[[CATEGORY: Projects]]
[[CATEGORY: SprezzOS]]
[[CATEGORY: SprezzOS]]