我正在向 fstab 添加一些 nfs 链接,但一个杂散进程填满了磁盘,因此我在尝试保存时丢失了 fstab。我正在尝试重新创建,机器仍然处于活动状态。
找到了一些有用的链接,使用了 blkid 并认为我已经将其挂载到启动设备上。
然而,主系统位于 lvm 上,并且其 UUID 似乎与底层块设备不匹配。
我尝试在另一台机器上查看 fstab 和 blkid,并复制了有效的 fstab(称为 360g72.71)。
我不明白如何从 blkid 创建 lvm 的 UUID,或者如何找到它。编辑 - 我在 /etc/lvm/backup 中找到了一个包含该 id 的文件,并将其编辑到 fstab 中,基本上我将 vg 标识符和 ubuntu 卷 id 连接起来,并删除了中间的“-”。
这是我当前的 fstab,其中的注释显示了我所到达的位置,我想我已经解决了它,但在尝试之前请大家发表评论!
# /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).
#
#copied from 360g72.71
# <file system> <mount point> <type> <options> <dump> <pass>
# / was on /dev/ubuntu-vg/ubuntu-lv during curtin installation
#/dev/disk/by-id/dm-uuid-LVM-g6G2lkUVsE4qegAqsM1UZGb0i88snEbkffPzeOywoh0vzv6Pc3fAySNjDiVa6ztb / ext4 defaults 0 1
#lvm from 360g72
#ubuntu-vg {
# id = "g6G2lk-UVsE-4qeg-AqsM-1UZG-b0i8-8snEbk"
# pv0 {
# id = "dwf5SW-xDsZ-aRM7-0K6z-iy2a-5PkR-0X0CMR"
# device = "/dev/sda3" # Hint only
# id = "ffPzeO-ywoh-0vzv-6Pc3-fAyS-NjDi-Va6ztb"
#new
#lvm extracts from here /etc/lvm/backup
#vg
#7FHuF7-Wdbd-WZQV-Qrfg-0rZI-MIWN-ux3Scj
#ubuntu
#ENY1Z6-l9ti-zdHj-hjXd-PE1M-PzeQ-YhA4ez
/dev/disk/by-id/dm-uuid-LVM-7FHuF7WdbdWZQVQrfg0rZIMIWNux3ScjENY1Z6l9tizdHjhjXdPE1MPzeQYhA4ez / ext4 defaults 0 1
#blkid from 360g72.71
#/dev/mapper/ubuntu--vg-ubuntu--lv: UUID="045b0ff5-18a4-43f7-906c-e22c53a8b08a" BLOCK_SIZE="4096" TYPE="ext4"
#UUID="kaGiOI-TF2O-GbBt-B1zS-EHRO-IifV-brUmJW": UUID="QuFATb-PqON-3HDt-LdrU-LdGg-uPCA-D7cVKQ" TYPE="LVM2_member"
#UUID="0a166d03-2dae-42b6-b877-6616d3fcd9ff" BLOCK_SIZE="4096": UUID="f1501104-970c-49e8-9e4b-f903dedbf018" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="aa65834e-ec0c-44d0-aae5-7caf363d04dc"
#UUID="pm2Yk5-jfUs-klJj-xwl2-PSbO-XYY3-fiFEmD": UUID="dwf5SW-xDsZ-aRM7-0K6z-iy2a-5PkR-0X0CMR" TYPE="LVM2_member" PARTUUID="4242fec0-5a25-44a8-8e39-0cd9ba9b9c1f"
# /boot was on UUID="0a166d03-2dae-42b6-b877-6616d3fcd9ff" BLOCK_SIZE="4096" during curtin installation
#from 360g72
#/dev/disk/by-uuid/f1501104-970c-49e8-9e4b-f903dedbf018 /boot ext4 defaults 0 1
#
#new
#this blkid output
#/dev/mapper/ubuntu--vg-ubuntu--lv: UUID="4ed86e70-199c-41e8-918d-e200f7e08a63" BLOCK_SIZE="4096" TYPE="ext4"
#UUID="kaGiOI-TF2O-GbBt-B1zS-EHRO-IifV-brUmJW": UUID="kaGiOI-TF2O-GbBt-B1zS-EHRO-IifV-brUmJW" TYPE="LVM2_member"
#UUID="0a166d03-2dae-42b6-b877-6616d3fcd9ff" BLOCK_SIZE="4096": UUID="0a166d03-2dae-42b6-b877-6616d3fcd9ff" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6b874856-8811-4dce-b578-a8303d6bdfc3"
#UUID="pm2Yk5-jfUs-klJj-xwl2-PSbO-XYY3-fiFEmD": UUID="pm2Yk5-jfUs-klJj-xwl2-PSbO-XYY3-fiFEmD" TYPE="LVM2_member" PARTUUID="8cedc84d-8808-42fb-b1ff-9579c6fd5c77"
#/dev/sda1: PARTUUID="c4569521-c7a0-4b61-8dd8-65dd2c0f8de1"
/dev/disk/by-uuid/0a166d03-2dae-42b6-b877-6616d3fcd9ff /boot ext4 defaults 0 1
#
/swap.img none swap sw 0 0
ipsodell310:/nfs/10T /nfs/10T nfs defaults 0 0
ipsodell310:/nfs/4T /nfs/4T nfs defaults 0 0
truenas:/mnt/Hp40 /nfs/40T nfs defaults 0 0