Skip to content

Commit fe5436f

Browse files
committed
tom: resize the disk containing nix storage after an unmounting
youch this was a painful mistake. do not unmount the /nix/store or core commands are lost!! i was hoping to increase the disk size for the /nix/store so mounted a disk, copied the store, updated the configuration.nix, and rebuilt. after unmounting this disk things went bad. no sudo to edit configs. rebooting failed for that generation so with the layout of disks and uuids being different, reinstalling was found to be the quickest fix. no data was lost and new commands were learned.
1 parent 43ad1a0 commit fe5436f

File tree

4 files changed

+74
-1
lines changed

4 files changed

+74
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ versioning is done in a continuous fashion without worries of breaking changes.
66

77
## patches
88

9+
- `tom`: resize the disk containing nix storage after an unmounting 2024-09-15
910
- `nvim`: jump to the starting point of tofu project configurations 2024-09-13
1011
- `ssh`: attach to tmux sessions for started communication with tom 2024-09-13
1112
- `nvim`: replace the deprecated tsserver lspconfig setup for ts_ls 2024-09-13

machines/tom/configuration.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ in
4747
};
4848
environment.systemPackages = with pkgs; [
4949
addOpenGLRunpath
50+
parted
5051
cudaPackages.cuda_cudart
5152
cudaPackages.cudatoolkit
5253
linuxPackages.nvidia_x11
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
# configuration
2+
3+
hardware is difficult without doubt. and that is just in the configurations of
4+
hardware.
5+
6+
it takes tries and tries and tries to guess the right disk descriptor.
7+
8+
## filesystems
9+
10+
files of photos in folders and so much more.
11+
12+
reference: https://nixos.org/manual/nixos/stable/options.html#opt-fileSystems
13+
14+
### chores
15+
16+
#### resising disks
17+
18+
resizing disks is an occasional chore which requires cautious change to unique
19+
identifiers and careful partitions.
20+
21+
backups are optional if the home directories remains intact.
22+
23+
in abundance of ignorance i recommend reinstalling nixos altogether to configure
24+
disks during setup. enter bios with `F11` and be patient during downloads.
25+
26+
once reinstallation completes the `configuration.nix` can be replaced with new
27+
values found in a generated `hardware-configuration.nix`.
28+
29+
### commands
30+
31+
inspecting the realms in which files exist is a somewhat infrequent but nuanced
32+
task that deserves good luck and these commands with `sudo` privilege:
33+
34+
```sh
35+
$ blkid # block device attributes
36+
$ chown # change file owner and group
37+
$ chroot # run shell with special root
38+
$ df # report file system space usage
39+
$ journalctl # print logged journaled entries
40+
$ lsblk # list block devices
41+
$ lvdisplay # logical volume information
42+
$ mount # mount a filesystem
43+
$ nano # another text editor
44+
$ parted # partition manipulation
45+
$ pvdisplay # physical volume information
46+
$ resize2fs # file system resizer
47+
$ rsync # a fast file copying tool
48+
$ su # gain super user powers
49+
$ swapoff # stop paging and swapping
50+
$ swapon # start pages and swapping
51+
$ umount # unmount filesystems
52+
$ vgdisplay # volume group information
53+
```
54+
55+
### directories
56+
57+
meaningful paths to inspect when dealing with disks includes both existing and
58+
uncreated directories:
59+
60+
```sh
61+
/dev/* # device files
62+
/dev/mapper/* # logical volumes
63+
/mnt/* # mounted paths
64+
/proc/* # process info
65+
/run/* # service programs
66+
/sys/* # kernel libraries
67+
```

machines/tom/hardware/configuration/default.nix

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,18 @@
1414
};
1515
fileSystems = {
1616
"/" = {
17-
device = "/dev/disk/by-uuid/30535ff2-b087-45ac-a9cd-cc198dbe7f81";
17+
device = "/dev/disk/by-uuid/925e1fcc-2949-4446-8ee9-74ca13363858";
1818
fsType = "ext4";
1919
};
2020
"/boot" = {
2121
device = "/dev/disk/by-uuid/205C-364C";
2222
fsType = "vfat";
2323
options = [ "fmask=0022" "dmask=0022" ];
2424
};
25+
"/home" = {
26+
device = "/dev/disk/by-uuid/30535ff2-b087-45ac-a9cd-cc198dbe7f81";
27+
fsType = "ext4";
28+
};
2529
};
2630
hardware = {
2731
cpu.amd.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;

0 commit comments

Comments
 (0)