partition is unnecessary, use disk directly
This commit is contained in:
parent
6ddfe17855
commit
852598a0f4
1 changed files with 8 additions and 9 deletions
17
AlmaLinux.md
17
AlmaLinux.md
|
@ -33,22 +33,18 @@ one single logical volume.
|
||||||
lsblk -f
|
lsblk -f
|
||||||
# Clear the partition table
|
# Clear the partition table
|
||||||
dd if=/dev/zero of=/dev/sdX bs=512 count=1 conv=notrunc
|
dd if=/dev/zero of=/dev/sdX bs=512 count=1 conv=notrunc
|
||||||
# Create LVM partition
|
dd if=/dev/zero of=/dev/sdY bs=512 count=1 conv=notrunc
|
||||||
parted --fix --align optimal --script /dev/sdX \
|
|
||||||
mklabel gpt \
|
|
||||||
mkpart primary ext4 1MiB -2048s \
|
|
||||||
set 1 lvm on
|
|
||||||
```
|
```
|
||||||
|
|
||||||
#### LVM
|
#### LVM
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Create physical volume
|
# Create physical volume
|
||||||
pvcreate /dev/sdX1
|
pvcreate /dev/sdX
|
||||||
# Create volume group for disks
|
# Create volume group for disks
|
||||||
vgcreate library /dev/sdX1
|
vgcreate library /dev/sdX
|
||||||
# Add more disks to volume group
|
# Add more disks to volume group
|
||||||
vgextend library /dev/sdY1
|
vgextend library /dev/sdY
|
||||||
# Create logical volume across all disks in volume group
|
# Create logical volume across all disks in volume group
|
||||||
lvcreate -l100%FREE -n books library
|
lvcreate -l100%FREE -n books library
|
||||||
# Add filesystem to logical volume
|
# Add filesystem to logical volume
|
||||||
|
@ -69,8 +65,11 @@ Type=ext4
|
||||||
WantedBy=default.target
|
WantedBy=default.target
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> [!NOTE]
|
||||||
|
> We could use a different filesystem that allows mount options to set the
|
||||||
|
> permissions
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
mkdir -p /volumes/books
|
|
||||||
chown -R $ctuser:$ctuser /volumes
|
chown -R $ctuser:$ctuser /volumes
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue