quickreference:unix
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
quickreference:unix [2023/10/10 15:18] – [Check SSL Cert Expiration Date] rodolico | quickreference:unix [2023/10/19 17:32] – [Rename Server] rodolico | ||
---|---|---|---|
Line 5: | Line 5: | ||
===== Systems Administration ===== | ===== Systems Administration ===== | ||
+ | ==== Partitioning large drives ==== | ||
+ | |||
+ | Drives greater than 2 Terabytes are not handled well by the standard //fdisk// application, | ||
+ | |||
+ | This assumes we have a drive, sdg, that we want to set up with gpt and create one partition on. That partition will set up on optimal sector boundries, and use all of the space available. | ||
+ | |||
+ | <code bash> | ||
+ | # remove all old file system information. Not necessary, but I do it just because I can | ||
+ | wipefs -a /dev/sdg | ||
+ | # make this a gpt disk. Will wipe out any other partitioning scheme | ||
+ | parted /dev/sdg mklabel gpt | ||
+ | # make a new partition on optimal sector boundries. This is a primary partition, and starts | ||
+ | # at the beginning of the disk (0%) and goes to the end of the disk (100%) | ||
+ | # I put that in quotes as, from what I've read, the percent symbol does not work well | ||
+ | # within the bash command line | ||
+ | # note, we are not telling it what file system to use, so it defaults to Linux | ||
+ | parted -a optimal /dev/sdg mkpart primary ' | ||
+ | # display the information on the disk | ||
+ | parted /dev/sdg print | ||
+ | # format as ext4, no reserved space, and a disk label marked ' | ||
+ | mkfs.ext4 -m0 -Lbackup /dev/sdg | ||
+ | |||
+ | </ | ||
==== Rapidly wipe multiple hard drives ==== | ==== Rapidly wipe multiple hard drives ==== | ||
Line 150: | Line 173: | ||
<code bash> | <code bash> | ||
# change the host name, and the postfix name if that is installed | # change the host name, and the postfix name if that is installed | ||
- | sed -i.old ' | + | sed -i.old ' |
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
+ | / | ||
/ | / | ||
# update the aliases, if they exist | # update the aliases, if they exist |
quickreference/unix.txt · Last modified: 2024/03/04 15:54 by rodolico