Книга: Fedora™ Unleashed, 2008 edition
Mounting a Partition as Read-Only on a Running System
Mounting a Partition as Read-Only on a Running System
Remember that to do almost any kind of file system manipulation (formatting, checking, and so on), you should unmount the file system; by doing so, you avoid having any writes made to the file system, which would corrupt it.
How do you remount partitions on a running system? For example, to remount the /home
partition (assuming that it is on a separate physical partition from root) as read-only to run fsck
on it and then remount it as read-write, use the remount
option for mount:
# mount -o ro,remount /home
NOTE
Remounting does not work if a normal user is logged in because /home
is busy (in use). You might need to switch to runlevel 1 (init 1), which is single-user mode, to remount /home
.
Now you can run fsck
on the partition. When done,
# mount -o rw,remount /home
puts it back in service.
If you reboot your system to mount the root file system read-only for maintenance (enter the maintenance mode, s, as described in Chapter 11),
# mount -o rw,remount /
will remount it read-write and you can continue on. That's easier than unmounting and remounting the device.
- File System Manipulation
- Класс StreamReader
- How to read
- 9.1.1. Partitions
- System tools used for debugging
- Integrated Secure Communications System
- 6.6.5 SIGEV_THREAD
- Когда включаю компьютер, при загрузке пишется Insert system disk and press enter. Что нужно делать?
- На всех дисках моего компьютера есть папка System Volume Information. Для чего она нужна?
- При запуске программы появляется сообщение Инструкция по адресу 0х77ddb1d1 обратилась к памяти по адресу 0x0080002c. Пам...
- В Adobe Acrobat Reader русский текст на экране читается нормально, а при печати получается текст из набора символов. Как...
- Choosing a Partitioning Scheme