<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://techdoku.nogafam.es/lib/exe/css.php?s=feed" type="text/css"?>
<rdf:RDF
    xmlns="http://purl.org/rss/1.0/"
    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
    xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
    xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel rdf:about="https://techdoku.nogafam.es/feed.php">
        <title>NoBIGTech Wiki Técnico - docu:csheet:sysadm:disks</title>
        <description></description>
        <link>https://techdoku.nogafam.es/</link>
        <image rdf:resource="https://techdoku.nogafam.es/lib/exe/fetch.php?media=wiki:dokuwiki.svg" />
       <dc:date>2026-04-27T08:03:36+00:00</dc:date>
        <items>
            <rdf:Seq>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:clone_partition_table&amp;rev=1594374255&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_disk_nice_info&amp;rev=1589647438&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_hw_info&amp;rev=1654955046&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_rotational&amp;rev=1582995098&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:grow_partition&amp;rev=1620198775&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:img_mount_loop&amp;rev=1647551457&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:iscsi_update_targets&amp;rev=1633445014&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:luks_change_key&amp;rev=1588953680&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:lvm_backup_restore&amp;rev=1594468340&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:mount_gz_image&amp;rev=1682462912&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:physical_disk_resize&amp;rev=1653565791&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:shred_ssd&amp;rev=1678647994&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:t2fs_labelname&amp;rev=1581074841&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:t2fs_reserved&amp;rev=1581074741&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:uuid_set_device&amp;rev=1598287961&amp;do=diff"/>
                <rdf:li rdf:resource="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:write_iso_to_dvd&amp;rev=1590354916&amp;do=diff"/>
            </rdf:Seq>
        </items>
    </channel>
    <image rdf:about="https://techdoku.nogafam.es/lib/exe/fetch.php?media=wiki:dokuwiki.svg">
        <title>NoBIGTech Wiki Técnico</title>
        <link>https://techdoku.nogafam.es/</link>
        <url>https://techdoku.nogafam.es/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
    </image>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:clone_partition_table&amp;rev=1594374255&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-10T09:44:15+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>clone_partition_table</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:clone_partition_table&amp;rev=1594374255&amp;do=diff</link>
        <description>Export and clone partition table from 1 disk to another




For example, assuming that our disk is /dev/sda , to save the partition table we can give the command:

sfdisk -d /dev/sda &gt; partitions.txt



while to restore it, assuming that the destination disk is /dev/sdb and we want to clone the partition table, we can use the command</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_disk_nice_info&amp;rev=1589647438&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-05-16T16:43:58+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>get_disk_nice_info</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_disk_nice_info&amp;rev=1589647438&amp;do=diff</link>
        <description>Get interesting information about a disk/partition using tune2fs



For sysadmins, tune2fs -l offers great information about filesystem, like last mount time or last write time 😉👌


tune2fs -l /dev/sdX


Source: &lt;https://mastodon.social/@carlchenet/104177618884829584&gt;</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_hw_info&amp;rev=1654955046&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-06-11T13:44:06+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>get_hw_info</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_hw_info&amp;rev=1654955046&amp;do=diff</link>
        <description>Show hardware information of system disks (manufacturer, etc...)





# install the package
apt install lshw

# show the info
lshw -class disk</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_rotational&amp;rev=1582995098&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-02-29T16:51:38+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>get_rotational</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:get_rotational&amp;rev=1582995098&amp;do=diff</link>
        <description>Check a disk is HDD or SSD (rotational)



You often get a new PC or laptop or using another person&#039;s computer and you may not know the disk technology being used (HDD/SSD). So, on linux you can use a sys kernel file to find it out.


cat /sys/block/sda/queue/rotational
# 0 means SSD, 1 means HDD
# replace &quot;sda&quot; to your needs</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:grow_partition&amp;rev=1620198775&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-05-05T07:12:55+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>grow_partition</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:grow_partition&amp;rev=1620198775&amp;do=diff</link>
        <description>Resize partition to grow the filesystem (useful on Virtual Environment Disks)



There is some cases when you need to grow/enlarge a partition on a virtual disk (usually represented as /dev/vdX), here is how to do it rebooting once (yes, i would be better sysadmin if no reboot was needed</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:img_mount_loop&amp;rev=1647551457&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-03-17T21:10:57+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>img_mount_loop</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:img_mount_loop&amp;rev=1647551457&amp;do=diff</link>
        <description>Mount .img partitions to separate loops so you can mount any partition inside image


$ sudo kpartx -v -a file.iso
add map loop0p1 (253:17): 0 8382464 linear 7:1 2048
$ mount /dev/mapper/loop0p1 ./mnt_point
...  do something with the partition  ...
$ umount ./mnt_point
$ kpartx -d -v file.iso
del devmap : loop0p1
loop deleted : /dev/loop0</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:iscsi_update_targets&amp;rev=1633445014&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2021-10-05T14:43:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>iscsi_update_targets</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:iscsi_update_targets&amp;rev=1633445014&amp;do=diff</link>
        <description>Update ISCSI target list from a certain ISCSI host



In order to update targets of an iscsi host when adding a new one, run this command on the client:


iscsiadm -m discovery -t sendtargets -p SERVER:3260</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:luks_change_key&amp;rev=1588953680&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-05-08T16:01:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>luks_change_key</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:luks_change_key&amp;rev=1588953680&amp;do=diff</link>
        <description>Change passphrase on LUKS full encrypted disk/partition



Simply changing your passphrase on a LUKS drive with only one passphrase is extremely easy. Open a terminal and run the following command, substituting the actual drive location for “sdX.” First, you’ll be prompted to enter your existing passphrase. Then, you can create a new one.</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:lvm_backup_restore&amp;rev=1594468340&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-07-11T11:52:20+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>lvm_backup_restore</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:lvm_backup_restore&amp;rev=1594468340&amp;do=diff</link>
        <description>Backup and restore LVM configuration of a volume group (vg)



To know the volume groups of your system, issue the following command, we will use the VG Name field:

vgdisplay



This command is automatically done everytime the LVM volume group changes, so you don&#039;t really have to schedule this command, but if you want to make sure you have a</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:mount_gz_image&amp;rev=1682462912&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-04-25T22:48:32+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>mount_gz_image</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:mount_gz_image&amp;rev=1682462912&amp;do=diff</link>
        <description>Mount a .gz compressed image file using nbdkit and nbd-client (read-only)


# create the server that decompresses the file live
nbdkit -i 127.0.0.1 /usr/lib/(your-machine-arch)/nbdkit/plugins/nbdkit-gzip-plugin.so file=test.img.gz
# connect to the server and create a device interface on /dev/nbd0
nbd-client 127.0.0.1 10809 /dev/nbd0

# once finished, you can clean-up everything by:
nbd-client --disconnect /dev/nbd0
pkill nbdkit</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:physical_disk_resize&amp;rev=1653565791&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2022-05-26T11:49:51+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>physical_disk_resize</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:physical_disk_resize&amp;rev=1653565791&amp;do=diff</link>
        <description>Resize virtual disk (vdX) to match it&#039;s new size (growpart, resize2fs)



Given that the device is /dev/vda and the system partition (/) is at /dev/vda1, we run this commands:


growpart /dev/vda 1
resize2fs /dev/vda1




The code on LVM changes a bit</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:shred_ssd&amp;rev=1678647994&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2023-03-12T19:06:34+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>shred_ssd</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:shred_ssd&amp;rev=1678647994&amp;do=diff</link>
        <description>Securely erase an SSD with hdparm

SSD drives need different way of erasing data. We will cover how to do this on Linux without proprietary software.


# show drive Infos and lock for &quot;frozen&quot; state!!! shoud be not frozen/locked
hdparm -I /dev/sdb

# if frozen, try the following:
systemctl suspend
# then, unsuspend. It should be &quot;not frozen&quot; after that

# now, erase the data
hdparm --security-set-pass NULL /dev/sdb # set the &quot;NULL&quot; password to UNLOCK the Controller
hdparm --security-erase NULL /…</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:t2fs_labelname&amp;rev=1581074841&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-02-07T11:27:21+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>t2fs_labelname</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:t2fs_labelname&amp;rev=1581074841&amp;do=diff</link>
        <description>Change ext3/ext4 disk label name

tune2fs -L LABEL_NAME /dev/XXX</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:t2fs_reserved&amp;rev=1581074741&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-02-07T11:25:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>t2fs_reserved</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:t2fs_reserved&amp;rev=1581074741&amp;do=diff</link>
        <description>Remove reserved blocks from an ext4 partition

Where XXX is your device (partition or not):

tune2fs -m 0 /dev/XXX</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:uuid_set_device&amp;rev=1598287961&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-08-24T16:52:41+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>uuid_set_device</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:uuid_set_device&amp;rev=1598287961&amp;do=diff</link>
        <description>Manually set UUID of Linux swap/ext partition using cli



Set UUID to a swap file/device


swaplabel -U 427ec4fa-e8e5-47a5-af4c-e15583aeadd7 /dev/sdb5




Set UUID to an ext3/ext4 partition


tune2fs -U 95a40ae4-3f84-6ea1-bee3-7ad41ef76443 /dev/sdb1</description>
    </item>
    <item rdf:about="https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:write_iso_to_dvd&amp;rev=1590354916&amp;do=diff">
        <dc:format>text/html</dc:format>
        <dc:date>2020-05-24T21:15:16+00:00</dc:date>
        <dc:creator>Anonymous (anonymous@undisclosed.example.com)</dc:creator>
        <title>write_iso_to_dvd</title>
        <link>https://techdoku.nogafam.es/doku.php?id=docu:csheet:sysadm:disks:write_iso_to_dvd&amp;rev=1590354916&amp;do=diff</link>
        <description>Write/Burn an .ISO image file to a dvd-rw



Burn an installation .iso image into a dvd rw device


apt install growisofs

growisofs -Z /dev/dvd=file.iso</description>
    </item>
</rdf:RDF>
