Portál AbcLinuxu, 4. května 2025 15:39
[root@ubuntu-test]-[/home/user]# blockdev --report RO RA SSZ BSZ StartSec Size Device rw 256 512 4096 0 32212254720 /dev/sda rw 256 512 1024 2048 510656512 /dev/sda1 ro 256 512 4096 999424 31699501056 /dev/sda2 ro 256 512 4096 0 30698110976 /dev/dm-0 rw 256 512 4096 0 998244352 /dev/dm-1 [root@ubuntu-test]-[/home/user]# sync [root@ubuntu-test]-[/home/user]# pvdisplay --- Physical volume --- PV Name /dev/sda2 VG Name vg0 PV Size 29.52 GiB / not usable 3.00 MiB Allocatable yes (but full) PE Size 4.00 MiB Total PE 7557 Free PE 0 Allocated PE 7557 PV UUID yrUfkS-A3kP-HFEw-4lq2-31AB-wS2x-sHN4AD [root@ubuntu-test]-[/home/user]# lvdisplay --- Logical volume --- LV Path /dev/vg0/swap LV Name swap VG Name vg0 LV UUID G6dYd5-lIhM-0xik-V6mn-s9lu-Pmhy-ZBL1Mm LV Write Access read/write LV Creation host, time ubuntu-test, 2019-09-11 09:42:51 +0200 LV Status available # open 2 LV Size 952.00 MiB Current LE 238 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:1 --- Logical volume --- LV Path /dev/vg0/root LV Name root VG Name vg0 LV UUID oB2APF-jZyQ-29bT-32xi-TcbU-HtHx-QwzYAd LV Write Access read only LV Creation host, time ubuntu-test, 2019-09-11 09:43:00 +0200 LV Status available # open 1 LV Size <28.59 GiB Current LE 7319 Segments 1 Allocation inherit Read ahead sectors auto - currently set to 256 Block device 253:0 [root@ubuntu-test]-[/home/user]# mount |grep mapper /dev/mapper/vg0-root on / type ext4 (rw,relatime,errors=remount-ro,data=ordered)
Řešení dotazu:
blockdev-change-medium
(ale je možné, že to fungovat nebude, tenhle příkaz vypadá, že je určen pro vyměnitelná zařízení jako diskety)
[root@CentOS-8 ~]# cat /proc/scsi/scsi Attached devices: Host: scsi0 Channel: 00 Id: 00 Lun: 00 Vendor: QEMU Model: QEMU DVD-ROM Rev: 2.5+ Type: CD-ROM ANSI SCSI revision: 05 Host: scsi2 Channel: 00 Id: 00 Lun: 00 Vendor: ATA Model: QEMU HARDDISK Rev: 2.5+ Type: Direct-Access ANSI SCSI revision: 05 [root@CentOS-8 ~]# echo "scsi remove-single-device 2 0 0 0" > /proc/scsi/scsi [root@CentOS-8 ~]# cat /proc/scsi/scsi -bash: /bin/cat: Input/output error
[root@ubuntu-test]-[/home/user]# lvchange -prw vg0/root Cannot archive volume group metadata for vg0 to read-only filesystem. [root@ubuntu-test]-[/home/user]#
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.