In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article is about how to test rbd snap in ceph. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Test rbd snap
Create and mount rbd1:
[root@mon0 ceph] # rbd create myrbd/rbd1-s 1024-- image-format=2 [root@mon0 ceph] # rbd map myrbd/rbd1 [root@mon0 ceph] # rbd showmappedid pool image snap device 0 test test.img-/ dev/rbd0 1 myrbd rbd1-/ dev/rbd1 [root@mon0 ceph] # mkfs.xfs / dev/rbd1log stripe unit (4194304 bytes) is too large (maximum is 256KiB) log stripe unit adjusted to 32KiBmeta-data=/dev/rbd1 isize=256 agcount=9 Agsize=31744 blks = sectsz=512 attr=2, projid32bit=0data = bsize=4096 blocks=262144, imaxpct=25 = sunit=1024 swidth=1024 blksnaming = version 2 bsize=4096 ascii-ci=0log = internal log bsize=4096 blocks=2560, version=2 = sectsz=512 sunit=8 blks, lazy-count=1realtime = none extsz=4096 blocks=0 Rtextents=0 [root@mon0 ceph] # blkid | grep rbd1/dev/rbd1: UUID= "643b509f-406b-411b-b3a5-fa220fbdfe47" TYPE= "xfs" [root@mon0 ceph] # mount / dev/rbd1 / mnt [root@mon0 ceph] # mount | grep rbd1/dev/rbd1 on / mnt type xfs (rw)
Create a snap and roll back:
[root@mon0 ceph] # rbd snap ls myrbd/rbd1SNAPID NAME SIZE 2 snap1 1024 MB [root@mon0 ceph] # rbd snap rollback myrbd/rbd1@snap1Rolling back to snapshot: 100% complete...done. [root@mon0 ceph] # ls / mntv2 [root@mon0 ceph] # umount / mnt [root@mon0 ceph] # mount / dev/rbd1 / mnt [root@mon0 ceph] # ls / mntv1
Mount via snapshot:
[root@mon0 ceph] # rbd map myrbd/rbd1@snap1 [root@mon0 ceph] # rbd showmappedid pool image snap device 0 test test.img-/ dev/rbd0 1 myrbd rbd1-/ dev/rbd1 2 myrbd rbd1 snap1 / dev/rbd2 [root@mon0 ceph] # mount-t xfs-o ro,norecovery,nouuid / dev/rbd2 / tmp [root@mon0 ceph] # ls / tmpv1 thanks for reading! This is the end of the article on "how to test rbd snap in ceph". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.