Blame
|
1 | # SSD |
||||||
| 2 | ||||||||
|
3 | ## Temporarily Mount Partition |
||||||
| 4 | ||||||||
| 5 | ### mount |
|||||||
| 6 | with `sudo mount /dev/sda1 /mnt/ssd-test` |
|||||||
| 7 | ||||||||
| 8 | ### umount |
|||||||
| 9 | with `sudo umount /dev/sda1` |
|||||||
| 10 | ||||||||
| 11 | ## Permanently Mount Partition |
|||||||
| 12 | ||||||||
| 13 | ### create Backup |
|||||||
| 14 | ```bash |
|||||||
| 15 | sudo cp /etc/fstab /etc/fstab.backup |
|||||||
| 16 | ``` |
|||||||
| 17 | ||||||||
| 18 | ### edit `/etc/fstab` |
|||||||
| 19 | with `sudo nano /etc/fstab` and insert UUID from `blkid /dev/sda1` and insert new line |
|||||||
| 20 | ```bash |
|||||||
| 21 | UUID=123456-abcd-...... /srv/ssd ext4 defaults,nofail,x-systemd.device-timeout=10s 0 2 |
|||||||
| 22 | ``` |
|||||||
| 23 | - /srv/ssd is the permanent mount point |
|||||||
| 24 | - ext4 is partition type |
|||||||
| 25 | - defaults means standard partition |
|||||||
| 26 | - nofail means the system boots even if the mount is not active |
|||||||
| 27 | - device-timeout - doesn't wait too long during boot |
|||||||
| 28 | - 0 is default for old dump backup settings |
|||||||
| 29 | - 2 will be checked after all 1 - 0 means no check through `fsck` |
|||||||
| 30 | ||||||||
| 31 | ### mount |
|||||||
| 32 | with `sudo systemctl daemon-reload` and then `sudo mount -a` |
|||||||
| 33 | ||||||||
| 34 | ### check results |
|||||||
| 35 | ```bash |
|||||||
| 36 | lsblk |
|||||||
| 37 | findmnt /srv/ssd |
|||||||
| 38 | df -hT /srv/ssd |
|||||||
|
39 | findmnt --fstab |
||||||
|
40 | ``` |
||||||
| 41 | ||||||||
|
42 | ## Create New Partition |
||||||
| 43 | ||||||||
| 44 | ### What is currently on the ssd |
|||||||
| 45 | ```bash |
|||||||
| 46 | lsblk -p -o NAME,SIZE,MODEL,FSTYPE,PARTTYPENAME,LABEL,UUID,MOUNTPOINTS /dev/sda |
|||||||
| 47 | ``` |
|||||||
| 48 | expected result: |
|||||||
| 49 | ```bash |
|||||||
| 50 | /dev/sda |
|||||||
| 51 | ├─/dev/sda1 128M Microsoft reserved partition |
|||||||
| 52 | └─/dev/sda2 476.8G ntfs Microsoft basic data |
|||||||
| 53 | ``` |
|||||||
| 54 | :::warning |
|||||||
| 55 | no mountpoint should be visible! |
|||||||
| 56 | ::: |
|||||||
| 57 | ||||||||
| 58 | ### Create one big partition |
|||||||
| 59 | ```bash |
|||||||
| 60 | sudo parted --script --align optimal /dev/sda \ |
|||||||
| 61 | mklabel gpt \ |
|||||||
| 62 | mkpart primary ext4 1MiB 100% |
|||||||
| 63 | ``` |
|||||||
| 64 | check result with |
|||||||
| 65 | ```bash |
|||||||
| 66 | lsblk -f /dev/sda # and |
|||||||
| 67 | blkid /dev/sda1 |
|||||||
| 68 | ``` |
|||||||
| 69 | expected result like: |
|||||||
| 70 | ```bash |
|||||||
| 71 | user@raspberrypi2b:~ $ lsblk -f /dev/sda |
|||||||
| 72 | NAME FSTYPE FSVER LABEL UUID FSAVAIL FSUSE% MOUNTPOINTS |
|||||||
| 73 | sda |
|||||||
| 74 | └─sda1 ext4 1.0 ssd-data 4339f544-10cc-4d8b-a6a0-54425e97b932 |
|||||||
| 75 | ||||||||
| 76 | user@raspberrypi2b:~ $ blkid /dev/sda1 |
|||||||
| 77 | /dev/sda1: LABEL="ssd-data" UUID="4339f544-10cc-4d8b-a6a0-54425e97b932" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="primary" PARTUUID="71766893-52af-4e1d-83bd-0b7b0dc171be" |
|||||||
| 78 | user@raspberrypi2b:~ $ |
|||||||
| 79 | ``` |
|||||||
