Birmingham mumbai



Download 15,21 Mb.
Pdf ko'rish
bet318/482
Sana13.01.2022
Hajmi15,21 Mb.
#355107
1   ...   314   315   316   317   318   319   320   321   ...   482
Bog'liq
Mastering Ubuntu Server Gain expertise in the art of deploying, configuring, managing, and troubleshooting Ubuntu Server by Jay LaCroix (z-lib.org)

[
 241 
]
With that example, we're using the 
lvcreate
 command, with the 
-s
 option 
(snapshot) and the 
-n
 option (which allows us to name the snapshot), where 
we declare a name of 
mysnapshot
. We're also using the 
-L
 option to designate a 
maximum size for the snapshot, which I set to 4 GB in this case. Finally, I give it the 
volume group and logical volume name, separated by a forward slash (
/
). From here, 
we can use the 
lvs
 command to monitor its size.
Since we're creating a new logical volume when we create a snapshot, we can mount 
it as we would a normal logical volume. This is extremely useful if we want to pull a 
single file without having to restore the entire thing.
But what about 
restoring the snapshot? One of the major benefits of snapshots is the 
ability to "roll back" to when the snapshot was taken. Essentially, this allows you to 
test changes to the server and then undo those changes. To roll back to a snapshot, 
we can do so with the 
lvconvert
 command:
sudo lvconvert --merge vg-test/mysnapshot
The output will look similar to the following:
Merging of volume mysnapshot started.
myvol1: Merged: 100.0%
It's important to note, however, that, unlike being able to resize a logical volume 
online, we cannot merge a snapshot while it is in use. If you do, the changes will 
take effect the next time it is mounted. Therefore, you can either unmount the logical 
volume before merging or unmount and remount after merging. Afterward, you'll 
see that the snapshot is removed the next time you run the 
lvs
 command.
If you'd like to make the snapshot permanent, which finalizes all of the changes 
you've made since the snapshot was first taken, we can use the 
lvremove
 command. 
For our example snapshot in this section, we can use the following command to 
make the snapshot permanent:
sudo lvremove vg-test/mysnapshot
Since you cannot merge (roll back) a snapshot that is in use, if the 
snapshot is of the root filesystem, you'll have to reboot the server 
for the rollback to finalize.


Managing Storage Volumes

Download 15,21 Mb.

Do'stlaringiz bilan baham:
1   ...   314   315   316   317   318   319   320   321   ...   482




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish