understand the output of bsdlabel

Martin

I have a Juniper router which uses Junos(based on FreeBSD) operating system where I can backup certain partitions from router CLI. Under the hood router starts the restore process and copies /dev/ad0s1a to /dev/ad1s1a and /dev/ad0s1e to /dev/ad1s1e. FreeBSD partitions before this copy operation are following:

# bsdlabel /dev/ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   451556        0    4.2BSD     2048 16384 28224 
  c:   501728        0    unused        0     0         # "raw" part, don't edit
  e:    50172   451556    4.2BSD     2048 16384  3136 
# bsdlabel /dev/ad1s1
# /dev/ad1s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   451556        0    4.2BSD     2048 16384    96 
  b:  4194288   451556      swap                    
  c: 58605057        0    unused        0     0         # "raw" part, don't edit
  e:    50172  4645844    4.2BSD     2048 16384   105 
  f: 53909041  4696016    4.2BSD     2048 16384    89 
# 

After the copy operation they are following:

# bsdlabel /dev/ad0s1
# /dev/ad0s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   451556        0    4.2BSD     2048 16384 28224 
  c:   501728        0    unused        0     0         # "raw" part, don't edit
  e:    50172   451556    4.2BSD     2048 16384  3136 
# bsdlabel /dev/ad1s1
# /dev/ad1s1:
8 partitions:
#        size   offset    fstype   [fsize bsize bps/cpg]
  a:   451556        0    4.2BSD     2048 16384 28224 
  b:  4194288   451556      swap                    
  c: 58605057        0    unused        0     0         # "raw" part, don't edit
  e:    50172  4645844    4.2BSD     2048 16384  3136 
  f: 53909041  4696016    4.2BSD     2048 16384    89 
# 

bsdlabel复制操作之前和之后的输出可以看出,在bps/cpg/dev/ad1s1a/dev/ad1s1e分区进行处理之后计数器会增加我是否纠正过在复制操作/dev/ad1s1a之前/dev/ad1s1e存在分区,但它们几乎为空的情况?因此,此复制操作可能将整个文件系统从镜像/dev/ad0s1a到,/dev/ad1s1a镜像/dev/ad0s1e/dev/ad1s1e

史蒂夫·威尔斯

是的,我相信你是正确的。尽管bsdlabel提供了有关分区的信息,但在bps/cpg列中还提供了有关分区中文件系统的一些信息有关更多信息,请参见bsdlabel手册页restore命令可能正在从该dump命令接收数据有关更多详细信息,请参见还原手册页转储手册页

本文收集自互联网,转载请注明来源。

如有侵权,请联系[email protected] 删除。

编辑于
0

我来说两句

0条评论
登录后参与评论

相关文章

来自分类Dev

I do not understand how execlp() works in Linux

来自分类Dev

Need to understand Javascript function hoisting example

来自分类Dev

PHP: Trying to understand subpattern regex match

来自分类Dev

separate screen for output in R?

来自分类Dev

Trying to understand a simple Linux code

来自分类Dev

blank output of post contents

来自分类Dev

Attempting to understand pointer arithmetic

来自分类Dev

Valgrind Memcheck Output

来自分类Dev

Trying to understand the Git Workflow

来自分类Dev

unable to understand connection establishment code

来自分类Dev

Unpredictable output of recursion of main()

来自分类Dev

Problems with output of Sieve of Eratosthenes

来自分类Dev

Parsing MySQL output in Bash

来自分类Dev

Why such output is coming?

来自分类Dev

Trying to understand why this Python code works

来自分类Dev

No atributes value in output

来自分类Dev

Updated output is concatenating with old output

来自分类Dev

Angular 2 @Output参数

来自分类Dev

Why is the output of this code 111111?

来自分类Dev

Capture gdb output with ruby

来自分类Dev

Student trying to understand callback functions

来自分类Dev

OUTPUT附近的SqLite错误

来自分类Dev

How to understand the output of command 'gradle dependencies'?

来自分类Dev

默认_output.yml

来自分类Dev

$ output是否错误

来自分类Dev

SQLite .output标准输出

来自分类Dev

Print newlines on command output

来自分类Dev

c++: Not able to understand Message Handlers

来自分类Dev

Documentation to understand mm part of Linux kernel?