-
Notifications
You must be signed in to change notification settings - Fork 0
/
storage
64 lines (60 loc) · 2.65 KB
/
storage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/bin/bash
# syntax highlighting, you know the drill
# sample setup: 4x 8TB drives
sudo mkdir /mnt/disk{1,2,3,4} # make mount points
ls -l /dev/disk/by-uuid # list all formatted disks by uuid
sudo blkid -p /dev/sda # double-check formatting of single disk
sudo blkid -p /dev/sde2 # double-check formatting of single partition
lsblk -f # double-check all disks
## for raw storage, write filesystem directly to device (no partitions/gpt)
sudo mkfs.ext4 /dev/sd{a,b,c,d} # make ext4 on partitionless disk
sudo e2label /dev/sda 7SGLSX6C # -----------------------------------------------
sudo e2label /dev/sdb 7SGNDTNC # set ext4 label to whatever you want, really...
sudo e2label /dev/sdc 7SGMXZ9C # i'm using the short serials of each drive here.
sudo e2label /dev/sdd 7SGN83HC # -----------------------------------------------
## alternatively, create gpt then format partitions
sudo pacman -S parted gptfdisk # install needed tools
sudo parted /dev/sda mklabel gpt yes # create a gpt
sudo cgdisk /dev/sda # make your desired partitions
# create your fstab (sample)
## fs: use UUID=[...] ideally
## or LABEL=[...] if you're not going to ever change the label
## dir: /, /boot, /mnt/diskX, /whatever
## type: ext4, vfat, btrfs, xfs, and so on
## options: probably want to use rw,relatime for most cases
## dump: 0 to disable dumping (default)
## pass: use 1 for root, 2 for everything else, 0 to disable fsck
#################################################################################
## fs dir type options dump pass
#################################################################################
#
##### === ROOT SSD === ##########################################################
#
## WD Blue 500GB (164401A02C75)
## I-SATA 0 (/dev/sde)
#
### Root (/dev/sde2)
## [generated by genfstab during install]
#
### ESP (/dev/sde1)
## [generated by genfstab during install]
#
###### === HARD DRIVES === #######################################################
#
## EFAX P1 (7SGLSX6C)
## S-SATA0 (/dev/sda)
#UUID=9e45ee84-bce9-473d-9bf4-8095a3fcf1b5 /mnt/disk1 ext4 rw,relatime 0 2
#
## EFAX P2 (7SGNDTNC)
## S-SATA1 (/dev/sdb)
#UUID=5dd0f8d8-818e-40f0-9856-da04e7819176 /mnt/disk2 ext4 rw,relatime 0 2
#
## EFAX P3 (7SGMXZ9C)
## S-SATA2 (/dev/sdc)
#UUID=c02ef1e8-536f-4d3e-bef8-066fea6b8f0c /mnt/disk3 ext4 rw,relatime 0 2
#
## EMAZ P4 (7SGN83HC)
## S-SATA3 (/dev/sdd)
#UUID=30b0bc0c-13b7-4108-89d6-f0a6f6959ebf /mnt/disk4 ext4 rw,relatime 0 2
#
#################################################################################