148 lines
5.0 KiB
Markdown
148 lines
5.0 KiB
Markdown
Disk(s)
|
|
===
|
|
|
|
#### Format and mount the disks
|
|
|
|
```bash
|
|
sudo fdisk -l
|
|
|
|
**With disk <xxx>**
|
|
sudo fdisk /dev/<xxx>
|
|
(create new primary partition)
|
|
|
|
sudo mkfs -t ext4 /dev/<xxxp1>
|
|
sudo blkid -s UUID -o value /dev/<xxxp1>
|
|
```
|
|
|
|
#### If needed, check and repair the filesystem
|
|
```bash
|
|
sudo e2fsck -fDC0 /dev/sdaX
|
|
```
|
|
|
|
#### Add mount point to fstab
|
|
```bash
|
|
sudo mkdir -p /mnt/<folder>
|
|
echo "UUID=... /mnt/<folder> ext4 defaults 0 0" | sudo tee -a /etc/fstab
|
|
```
|
|
|
|
#### bob (mmcblk0 / nvme0n1 / sda / sdb)
|
|
```
|
|
# /etc/fstab: static file system information.
|
|
#
|
|
# Use 'blkid' to print the universally unique identifier for a
|
|
# device; this may be used with UUID= as a more robust way to name devices
|
|
# that works even if disks are added and removed. See fstab(5).
|
|
#
|
|
# systemd generates mount units based on this file, see systemd.mount(5).
|
|
# Please run 'systemctl daemon-reload' after making changes here.
|
|
#
|
|
# <file system> <mount point> <type> <options> <dump> <pass>
|
|
# / was on /dev/mmcblk0p1 during installation
|
|
UUID=15c5c8b9-af8d-4d35-bf0b-47443d554971 / ext4 errors=remount-ro 0 1
|
|
# swap was on /dev/mmcblk0p5 during installation
|
|
UUID=1c99fbca-6863-4f8a-b8da-4bbea3fbe8c9 none swap sw 0 0
|
|
# nvme
|
|
UUID=b656c935-5ef2-45a6-894e-c7062a75a862 /mnt/ssd ext4 defaults 0 0
|
|
/mnt/ssd/var /var none bind
|
|
/mnt/ssd/tmp /tmp none bind
|
|
/mnt/ssd/home /home none bind
|
|
```
|
|
|
|
#### carlo (mmcblk0 / sda )
|
|
```
|
|
# /etc/fstab: static file system information.
|
|
#
|
|
# Use 'blkid' to print the universally unique identifier for a
|
|
# device; this may be used with UUID= as a more robust way to name devices
|
|
# that works even if disks are added and removed. See fstab(5).
|
|
#
|
|
# systemd generates mount units based on this file, see systemd.mount(5).
|
|
# Please run 'systemctl daemon-reload' after making changes here.
|
|
#
|
|
# <file system> <mount point> <type> <options> <dump> <pass>
|
|
# / was on /dev/mmcblk0p2 during installation
|
|
UUID=327ff1db-0f93-49e7-9f80-79964eb2ad02 / ext4 errors=remount-ro 0 1
|
|
# /boot/efi was on /dev/mmcblk0p1 during installation
|
|
UUID=B23E-A140 /boot/efi vfat umask=0077 0 1
|
|
# swap was on /dev/mmcblk0p3 during installation
|
|
UUID=69691db2-1213-4f0b-8797-a246e6924c4a none swap sw 0 0
|
|
# ssd
|
|
UUID=6702c3b0-eb03-4c1f-9ddc-56f4f7736222 /mnt/ssd ext4 defaults 0 0
|
|
/mnt/ssd/var /var none bind
|
|
/mnt/ssd/tmp /tmp none bind
|
|
/mnt/ssd/home /home none bind
|
|
```
|
|
|
|
#### sandy (nvme0n1 / sda )
|
|
```
|
|
UUID=a92029d5-96be-47f6-8d45-ea81995e0a1b / ext4 defaults,commit=120,errors=remount-ro 0 1
|
|
tmpfs /tmp tmpfs defaults,nosuid 0 0
|
|
UUID=195a1632-e6b3-41a4-8b2b-eea2fde75cfc /mnt/ssd ext4 defaults 0 0
|
|
UUID=8a758c09-3ad8-4681-bcb0-41ced1d316e1 /mnt/hdd ext4 defaults 0 0
|
|
```
|
|
|
|
#### gary (nvme0n1)
|
|
```
|
|
UUID=a92029d5-96be-47f6-8d45-ea81995e0a1b / ext4 defaults,commit=120,errors=remount-ro 0 1
|
|
tmpfs /tmp tmpfs defaults,nosuid 0 0
|
|
UUID=7395f5ad-c422-4a09-9a1f-5c8bf96b00f5 /mnt/ssd ext4 defaults 0 0
|
|
```
|
|
|
|
#### sheldon (nvme0n1 / sda / sdb)
|
|
```
|
|
UUID=a92029d5-96be-47f6-8d45-ea81995e0a1b / ext4 defaults,commit=120,errors=remount-ro 0 1
|
|
tmpfs /tmp tmpfs defaults,nosuid 0 0
|
|
UUID=0a52875c-41a6-419f-b322-33ed2cec9717 /mnt/ssd ext4 defaults 0 0
|
|
# hdds
|
|
# sda1 d4cad1ad-6154-4eb3-b1a1-2c613a6cbe51
|
|
# sdb1 c445f17b-56b0-4606-9d14-db9728da0aa4
|
|
```
|
|
|
|
#### pearl (nvme0n1)
|
|
```
|
|
UUID=a92029d5-96be-47f6-8d45-ea81995e0a1b / ext4 defaults,commit=120,errors=remount-ro 0 1
|
|
tmpfs /tmp tmpfs defaults,nosuid 0 0
|
|
UUID=da49c557-732e-4bbc-b002-f9c627e2cf82 /mnt/ssd ext4 defaults 0 0
|
|
```
|
|
|
|
#### krabs (sad / sdb) (nfs server)
|
|
```
|
|
UUID=0c390345-ca52-45fd-9097-6e931d651a8f / ext4 defaults,x-systemd.growfs 0 1
|
|
# LVM
|
|
/dev/hdds/datas /mnt/data ext4 defaults,nofail,user_xattr,usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0,acl 0 2
|
|
# NFS exports
|
|
/mnt/data/cloud /srv/nfs4/cloud none bind,nofail 0 0
|
|
/mnt/data/media /srv/nfs4/media none bind,nofail 0 0
|
|
/mnt/data/media/downloads /srv/nfs4/downloads none bind,nofail 0 0
|
|
```
|
|
|
|
#### bernie (nvme0n1) ...
|
|
|
|
```
|
|
UUID=5855d1bc-99fd-41f2-9d11-7c00a1c0ad00 / ext4 defaults,x-systemd.growfs 0 1
|
|
# SSD
|
|
UUID=e8d74f7a-642a-486d-92db-d39388d1545f /mnt/ssd ext4 defaults 0 0
|
|
```
|
|
|
|
#### patrick (nvme0n1)
|
|
```
|
|
UUID=9C26-3AB6 /config vfat defaults,x-systemd.automount,fmask=0077,dmask=0077 0 2
|
|
UUID=9C26-8CEE /boot/efi vfat defaults,x-systemd.automount,fmask=0077,dmask=0077 0 2
|
|
UUID=ce95976e-7c04-4b82-8251-c780b6b3fac1 / ext4 defaults 0 1
|
|
# NFS
|
|
krabs:/srv/nfs4/media /nfs/media nfs _netdev,x-systemd.automount,nofail,noatime,nolock,tcp,bg,actimeo=1800
|
|
```
|
|
|
|
#### Check
|
|
```bash
|
|
cat /etc/fstab
|
|
```
|
|
|
|
#### Mount disk...
|
|
```bash
|
|
sudo mount -a
|
|
sudo systemctl daemon-reload
|
|
|
|
df -h /mnt/<folder>
|
|
```
|