HOME / コンピュータTips / Solaris / zfs / zfsboot / memo

Date: 2024/12/13 |  このエントリーをはてなブックマークに追加  |  Tags: solaris opensolaris zfsboot

solaris opensolaris zfsboot

http://opensolaris.org/jive/thread.jspa?messageID=147658

format (-e)

pp

partition> pCurrent partition table (original):Total disk cylinders available: 7292 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

 0       root    wm      67 -  930        6.62GB    (864/0/0)   13880160
 1       swap    wu       1 -   66      517.72MB    (66/0/0)     1060290
 2     backup    wm       0 - 7291       55.86GB    (7292/0/0) 117145980
 3 unassigned    wm       0               0         (0/0/0)            0
 4 unassigned    wm       0               0         (0/0/0)            0
 5 unassigned    wm       0               0         (0/0/0)            0
 6 unassigned    wm       0               0         (0/0/0)            0
 7       home    wm     931 - 7291       48.73GB    (6361/0/0) 102189465
 8       boot    wu       0 -    0        7.84MB    (1/0/0)        16065
 9 unassigned    wm       0               0         (0/0/0)            0

q

disk

select new disk

      1. c3d0 <Hitachi-113DP0410DTG6U7A-0001-186.31GB>
         /pci@0,0/pci-ide@1f,1/ide@0/cmdk@0,0

partition> modifySelect partitioning base:0. Current partition table (original)1. All Free HogChoose base (enter number) [0]? 0

Part Tag Flag Cylinders Size Blocks

 0 unassigned    wm       0                0         (0/0/0)             0
 1 unassigned    wm       0                0         (0/0/0)             0
 2     backup    wu       0 - 24317      186.29GB    (24318/0/0) 390668670
 3 unassigned    wm       0                0         (0/0/0)             0
 4 unassigned    wm       0                0         (0/0/0)             0
 5 unassigned    wm       0                0         (0/0/0)             0
 6 unassigned    wm       0                0         (0/0/0)             0
 7 unassigned    wm       0                0         (0/0/0)             0
 8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
 9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130

partition> modifySelect partitioning base:0. Current partition table (aaa)1. All Free HogChoose base (enter number) [0]? 0

Part Tag Flag Cylinders Size Blocks

 0 unassigned    wm       0                0         (0/0/0)             0
 1 unassigned    wm       0                0         (0/0/0)             0
 2     backup    wu       0 - 24317      186.29GB    (24318/0/0) 390668670
 3 unassigned    wm       0                0         (0/0/0)             0
 4 unassigned    wm       0                0         (0/0/0)             0
 5 unassigned    wm       0                0         (0/0/0)             0
 6 unassigned    wm       0                0         (0/0/0)             0
 7 unassigned    wm       0                0         (0/0/0)             0
 8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
 9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130

Do you wish to continue creating a new partitiontable based on above table[yes]?Free Hog partition[6]?Warning: No space available from Free Hog partition.Continue[no]? yesWarning: no space available for '0' from Free Hog partitionWarning: no space available for '1' from Free Hog partitionWarning: no space available for '3' from Free Hog partitionWarning: no space available for '4' from Free Hog partitionWarning: no space available for '5' from Free Hog partitionWarning: no space available for '7' from Free Hog partition

Part Tag Flag Cylinders Size Blocks

 0 unassigned    wm       0                0         (0/0/0)             0
 1 unassigned    wm       0                0         (0/0/0)             0
 2     backup    wu       0 - 24317      186.29GB    (24318/0/0) 390668670
 3 unassigned    wm       0                0         (0/0/0)             0
 4 unassigned    wm       0                0         (0/0/0)             0
 5 unassigned    wm       0                0         (0/0/0)             0
 6 unassigned    wm       0                0         (0/0/0)             0
 7 unassigned    wm       0                0         (0/0/0)             0
 8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
 9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130

Okay to make this the current partition table[yes]?Enter table name (remember quotes): system

Ready to label disk, continue? yes

partition> pCurrent partition table (system):Total disk cylinders available: 24318 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

 0 unassigned    wm       0                0         (0/0/0)             0
 1 unassigned    wm       0                0         (0/0/0)             0
 2     backup    wu       0 - 24317      186.29GB    (24318/0/0) 390668670
 3 unassigned    wm       0                0         (0/0/0)             0
 4 unassigned    wm       0                0         (0/0/0)             0
 5 unassigned    wm       0                0         (0/0/0)             0
 6 unassigned    wm       0                0         (0/0/0)             0
 7 unassigned    wm       0                0         (0/0/0)             0
 8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
 9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130

partition> 1Part Tag Flag Cylinders Size Blocks

 1 unassigned    wm       0                0         (0/0/0)             0

Enter partition id tag[unassigned]: swapEnter partition permission flags[wm]: wuEnter new starting cyl[3]: 3Enter partition size[0b, 0c, 3e, 0.00mb, 0.00gb]: 4gpartition> pCurrent partition table (unnamed):Total disk cylinders available: 24318 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

 0 unassigned    wm       0                0         (0/0/0)             0
 1       swap    wu       3 -   525        4.01GB    (523/0/0)     8401995
 2     backup    wu       0 - 24317      186.29GB    (24318/0/0) 390668670
 3 unassigned    wm       0                0         (0/0/0)             0
 4 unassigned    wm       0                0         (0/0/0)             0
 5 unassigned    wm       0                0         (0/0/0)             0
 6 unassigned    wm       0                0         (0/0/0)             0
 7 unassigned    wm       0                0         (0/0/0)             0
 8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
 9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130

partition> ! expr 24317 - 525

partition> 0Part Tag Flag Cylinders Size Blocks

 0 unassigned    wm       0                0         (0/0/0)             0

Enter partition id tag[unassigned]: rootEnter partition permission flags[wm]:Enter new starting cyl[3]: 526Enter partition size[0b, 0c, 526e, 0.00mb, 0.00gb]: 23792cpartition> pCurrent partition table (unnamed):Total disk cylinders available: 24318 + 2 (reserved cylinders)

Part Tag Flag Cylinders Size Blocks

 0       root    wm     526 - 24317      182.26GB    (23792/0/0) 382218480
 1       swap    wu       3 -   525        4.01GB    (523/0/0)     8401995
 2     backup    wu       0 - 24317      186.29GB    (24318/0/0) 390668670
 3 unassigned    wm       0                0         (0/0/0)             0
 4 unassigned    wm       0                0         (0/0/0)             0
 5 unassigned    wm       0                0         (0/0/0)             0
 6 unassigned    wm       0                0         (0/0/0)             0
 7 unassigned    wm       0                0         (0/0/0)             0
 8       boot    wu       0 -     0        7.84MB    (1/0/0)         16065
 9 alternates    wm       1 -     2       15.69MB    (2/0/0)         32130

partition> labelReady to label disk, continue? yes

# zpool create -f rootpool c3d0s0

# zpool create rootpool c3d0s0invalid vdev specificationuse '-f' to override the following errors:/dev/dsk/c3d0s0 overlaps with /dev/dsk/c3d0s2# zpool create -f rootpool c3d0s0# zpool create -f rootpool c3d0s0# zfs create rootpool/rootfs# zfs set mountpoint=legacy rootpool/rootfs# mkdir /zfsrootmkdir: Failed to make directory "/zfsroot"; File exists# mount -F zfs rootpool/rootfs /zfsroot# cd /# find . -xdev -depth -print | cpio -pvdm /zfsroot

sh thisscript.sh /zfsroot

# mount -F lofs -o nosub / /mnt# (cd /mnt; tar cvf - devices dev ) | (cd /zfsroot; tar xvf -)# umount /mnt

  137	22:12	vi /zfsroot/etc/vfstab
  138	22:14	zpool set bootfs=rootpool/rootfs rootpool
  139	22:14	cat /zfsroot/boot/solaris/filelist.ramdisk
  140	22:14	echo etc/zfs/zpool.cache >> /zfsroot/boot/solaris/filelist.ramdisk
  141	22:14	/usr/sbin/bootadm update-archive -R /zfsroot
  142	22:15	mkdir -p /rootpool/boot/grub
  143	22:15	cp /zfsroot/boot/grub/menu.lst /rootpool/boot/grub
  144	22:16	vi /rootpool/boot/grub/menu.lst
  145	22:23	vi /rootpool/boot/grub/menu.lst
  146	22:23	zpool status
  147	22:23	installgrub /zfsroot/boot/grub/stage1 /zfsroot/boot/grub/stage2 /dev/rdsk/c3d0s0