Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # rbd ls -p spoa
- image01
- image02
- # rbd --image image01 -p spoa info
- rbd image 'image01':
- size 300 GB in 76800 objects
- order 22 (4096 KB objects)
- block_name_prefix: rb.0.0
- parent: (pool -1)
- master ceph # rbd -c ceph.conf map image01 --pool spoa --name client.admin --secret key.admin
- master ceph # rbd -c ceph.conf map image02 --pool spoa --name client.admin --secret key.admin
- dmesg:
- device label SAVAGE devid 1 transid 211 /dev/rbd1p1
- btrfs: disk space caching is enabled
- rbd2: p1
- rbd: rbd2: added with size 0x30000000000
- Consultando partición de 3TB:
- # parted /dev/rbd2
- GNU Parted 3.1
- Using /dev/rbd2
- Welcome to GNU Parted! Type 'help' to view a list of commands.
- (parted) p
- Model: Unknown (unknown)
- Disk /dev/rbd2: 3299GB
- Sector size (logical/physical): 512B/512B
- Partition Table: gpt
- Disk Flags:
- Number Start End Size File system Name Flags
- 1 4194kB 3299GB 3299GB logical
- master ceph # mkfs.btrfs -L SERRANA /dev/rbd2p1
- WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
- WARNING! - see http://btrfs.wiki.kernel.org before using
- fs created label SERRANA on /dev/rbd2p1
- nodesize 4096 leafsize 4096 sectorsize 4096 size 2.00TB
- Btrfs Btrfs v0.19
- =============================================
- Create partition aligned using parted
- master spoa # parted /dev/rbd2 unit s p free
- Model: Unknown (unknown)
- Disk /dev/rbd2: 6442450944s
- Sector size (logical/physical): 512B/512B
- Partition Table: gpt
- Disk Flags:
- Number Start End Size File system Name Flags
- 34s 6442450910s 6442450877s Free Space
- Create partition aligned using parted
- # parted /dev/rbd2 p free
- Model: Unknown (unknown)
- Disk /dev/rbd2: 3299GB
- Sector size (logical/physical): 512B/512B
- Partition Table: gpt
- Disk Flags:
- Number Start End Size File system Name Flags
- 17.4kB 3299GB 3299GB Free Space
- master spoa # parted -a optimal /dev/rbd2 mkpart primary 0% 100%
- Information: You may need to update /etc/fstab.
- master spoa # parted /dev/rbd2 p free
- Model: Unknown (unknown)
- Disk /dev/rbd2: 3299GB
- Sector size (logical/physical): 512B/512B
- Partition Table: gpt
- Disk Flags:
- Number Start End Size File system Name Flags
- 17.4kB 4194kB 4177kB Free Space
- 1 4194kB 3299GB 3299GB primary
- 3299GB 3299GB 4177kB Free Space
- # mkfs.btrfs -L SERRANA /dev/rbd2p1
- WARNING! - Btrfs Btrfs v0.19 IS EXPERIMENTAL
- WARNING! - see http://btrfs.wiki.kernel.org before using
- fs created label SERRANA on /dev/rbd2p1
- nodesize 4096 leafsize 4096 sectorsize 4096 size 3.00TB
- Btrfs Btrfs v0.19
- =================================================
- Create partition aligned using parted
- http://unix.stackexchange.com/questions/38164/create-partition-aligned-using-parted
- I'm partitioning a non-SSD hard disk with parted because I want a GPT partition table.
- parted /dev/sda mklabel gpt
- Now, I'm trying to create partitions correctly aligned so I use the next command to know where begins the first sector:
- parted /dev/sda unit s p free
- Disk /dev/sda: 488397168s
- Sector size (logical/physical): 512B/512B
- Partition Table: gpt
- Number Start End Size File system Name Flags
- 34s 488397134s 488397101s Free Space
- We can see that it starts in the sector 34 (it's by default when this partition table is used).
- So, to create the first partition I tried:
- parted /dev/sda mkpart primary 63s 127s
- to align it in the sector 64 since it's multiple of 8 but it shows:
- Warning: The resulting partition is not properly aligned for best performance.
- The sector size logical and physical in my hard disk are both of 512 bytes:
- cat /sys/block/sda/queue/physical_block_size
- 512
- cat /sys/block/sda/queue/logical_block_size
- 512
- How to create partitions correctly aligned? What I'm doing wrong?
Advertisement
Add Comment
Please, Sign In to add comment