Disk management: Difference between revisions

From Han Wiki
Jump to navigation Jump to search
→‎Mirror a folder: add param legend
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
[[Category:System administration]]
== List all disks and partitions ==
== List all disks and partitions ==
* ''Last tested on Ubuntu 14.04.2 LTS (trusty)''
* ''Last tested on Ubuntu 14.04.2 LTS (trusty)''
<syntaxhighlight lang="bash" highlight="1">
<source lang="bash" highlight="1">
$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda1 ext3    38G /
sda1 ext3    38G /
sda2 swap    2G [SWAP]
sda2 swap    2G [SWAP]
</syntaxhighlight>
</source>


== Mirror a folder ==
* ''Last tested on Ubuntu 16.04 LTS (xenial)''


This also works between servers. The first one is on the same server.
== Formatting USB disk on Windows 10 ==
* {{testedon|2020-11-28|Windows 10 v20H2 (19042.630)}}


Explanation of parameters used:
On some disks that's been formatted on a non-Windows system, this seems to help.  If it's physically corrupt (some SD card brands are prone to early defect) then it may be time to get a replacement via RMA or get a new one.
-a: archive - preserve permissions, ownership, and timestamps
-v: verbose
-z: compress


<syntaxhighlight lang="bash" highlight="1">
<source lang="bash">
$ rsync -azv /folder_a/ /folder_b/
> list disk
</syntaxhighlight>
> select disk 2
> clean
</source>


This one is between different servers.
Then continue in Disk Management management module to partition and format the drive.
 
<syntaxhighlight lang="bash" highlight="1">
$ rsync -azv ~/folder_a/ mhan@tom.myserver.com:~/folder_b/
</syntaxhighlight>
 
[[Category:System administration]]

Latest revision as of 10:34, 7 December 2020


List all disks and partitions

  • Last tested on Ubuntu 14.04.2 LTS (trusty)
$ sudo lsblk -o NAME,FSTYPE,SIZE,MOUNTPOINT,LABEL
NAME FSTYPE SIZE MOUNTPOINT LABEL
sda1 ext3    38G /
sda2 swap     2G [SWAP]


Formatting USB disk on Windows 10

  • Last tested on Windows 10 v20H2 (19042.630) (2020-11-28)

On some disks that's been formatted on a non-Windows system, this seems to help. If it's physically corrupt (some SD card brands are prone to early defect) then it may be time to get a replacement via RMA or get a new one.

> list disk
> select disk 2
> clean

Then continue in Disk Management management module to partition and format the drive.