doc:appunti:linux:sa:linux_lvm
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
doc:appunti:linux:sa:linux_lvm [2022/04/22 15:52] – [Web References] niccolo | doc:appunti:linux:sa:linux_lvm [2022/04/22 16:19] (current) – [Resize disco => LVM => filesystem] niccolo | ||
---|---|---|---|
Line 77: | Line 77: | ||
- | ===== Resize ===== | + | ===== Resize |
- | FIXME Da verificare! | + | Vedere **[[http:// |
+ | |||
+ | Supponiamo che esista una partizione LVM che occupa un intero disco. La partizione potrebbe essere stata creata in precedenza con questi comandi, prima usando **parted**: | ||
+ | |||
+ | < | ||
+ | parted | ||
+ | (parted) mklabel gpt | ||
+ | (parted) mkpart primary 0% 100% | ||
+ | (parted) set 1 lvm on | ||
+ | </ | ||
+ | |||
+ | e quindi usando i **tool LVM**: | ||
+ | |||
+ | < | ||
+ | ~# pvcreate /dev/sdb1 | ||
+ | ~# vgcreate home_vg /dev/sdb1 | ||
+ | ~# vgchange --activate y home_vg | ||
+ | ~# lvcreate --extents +100%FREE home_vg --name homefs | ||
+ | ~# pvs | ||
+ | ~# vgs | ||
+ | ~# lvs | ||
+ | </ | ||
+ | |||
+ | ... | ||
+ | |||
+ | FIXME Il seguito è da verificare! | ||
Con parted verificare che il disco sia davvero allargato e che abbia spazio libero contiguo alla partizione da allargare: | Con parted verificare che il disco sia davvero allargato e che abbia spazio libero contiguo alla partizione da allargare: | ||
Line 104: | Line 129: | ||
< | < | ||
- | lvresize -l +100%FREE /dev/VolGroup/lv_root | + | lvresize -l +100%FREE /dev/home_vg/homefs |
</ | </ | ||
- | FIXME: Come scoprire il percorso del volume logico? | + | Il percorso del volume logico |
Allaragare il filesystem: | Allaragare il filesystem: | ||
< | < | ||
- | resize2fs /dev/mapper/VolGroup-lv_root | + | resize2fs /dev/home_vg/homefs |
</ | </ | ||
doc/appunti/linux/sa/linux_lvm.1650635544.txt.gz · Last modified: 2022/04/22 15:52 by niccolo