This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Last revision Both sides next revision | ||
showmydisks [2015-09-12 22:50] andreas 0.12 * 2015-09-12 fixed detection of rootfs device |
showmydisks [2015-10-27 22:32] andreas [Limitations] Does not support disks with GUID Partition Table (GTP) |
||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== showmydisks ====== | ||
+ | |||
+ | A [[http:// | ||
+ | |||
+ | ===== Synopsis ===== | ||
+ | |||
+ | <code bash> | ||
+ | showmydisks [-L] [-u] ["dev1 ... devN"] | ||
+ | </ | ||
+ | |||
+ | ===== Description ===== | ||
+ | |||
+ | '' | ||
+ | |||
+ | The script has not been tested much but was known to run well on Debian 4 and 5 and Ubuntu 9 and 10. | ||
+ | v0.12 has been tested on Debian 7.9 and Lubuntu 14.04.3. | ||
+ | |||
+ | ===== Examples ===== | ||
+ | |||
+ | < | ||
+ | root@ubuntu: | ||
+ | > sda: ATA FUJITSU MHZ2160B (149 GB) | ||
+ | |-- 1: type 7 (NTFS?) 9 GB on /windows as fuseblk (5 GB free) | ||
+ | |-- 2: 188 MB on /boot as ext3 (142 MB free) | ||
+ | |-- 3: extended partition | ||
+ | |-- 5: Linux swap partition, 956 MB | ||
+ | |-- 6: 956 MB on /tmp as ext3 (876 MB free) | ||
+ | |-- 7: 1 GB on /var as ext3 (1 GB free) | ||
+ | |-- 8: 760 MB on / (430 MB free) | ||
+ | |-- 9: 4 GB on /usr as ext3 (1 GB free) | ||
+ | |-- 10: type 7 (NTFS?) 116 GB on /data as fuseblk (86 GB free) | ||
+ | > sdb: Kingston DataTraveler II (983 MB) | ||
+ | |-- 1: partition type e | ||
+ | > sdc: WD 10EAVS External (931 GB) | ||
+ | |-- 1: type 7 (NTFS?) 931 GB vfat|msdos | ||
+ | > sdd: WD 10EAVS External (931 GB) | ||
+ | |-- 1: type 7 (NTFS?) 931 GB on / | ||
+ | </ | ||
+ | |||
+ | Show also number of unallocated sectors ('' | ||
+ | |||
+ | < | ||
+ | root@ubuntu: | ||
+ | > sdb: WD 10EAVS External (931 GB) | ||
+ | |-- 1: type 7 (NTFS?) 931 GB vfat|msdos | ||
+ | (5165 unallocated sectors) | ||
+ | </ | ||
+ | |||
+ | Run as unprivileged user (non-root): | ||
+ | |||
+ | < | ||
+ | user@debian: | ||
+ | |||
+ | showmydisks: | ||
+ | |||
+ | > hda: IBM-DTTA-351680 (15 GB) | ||
+ | |-- 1: type unknown 15 GB on /backups as ext2 (2 GB free) | ||
+ | > sda: ICP Host Drive #00 (34 GB) | ||
+ | |-- 1: type unknown 250 MB on / as ext2 (170 MB free) | ||
+ | |-- 2: type unknown 23 MB on /boot as ext2 (13 MB free) | ||
+ | |-- 3: type unknown 321 MB fs unknown | ||
+ | |-- 4: type unknown 1 KB fs unknown | ||
+ | |-- 5: type unknown 305 MB on /tmp as ext2 (275 MB free) | ||
+ | [...] | ||
+ | </ | ||
+ | |||
+ | The above example shows that as non-root user partition types are not read. Hence, here '' | ||
+ | |||
+ | Since version 0.07 '' | ||
+ | |||
+ | < | ||
+ | user@debian: | ||
+ | |||
+ | showmydisks: | ||
+ | |||
+ | > md: Software RAID (185 GB) | ||
+ | |-- 0: raid1 on / as ext3 (88 MB free) | ||
+ | |-- 1: raid1 fs unknown | ||
+ | |-- 2: raid1 on /usr as ext3 (3 GB free) | ||
+ | |-- 3: raid1 on /var as ext3 (732 MB free) | ||
+ | |-- 4: raid1 on /home_u1 as ext3 (26 GB free) | ||
+ | |-- 5: raid1 on / | ||
+ | </ | ||
+ | |||
+ | ===== Limitations ===== | ||
+ | |||
+ | There are many. Some bigger ones are (we could call them " | ||
+ | |||
+ | - Does not support disks with GUID Partition Table (GTP). | ||
+ | - Detection of filesystems of non-Linux partitions is not implemented. | ||
+ | - Detection of filesystems requires root privileges. | ||
+ | - Support for UUIDs is not implemented. | ||
+ | - LVMs are not detected. | ||
+ | - The script is not luser proof. | ||
+ | |||
+ | ===== History ===== | ||
+ | |||
+ | < | ||
+ | 0.02 * 2004-12-23 | ||
+ | 0.03 * 2005-01-19 | ||
+ | 0.04 * 2009-09-13 | ||
+ | 0.05 * 2009-09-14 | ||
+ | 0.05 * 2009-09-14 | ||
+ | 0.06 * 2009-09-15 | ||
+ | 0.07 * 2009-09-15 | ||
+ | 0.08 * 2010-03-07 | ||
+ | 0.09 * 2011-02-20 | ||
+ | 0.10 * 2012-08-25 | ||
+ | 0.11 * 2015-03-27 | ||
+ | 0.12 * 2015-09-12 | ||
+ | </ | ||
+ | |||
+ | ===== Download ===== | ||
+ | |||
+ | {{: | ||
+ | |||
+ | Please accept my sincere apology for the horrible coding style of this script. I am not a programmer, and when I started to write this script some 15 years ago my style was indeed worse than today. | ||
+ | |||
+ | ~~DISCUSSION~~ | ||
+ | |||